[patch tree-optimization 2/2]: Branch-cost optimizations

2011-11-06 Thread Kai Tietz
reassociation-pass can optimize on them. ChangeLog 2011-11-06 Kai Tietz kti...@redhat.com * tree-ssa-ifcombine.c (remove_stmt_chain): New helper. (update_gimple_cond_condtion_from_tree): Likewise. (stmt_no_side_effects_p): Likewise. (bb_no_side_effects_p): Use

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-27 Thread Kai Tietz
2011/10/27 Jiangning Liu jiangning@arm.com: -Original Message- From: Michael Matz [mailto:m...@suse.de] Sent: Wednesday, October 26, 2011 11:47 PM To: Kai Tietz Cc: Jiangning Liu; Richard Guenther; Kai Tietz; gcc-patches@gcc.gnu.org; Richard Henderson Subject: Re: [patch tree

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-26 Thread Kai Tietz
2011/10/26 Jiangning Liu jiangning@arm.com: -Original Message- From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- ow...@gcc.gnu.org] On Behalf Of Michael Matz Sent: Tuesday, October 11, 2011 10:45 PM To: Kai Tietz Cc: Richard Guenther; Kai Tietz; gcc-patches@gcc.gnu.org

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-26 Thread Kai Tietz
2011/10/26 Michael Matz m...@suse.de: Hi, On Wed, 26 Oct 2011, Kai Tietz wrote: Yes, this part introduced different behavior for this small case, int f(char *i, int j) {        if (*i j!=2)                return *i;        else                return j; } Well, as far as I

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-26 Thread Kai Tietz
I describe the sample more closely here extern int global = 0; extern int *a = NULL; void catchSigSegV( int sig ) { a = global; } int foo (int j) { signal (SIGSEGV, catchSigSegV); if (*a global) return 2; return 0; } I admit that in most cases such a scenario is not common. This sample

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-26 Thread Kai Tietz
2011/10/26 Michael Matz m...@suse.de: Hi, On Wed, 26 Oct 2011, Kai Tietz wrote: int f(char *i, int j) {        if (*i j!=2)                return *i;        else                return j; } the case can be produced quite easily. extern int global = 0

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-26 Thread Kai Tietz
2011/10/26 Michael Matz m...@suse.de: Hi, On Wed, 26 Oct 2011, Kai Tietz wrote: well, if such a function is used as inline and we know for it that j has value != 2, then we have here a big difference.  For your first example, we still have to do the memory access to *i, even if we

Re: Fix gcc.dg/tls/thr-cse-1.c for MinGW target

2011-10-26 Thread Kai Tietz
Hi, patch looks fine for mingw 32-bit. With a small nit new test passes for 64-bit mingw version, too. The cygwin-part looks like the mingw one. 2011/10/26 Joseph S. Myers jos...@codesourcery.com: gcc.dg/tls/thr-cse-1.c tests that there are not two calls to __emutls_get_address in the

Re: Fix gcc.dg/graphite/run-id-1.c for Windows targets

2011-10-26 Thread Kai Tietz
2011/10/26 Joseph S. Myers jos...@codesourcery.com: The test gcc.dg/graphite/run-id-1.c requires more stack space than Windows targets provide by default.  This patch arranges for the appropriate -Wl,--stack option (as in config/mh-mingw and config/mh-cygwin) to be used by this test on those

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-25 Thread Kai Tietz
Applied a fix to trunk at rev. 180423 and to 4.6.x branch at rev. 180422. Regards, Kai

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-24 Thread Kai Tietz
2011/10/24 Richard Henderson r...@twiddle.net: On 10/24/2011 09:18 AM, Kai Tietz wrote: A possible patch for 4.6 gcc versions I attached to this mail. ... +/* For 32-bit Windows we need valid frame-pointer for function using +   setjmp.  */ +#define SUBTARGET_SETJMP_NEED_FRAME_POINTER

Re: [patch tree-optimization]: allow branch-cost optimization for truth-and/or on mode-expanded simple boolean-operands

2011-10-21 Thread Kai Tietz
2011/10/21 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 20, 2011 at 3:08 PM, Kai Tietz kti...@redhat.com wrote: Hello, this patch re-enables the branch-cost optimization on simple boolean-typed operands, which are casted to a wider integral type.  This happens due casts from

[patch tree-optimization]: allow branch-cost optimization for truth-and/or on mode-expanded simple boolean-operands

2011-10-20 Thread Kai Tietz
-cost optimization for IA-architecture and two for explicit checking for boolean-type. ChangeLog 2011-10-20 Kai Tietz kti...@redhat.com * fold-const.c (simple_operand_p_2): Handle integral casts from boolean-operands. 2011-10-20 Kai Tietz kti...@redhat.com

[patch testsuite]: Adjust tree-ssa/builtin-expect-*.c tests for high cost-branching optimization

2011-10-18 Thread Kai Tietz
Hello, this patch adjusts __builtin_expect tests in tree-ssa so, that short-circuit branch optimization don't lead to fallout. I've used here a multiplication, as simple substraction/addition might get optimized away. ChangeLog 2011-10-18 Kai Tietz kti...@redhat.com * gcc.dg/tree

Re: [patch testsuite]: Adjust tree-ssa/builtin-expect-*.c tests for high cost-branching optimization

2011-10-18 Thread Kai Tietz
- Original Message - From: Kai Tietz kti...@redhat.com To: gcc-patches@gcc.gnu.org Cc: Richard Guenther richard.guent...@gmail.com Sent: Tuesday, October 18, 2011 1:33:17 PM Subject: [patch testsuite]: Adjust tree-ssa/builtin-expect-*.c tests for high cost-branching optimization Hello

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-17 Thread Kai Tietz
2011/10/17 Richard Guenther richard.guent...@gmail.com: On Fri, Oct 14, 2011 at 9:43 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, So I committed the gimplify patch separate.  And here is the remaining fold-const patch. The important tests here are in gcc.dg/tree-ssa/builtin-expect[1-4

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-17 Thread Kai Tietz
2011/10/17 Richard Guenther richard.guent...@gmail.com: On Mon, Oct 17, 2011 at 12:59 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/10/17 Richard Guenther richard.guent...@gmail.com: On Fri, Oct 14, 2011 at 9:43 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, So I committed

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-17 Thread Kai Tietz
Ok, I see. This might be profitable to do that. So fold_truth_op hunk looks like this @@ -5149,13 +5176,6 @@ fold_truthop (location_t loc, enum tree_ build2 (BIT_IOR_EXPR, TREE_TYPE (ll_arg), ll_arg, rl_arg),

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-17 Thread Kai Tietz
Sure, Is simplier and also handles (A T[-IF] (B T-IF C) - (A T B) T-IF C case, which can happen by framing in conditions. @@ -8380,13 +8400,65 @@ fold_truth_andor (location_t loc, enum t lhs is another similar operation, try to merge its rhs with our rhs. Then try to merge our lhs

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
operation. This shows up for Fortran, as here are more then one boolean-kind type with different mode-sizes. I added a testcase for this, ChangeLog 2011-10-13 Kai Tietz kti...@redhat.com * fold-const.c (simple_operand_p_2): New function. (fold_truthop): Rename

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
2011/10/13 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 13, 2011 at 1:25 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this new version addresses the comments from Michael and additional fixes an latent issue shown up by this rewrite in fold-const. On gimplify.c's

[patch optimization]: Improve tree-ssa-ifcombine pass

2011-10-13 Thread Kai Tietz
) == 8) To support that, patch adds required additional patterns for if.and.if, and if.or.if detection to tree_ssa_ifcombine_bb. ChangeLog 2011-10-13 Kai Tietz kti...@redhat.com * tree-ssa-ifcombine.c (same_phi_args_p_2): New helper for new andif pattern edge PHI comparison

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
than one boolean-kind type with different mode-sizes. I added a testcase for this, ChangeLog 2011-10-13 Kai Tietz kti...@redhat.com * fold-const.c (simple_operand_p_2): New function. (fold_truthop): Rename to (fold_truth_andor_1): function name. Additionally remove

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-13 Thread Kai Tietz
2011/10/13 Paolo Carlini pcarl...@gmail.com: Ping, did this go in trunk already? I would be surprised to see this happening if nobody like you or Kai actually does the commit ;) P I will take care to apply it. Kai

[patch i386]: Unbreak bootstrap for x64 SEH enabled target

2011-10-12 Thread Kai Tietz
as prologue-used at the end of prologue. Also we need to emit a memory blockage. ChangeLog 2011-10-12 Kai Tietz kti...@redhat.com * config/i386/i386.c (ix86_expand_prologue): Mark for TARGET_SEH all sse/integer registers as prologue-used. Tested for x86_64-w64-mingw32. Ok

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-12 Thread Kai Tietz
2011/10/12 Michael Matz m...@suse.de: Hi, On Wed, 12 Oct 2011, Kai Tietz wrote: And I think it could use some overview of the transformation done like in the initial patch, ala: Transform ((A B) C) into (A (B C)). and Or (A B) into (A B). for this part

Re: [patch i386]: Unbreak bootstrap for x64 SEH enabled target

2011-10-12 Thread Kai Tietz
2011/10/12 Richard Henderson r...@redhat.com: On 10/12/2011 12:07 AM, Kai Tietz wrote: Hello, by recent changes gcc begun to move code into the prologue region. This is for x64 SEH an issue, as here the table-information for prologue is limited to 255 bytes size.  So we need to avoid moving

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-11 Thread Kai Tietz
So updated version for patch. It creates new simple_operand_p_2 function instead of modifying simple_operand_p function. ChangeLog 2011-10-11 Kai Tietz kti...@redhat.com * fold-const.c (simple_operand_p_2): New function. (fold_truthop): Rename to (fold_truth_andor_1

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-11 Thread Kai Tietz
2011/10/11 Michael Matz m...@suse.de: Hi, On Tue, 11 Oct 2011, Kai Tietz wrote: Better make it a separate function the first tests your new conditions, and then calls simple_operand_p. Well, either I make it a new function and call it instead of simple_operand_p, That's what I meant

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
2011/10/7 Kai Tietz ktiet...@googlemail.com: Hello, this is the updated version with the suggestion 2011/10/7 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 6, 2011 at 4:25 PM, Kai Tietz kti...@redhat.com wrote: +       ((TREE_CODE_CLASS (TREE_CODE (arg1)) != tcc_comparison

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
2011/10/10 Richard Guenther richard.guent...@gmail.com: On Mon, Oct 10, 2011 at 12:35 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/10/7 Kai Tietz ktiet...@googlemail.com: Hello, this is the updated version with the suggestion 2011/10/7 Richard Guenther richard.guent...@gmail.com

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
Sample had a typo. Correct sample has of course to return r. int foo () {  int c, r = 0;  if ((c = foo ()) != 0 c 20)    r = 1;  return r; }

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
2011/10/10 Richard Guenther richard.guent...@gmail.com: On Fri, Oct 7, 2011 at 11:36 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this is the updated version with the suggestion 2011/10/7 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 6, 2011 at 4:25 PM, Kai Tietz kti

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
2011/10/10 Richard Guenther richard.guent...@gmail.com: On Mon, Oct 10, 2011 at 2:29 PM, Kai Tietz ktiet...@googlemail.com wrote: Recent patch had a thinko on rhs of inner lhs check for TRUTH-IF.  It has to be checked that the LHS code is same as outer CODE, as otherwise we wouldn't apply

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-10 Thread Kai Tietz
2011/10/10 Richard Guenther richard.guent...@gmail.com: On Mon, Oct 10, 2011 at 4:06 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/10/10 Richard Guenther richard.guent...@gmail.com: On Mon, Oct 10, 2011 at 2:29 PM, Kai Tietz ktiet...@googlemail.com wrote: Recent patch had a thinko on rhs

[patch bfd]: Some adjustments on coff-link.c

2011-10-09 Thread Kai Tietz
Hello, this patch improves COFF linker for undefined weak symbols and avoids writing symbols for discarded sections - if linker tells so -, and for IR generated sections. ChangeLog 2011-10-09 Kai Tietz kti...@redhat.com * cofflink.c (coff_link_check_ar_symbols): Allow adding

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-08 Thread Kai Tietz
2011/10/8 Paolo Carlini pcarl...@gmail.com: Hi, Ok, fixed it, I made a very dumb mistake in configure.host, new patch attached. Patch is still ok with me, if Kai is ok with it (remember for next time: regenerated files are not posted, are just a distraction) Paolo Ok, by me, too.

[patch tree-optimization]: 2 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds the repropagation of expanded bitwise-not expressions. ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (walk_bitwise_stmt_elems): Helper to collect different kinds of operands of a bitwise-binary expression chain

[patch tree-optimization]: 1 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds to the break-up pass the facility to sink bitwise-not operations into bitwise-binary expressions. Additionally it handles special cases for ~(~X), and ~(X cmp Y). ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (remove_stmt_chain): Helper

[patch tree-optimization]: 3 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds to the break-up pass the facility to expand (X | Y) ==/!= 0 expression. This enables in later reassociation pass better results. ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (expand_cmp_ior): Helper for expanding (X | Y

[patch tree-optimization]: 5 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds to the break-up code the conversion for X ==/!= ~0 to ~X ==/!= 0. ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (break_up_bitwise_combined_stmt): Add handling for X !=/== 0 transformation to ~X !=/== 0. 2011-10-07 Kai Tietz

[patch tree-optimization]: 6 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds to the repropagation code the conversion for ~X ==/!= CST to X ==/!= CST' (with CST' = ~ CST). We need to do this back-conversion after initial bitwise-binary repropagation loop, as otherwise it would interfer. ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com

[patch tree-optimization]: 4 of 6 Improve reassoc for bitwise operations

2011-10-07 Thread Kai Tietz
Hello, This patch adds to the repropagation pass for bitwise-expression the conversion of (X != 0) | (Y != 0) - (X | Y) != 0, and of (X == 0) (Y == 0) - (X | Y) == 0. ChangeLog 2011-10-07 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (walk_bitwise_stmt_elems): Add new argument

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-07 Thread Kai Tietz
Hello, this is the updated version with the suggestion 2011/10/7 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 6, 2011 at 4:25 PM, Kai Tietz kti...@redhat.com wrote: +       ((TREE_CODE_CLASS (TREE_CODE (arg1)) != tcc_comparison +           TREE_CODE (arg1) != TRUTH_NOT_EXPR

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
-effects, and doesn't trap, then try to convert expression to a TRUTH_(AND|OR)_EXPR, if left-hand operand is a simple operand, and has no side-effects. ChangeLog 2011-10-06 Kai Tietz kti...@redhat.com * fold-const.c (fold_truth_andor): Convert TRUTH_(AND|OR)IF_EXPR

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
2011/10/6 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 6, 2011 at 11:28 AM, Kai Tietz kti...@redhat.com wrote: Hello, Sorry attached non-updated change.  Here with proper attached patch. This patch improves in fold_truth_andor the generation of branch-conditions for targets

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
Hi, I modified the patch so, that it always just converts two leafs of a TRUTH(AND|OR)IF chain into a TRUTH_(AND|OR) expression, if branch costs are high and leafs are simple without side-effects. Additionally I added some testcases for it. 2011-10-06 Kai Tietz kti...@redhat.com

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
2011/10/6 Michael Matz m...@suse.de: Hi, On Thu, 6 Oct 2011, Richard Guenther wrote: +       ((TREE_CODE_CLASS (TREE_CODE (arg1)) != tcc_comparison +           TREE_CODE (arg1) != TRUTH_NOT_EXPR) +         || !FLOAT_TYPE_P (TREE_TYPE (TREE_OPERAND (arg1, 0) ?  simple_operand_p

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
2011/10/6 Michael Matz m...@suse.de: Hi, On Thu, 6 Oct 2011, Kai Tietz wrote: That's not the hole story.  The difference between TRUTH_(AND|OR)IF_EXPR and TRUTH_(AND|OR)_EXPR are, that for TRUTH_(AND|OR)IF_EXPR gimplifier creates a COND expression, but for TRUTH_(AND|OR)_EXPR it doesn't

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-06 Thread Kai Tietz
2011/10/6 Michael Matz m...@suse.de: Hi, On Thu, 6 Oct 2011, Kai Tietz wrote: at which point this association doesn't make sense anymore, as Sorry, exactly this doesn't happen, due an ANDIF isn't simple, and therefore it isn't transformed into and AND. Right ...  ((W AND X) AND Y

[patch tree-optimization]: 1 of 2: Add normalization of bitwise-operations to tree-ssa-reassoc pass

2011-10-04 Thread Kai Tietz
Hello, This patch (one of two) adds to tree-ssa-reassociation code for expansion of packed bitwise-binary operations - like (X | Y) == 0, etc. Also it normalizes bitwise-not operations on bitwise-binary tree chains - like ~(X | Y) - ~X ~Y. ChangeLog 2011-10-04 Kai Tietz kti...@redhat.com

Re: [PATCH] [mingw] fix typo: s/_REENTRANCE/_REENTRANT/

2011-10-04 Thread Kai Tietz
2011/10/3 Ozkan Sezer seze...@gmail.com: On Mon, Oct 3, 2011 at 5:56 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/10/3 Ozkan Sezer seze...@gmail.com: PING? On Thu, Sep 22, 2011 at 2:28 PM, Ozkan Sezer seze...@gmail.com wrote: Hi: Unless I'm missing something, the mingw CPP_SPEC

Re: [PATCH] [mingw] fix typo: s/_REENTRANCE/_REENTRANT/

2011-10-03 Thread Kai Tietz
2011/10/3 Ozkan Sezer seze...@gmail.com: PING? On Thu, Sep 22, 2011 at 2:28 PM, Ozkan Sezer seze...@gmail.com wrote: Hi: Unless I'm missing something, the mingw CPP_SPEC changes introduced in r171833 have a typo: -D_REENTRANCE should read -D_REENTRANT . Patchlet below.  Please review, and

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-01 Thread Kai Tietz
2011/10/1 Pedro Alves pe...@codesourcery.com: On Saturday 01 October 2011 12:15:42, JonY wrote: On 10/1/2011 18:33, Pedro Alves wrote: On Saturday 01 October 2011 07:03:35, JonY wrote: Hi, I followed Paolo's suggestion with the os_defines.h trick. I duplicated os/mingw32/ to

Re: [google] Add SECTION_EXCLUDE flag and exclude .gnu.callgraph sections (issue5126041)

2011-09-27 Thread Kai Tietz
2011/9/27 Richard Henderson r...@redhat.com: On 09/23/2011 04:45 PM, Sriraman Tallam wrote: I also want the SECTION_EXCLUDE part alone to be considered for trunk. This is ok for trunk. Kai, is there a similar flag for pe-coff?  I.e. is there something reasonable that we can add to

[patch windows]: Support SECTION_EXCLUDE for pe-coff targets

2011-09-27 Thread Kai Tietz
Hi, this patch enables same feature as in thread [google] Add SECTION_EXCLUDE flag and exclude .gnu.callgraph sections (issue5126041) for pe-coff x86 and x64 targets. ChangeLog 2011-09-27 Kai Tietz kti...@redhat.com * configure.ac: Add test for new section attribute specifier

Re: [patch windows]: Support SECTION_EXCLUDE for pe-coff targets

2011-09-27 Thread Kai Tietz
2011/9/27 Richard Henderson r...@redhat.com: On 09/27/2011 12:58 PM, Kai Tietz wrote: +#ifdef HAVE_GAS_SECTION_EXCLUDE +  if ((flags SECTION_EXCLUDE) != 0) +    *f++ = 'e'; +#endif If 'e' is not supported, I wonder if we should emit 'n'? Otherwise ok. r~ This sounds fair. At least

Re: [Mingw-users] [patch] --enable-dynamic-string default for mingw-w64

2011-09-25 Thread Kai Tietz
2011/9/25 Paolo Carlini paolo.carl...@oracle.com: On 09/25/2011 05:14 PM, Cesar Strauss wrote: I quote my reasoning: On 09/20/2011 11:56 PM, Cesar Strauss wrote: On the one hand, according to comment 4 of [1], by using --enable-fully-dynamic-string, all other users will miss a very good

Re: [patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-09-21 Thread Kai Tietz
. (execute_reassoc): Add call for repropagate_bitwise function. ChangeLog gcc/testsuite 2011-09-21 Kai Tietz kti...@redhat.com * gcc.dg/tree-ssa/reassoc-26.c: New test. * gcc.dg/tree-ssa/reassoc-27.c: New test. * gcc.dg/tree-ssa/reassoc-28.c: New test. * gcc.dg/tree-ssa/reassoc

Re: [patch] --enable-dynamic-string default for mingw-w64

2011-09-20 Thread Kai Tietz
2011/9/20 Charles Wilson cwils...@users.sourceforge.net: On 9/20/2011 9:20 AM, JonY wrote: On 9/20/2011 13:59, Kai Tietz wrote: 2011/9/20 JonY: Its been used in the automated toolchain builds for sometime, seems like a good idea to enable it by default. It can be easily changed to match

Re: [patch] --enable-dynamic-string default for mingw-w64

2011-09-19 Thread Kai Tietz
2011/9/20 JonY jo...@users.sourceforge.net: Hi, Its been used in the automated toolchain builds for sometime, seems like a good idea to enable it by default. It can be easily changed to match for all mingw as well if needed. OK for trunk? Index: libstdc++-v3/configure.ac

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-30 Thread Kai Tietz
Hi Pedro, The update of copyright date is ok. The rest of the patch doesn't look right. Why you have here a stray comma? Why you remove here leading spaces for comments? Kai 2011/8/30 Paolo Carlini paolo.carl...@oracle.com: ... I committed the below because what we have now cannot possibly

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-30 Thread Kai Tietz
2011/8/30 Paolo Carlini paolo.carl...@oracle.com: On 08/30/2011 11:18 AM, Kai Tietz wrote: Hi Pedro, Paolo The update of copyright date is ok. The rest of the patch doesn't look right.  Why you have here a stray comma? Actually, *you* had wrong commas. Look closer. Paolo. Yes, saw

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-29 Thread Kai Tietz
2011/8/29 Paolo Carlini paolo.carl...@oracle.com: On 08/29/2011 10:54 AM, Pedro Alves wrote: While these two didn't get the HAVE_... prefix. Was that intended? To be clear: make sure before committing that *all* use _GLIBCXX_HAVE_* Paolo. Done and added missing _GLIBCXX_HAVE_ for all

[patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
for 32-bit and 64-bit Windows host. ChangeLog 2011-08-28 Kai Tietz kti...@redhat.com * config/os/mingw32/error_constants.h (ECHILD): Add support, if present. (ENOSPC): Likewise. (EPERM): Likewise. Bootstrapped and regression tested for x86_64-w64-mingw32 and i686-w64

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011/8/28 Paolo Carlini paolo.carl...@oracle.com: Hi, Hello, this patch adds some errno values supported by newer runtime-version. To keep backward compatibility this patch checks for their definition before trying to use them. Any particular reason for not using

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011/8/28 Paolo Carlini paolo.carl...@oracle.com: On 08/28/2011 10:05 PM, Kai Tietz wrote: 2011/8/28 Paolo Carlinipaolo.carl...@oracle.com: Hi, Hello, this patch adds some errno values supported by newer runtime-version. To keep backward compatibility this patch checks

Re: [patch libstdc++]: Add some missing errno-constants for mingw-targets

2011-08-28 Thread Kai Tietz
2011-08-28 Kai Tietz kti...@redhat.com * configure: Regenerated. * config.h.in: Regenerated. * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR) Add checks for ECHILD, ENOSPC, EPERM, ETIMEDOUT, and EWOULDBLOCK. * config/os/mingw32/error_constants.h (errc

[patch mingw committed]: Add to GOMP_SELF_SPECS additionally the option -pthread

2011-08-16 Thread Kai Tietz
Hello, this patch fixes for options -fopenmp and/or -ftree-parallelize-loops= the binding to pthread-library. ChangeLog 2011-08-16 Kai Tietz kti...@redhat.com * config/i386/mingw32.h (GOMP_SELF_SPEC): Add -pthread option. Bootstrapped for x86_64-w64-mingw32 and i686-pc-mingw32

Re: [patch tree-optimization]: Fix for PR/49806

2011-08-09 Thread Kai Tietz
Ups missed to update patch before sending it. Inlined tested patch. Kai Index: gcc/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c === --- gcc.orig/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c +++ gcc/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c @@ -4,8

Re: [patch testsuite]: Adjust gcc.dg/tree-ssa tests for LLP64 target

2011-08-07 Thread Kai Tietz
2011/8/7 Mike Stump mikest...@comcast.net: On Aug 6, 2011, at 6:04 AM, Kai Tietz wrote: this adjusts some testcases for LLP64 target x86_64 mingw. Ok.  Please watch for any comments on stdarg...  I don't have any, but others might. Ok, will do. Applied at rev 177543. Thanks, Kai

[patch testsuite]: Adjust gcc.dg/tree-ssa tests for LLP64 target

2011-08-06 Thread Kai Tietz
Hello, this adjusts some testcases for LLP64 target x86_64 mingw. ChangeLog 2011-08-06 Kai Tietz kti...@redhat.com * gcc.dg/tree-ssa/pr23455.c: Adjust testcases for LLP64 for x86_64 mingw target. * gcc.dg/tree-ssa/loop-1.c: Likewise. * gcc.dg/tree-ssa/ssa

Re: [patch i386]: Fix recent bootstrap failure for x86_64 windows target

2011-08-05 Thread Kai Tietz
2011/8/4 Kai Tietz ktiet...@googlemail.com: 2011/8/4 Richard Henderson r...@redhat.com: On 08/04/2011 01:53 PM, Kai Tietz wrote:        diff = frame-stack_pointer_offset - frame-hard_frame_pointer_offset; -      if (diff 240 || (diff 15) != 0) +      if (diff 240 || (diff 15) != 0

Re: [patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-08-04 Thread Kai Tietz
2011/8/3 Richard Guenther richard.guent...@gmail.com: On Wed, Aug 3, 2011 at 3:32 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/8/3 Michael Matz m...@suse.de: Hi, On Tue, 2 Aug 2011, Kai Tietz wrote: this patch improves the ability of reassociation pass to simplifiy more complex

[patch i386]: Fix recent bootstrap failure for x86_64 windows target

2011-08-04 Thread Kai Tietz
, then we should set frame's hard_frame_pointer_offset to its current stack_pointer_offset (minus 128 delta for smaller common stack-address ranges). ChangeLog 2011-08-04 Kai Tietz kti...@redhat.com * config/i386/i386.c (ix86_compute_frame_layout): Adjust hard_frame_pointer_offset

Re: [patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-08-03 Thread Kai Tietz
2011/8/3 Michael Matz m...@suse.de: Hi, On Tue, 2 Aug 2011, Kai Tietz wrote: this patch improves the ability of reassociation pass to simplifiy more complex bitwise-binary operations with comparisons.  We break-up for this patch statements like (X | Y) != 0 to X != 0 | Y != 0, and (X | Y

Re: [patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-08-03 Thread Kai Tietz
2011/8/3 Michael Matz m...@suse.de: Hi, On Wed, 3 Aug 2011, Kai Tietz wrote: Implement all of this in the normal reassoc machinery that already exists. Don't implement your own walker (which btw is superlinear because you recurse into both operands).  If no simplifications were

[patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
, but IMHO it makes sense to add here the check for cast from boolean-type to be consitant. ChangeLog 2011-08-02 Kai Tietz kti...@redhat.com * gimple.c (canonicalize_cond_expr_cond): Handle cast from boolean-type. * tree-ssa-forwprop.c (forward_propagate_comparison): Return true iff

[patch tree-optimization]: Add cleanup code for possible unused statements in binary optimization

2011-08-02 Thread Kai Tietz
Hello, this patch adds some statement-cleanup to forward-propagation. ChangeLog 2011-08-02 Kai Tietz kti...@redhat.com * tree-ssa-forwprop.c (simplify_bitwise_binary): Remove possible unused statement after optimization. 2011-08-02 Kai Tietz kti...@redhat.com

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther richard.guent...@gmail.com: On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch removes in forward-propagation useless comparisons X != 0 and X != ~0 for boolean-typed X.  For one-bit precision typed X we simplifiy X == 0

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther richard.guent...@gmail.com: On Tue, Aug 2, 2011 at 3:14 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/8/2 Richard Guenther richard.guent...@gmail.com: On Tue, Aug 2, 2011 at 12:17 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch removes in forward

Re: [patch tree-optimization]: Add cleanup code for possible unused statements in binary optimization

2011-08-02 Thread Kai Tietz
2011/8/2 Richard Guenther richard.guent...@gmail.com: On Tue, Aug 2, 2011 at 12:39 PM, Kai Tietz ktiet...@googlemail.com wrote: Thanks, yes, I noticed that. Patch adjusted for cfg_tree. ChangeLog 2011-08-02  Kai Tietz  kti...@redhat.com        * tree-ssa-forwprop.c (simplify_bitwise_binary

Re: [patch tree-optimization]: Avoid !=/== 0/1 comparisons for boolean-typed argument

2011-08-02 Thread Kai Tietz
Sorry, had a pasto in testcase. Fixed at rev. 166205 2011-08-02 Kai Tietz kti...@redhat.com PR middle-end/49947 * gcc.dg/tree-ssa/forwprop-15.c Tested on x86_64-pc-linux-gnu. Applied as obvious fix. Regards, Kai Index: gcc.dg/tree-ssa/forwprop-15.c

[patch tree-optimization]: Improve reassociation pass for bitwise-operations

2011-08-02 Thread Kai Tietz
-not expressions like ~(A B) - ~A | ~B, ~(A B) - ~A | ~B, and ~(A ^ B) - A ^ ~B. These expansion are just temporary for this pass and getting later by fold reversed again back to their original form. ChangeLog 2011-08-02 Kai Tietz kti...@redhat.com * tree-ssa-reassoc.c (gimple build_and_add_sum

[patch tree-optimization]: Fix for PR/49806

2011-07-29 Thread Kai Tietz
Hello, this patch fixes regression of bug report PR middle-end/49806, which was caused due unhandled type-cast patterns reasoned by boolification of compares and type-cast preserving from/to boolean types. ChangeLog 2011-07-29 Kai Tietz kti...@redhat.com PR middle-end/49806

Re: [patch tree-optimization]: Move tree-vrp to use binary instead of truth-expressions

2011-07-27 Thread Kai Tietz
I adjusted logic in patch for interger zero/all-one case for bit and/or. By simply copying the variable operand to destination, without checking for valid ranges for and-expression with all-ones and or-expression with zero operand, logic could be simplified pretty much. I adjusted names for

[patch i386]: Allow attribute ms_abi/sysv_abi for 32-bit

2011-07-27 Thread Kai Tietz
pointer default. ChangeLog 2011-07-27 Kai Tietz kti...@redhat.com * config/i386/i386.c (ix86_option_override_internal): Allow -mabi for 32-bit, too. (ix86_handle_abi_attribute): Allow function attributes ms_abi/sysv_abi in 32-bit mode, too. * doc/extend.texi

Re: [patch tree-optimization]: Move tree-vrp to use binary instead of truth-expressions

2011-07-25 Thread Kai Tietz
Hello, this patch removes TRUTH-binary expressions and adjusts some places about bitwise-binary-expressions. ChangeLog gcc 2011-07-25 Kai Tietz kti...@redhat.com * tree-vrp.c (extract_range_from_binary_expr): Remove TRUTH-binary cases and add new bitwise cases

Re: [patch tree-optimization]: Move tree-vrp to use binary instead of truth-expressions

2011-07-22 Thread Kai Tietz
2011/7/21 Richard Guenther richard.guent...@gmail.com: On Thu, Jul 21, 2011 at 3:09 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this patch changes TRUTH-expression patterns into BIT-expression ones and adjusts code-flow for this. ChangeLog gcc 2011-07-21  Kai Tietz  kti

[patch tree-optimization]: Bind scan-direction in substitute_and_fold with DCE

2011-07-21 Thread Kai Tietz
2011-07-21 Kai Tietz kti...@redhat.com * tree-ssa-propagate.c (substitute_and_fold): Use do_dce flag to deside, if BB's statements are scanned in last to first, or first to last order. Bootstrapped and regression tested for all standard languages (including Ada and Obj-C

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-21 Thread Kai Tietz
Hello, Updated and again merged variant of this patch. We have now just two vrp related regressions by this patch, and it is addressed already by a posted one. 2011-07-21 Kai Tietz kti...@redhat.com * fold-const.c (fold_unary_loc): Preserve indirect comparison cast to none

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-21 Thread Kai Tietz
2011/7/21 Richard Guenther richard.guent...@gmail.com: With these two changes the patch is ok to commit (it will also regress gcc.target/i386/andor-2.c but that is an exact duplicate of the already regressed gcc.dg/tree-ssa/vrp47.c). Thanks, Richard. Ok, retested with your comments and

[patch tree-optimization]: Move tree-vrp to use binary instead of truth-expressions

2011-07-21 Thread Kai Tietz
Hello, this patch changes TRUTH-expression patterns into BIT-expression ones and adjusts code-flow for this. ChangeLog gcc 2011-07-21 Kai Tietz kti...@redhat.com * tree-vrp.c (extract_range_from_binary_expr): Convert truth expression to bimary expression

[patch tree-optimization]: Fix regression about vrp47.c (and co)

2011-07-21 Thread Kai Tietz
; This fixes known vrp47.c regression. ChangeLog gcc 2011-07-21 Kai Tietz kti...@redhat.com * tree-vrp.c (ssa_name_get_inner_ssa_name_p): New helper. (ssa_name_get_cast_to_p): Likewise. (simplify_truth_ops_using_ranges): Try to use type-cast for simplification of bitwise

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-20 Thread Kai Tietz
2011/7/20 Richard Guenther richard.guent...@gmail.com: On Wed, Jul 20, 2011 at 3:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this is the revised version of the partial pre-approved patch for preserving type-casts from/to boolean-types.  It fixes additionally the regression in tree

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-20 Thread Kai Tietz
2011/7/20 Richard Guenther richard.guent...@gmail.com: On Wed, Jul 20, 2011 at 3:31 PM, Kai Tietz ktiet...@googlemail.com wrote: 2011/7/20 Richard Guenther richard.guent...@gmail.com: On Wed, Jul 20, 2011 at 3:05 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this is the revised version

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-19 Thread Kai Tietz
by vectorization pass, which can't handle different types for vectorization, as now the conditions are always boolean-typed. ChangeLog 2011-07-19 Kai Tietz kti...@redhat.com * fold-const.c (fold_unary_loc): Preserve non-boolean-typed casts. * gimplify.c (gimple_boolify): Handle

Re: [patch tree-optimization]: [2 of 3]: Boolify compares more

2011-07-19 Thread Kai Tietz
2011/7/19 Richard Guenther richard.guent...@gmail.com: On Tue, Jul 19, 2011 at 1:27 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, So this is the updated patch for boolifying of comparisons.  There are two different kind of regression caused by this.  One is fixed by the VRP patch I've

Re: [patch tree-optimization]: [3 of 3]: Boolify compares more

2011-07-15 Thread Kai Tietz
. In substitute_and_fold the scan-direction of statements within a BB is controlled now by its do_dce flag. This provides better results in vrp-pass. ChangeLog gcc 2011-07-15 Kai Tietz kti...@redhat.com * tree-ssa-propagate.c (substitute_and_fold): Use do_dce flag to deside, if BB's statements

[patch 1/8 tree-optimization]: Bitwise logic for fold_truth_not_expr

2011-07-13 Thread Kai Tietz
precision typed bitwise-binary and bitwise-not expressions. ChangeLog 2011-07-13 Kai Tietz kti...@redhat.com * fold-const.c (fold_truth_not_expr): Add support for one-bit bitwise operations. Bootstrapped and regression tested for x86_64-pc-linux-gnu. Ok for apply? Regards, Kai Index

<    1   2   3   4   5   6   7   8   >