Re: [C++ Patch] PR 32614

2011-10-17 Thread Richard Guenther
On Mon, 17 Oct 2011, Paolo Carlini wrote: > On 10/17/2011 12:26 PM, Gabriel Dos Reis wrote: > > On Mon, Oct 17, 2011 at 4:42 AM, Paolo Carlini > > wrote: > > > FWIW, I still believe that tweaking the documentation to match the long > > > standing reality, would be a small improvement. I'm not goin

Re: [C++ Patch] PR 32614

2011-10-17 Thread Richard Guenther
On Mon, 17 Oct 2011, Gabriel Dos Reis wrote: > On Mon, Oct 17, 2011 at 5:53 AM, Richard Guenther wrote: > > On Mon, 17 Oct 2011, Paolo Carlini wrote: > > > >> On 10/17/2011 12:26 PM, Gabriel Dos Reis wrote: > >> > On Mon, Oct 17, 2011 at 4:42 AM, Paolo Ca

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

2011-10-17 Thread Richard Guenther
On Mon, Oct 17, 2011 at 12:59 PM, Kai Tietz wrote: > 2011/10/17 Richard Guenther : >> On Fri, Oct 14, 2011 at 9:43 PM, Kai Tietz wrote: >>> Hello, >>> >>> So I committed the gimplify patch separate.  And here is the remaining >>> fold-const patch. &g

Re: [C++ Patch] PR 32614

2011-10-17 Thread Richard Guenther
On Mon, 17 Oct 2011, Gabriel Dos Reis wrote: > On Mon, Oct 17, 2011 at 6:08 AM, Richard Guenther wrote: > > > The initial patch, split between rev. 31343 and 31999 indeed added > > Thanks for helping tracking history. > > > +  /* Enable automat

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

2011-10-17 Thread Richard Guenther
On Mon, Oct 17, 2011 at 1:31 PM, Kai Tietz wrote: > 2011/10/17 Richard Guenther : >> On Mon, Oct 17, 2011 at 12:59 PM, Kai Tietz wrote: >>> 2011/10/17 Richard Guenther : >>>> On Fri, Oct 14, 2011 at 9:43 PM, Kai Tietz wrote: >>>>> Hello, >>&

[PATCH][RFC] "Fix" PR50716, override type alignment knowledge

2011-10-17 Thread Richard Guenther
w). Bootstrap and regtest scheduled on x86_64-unknown-linux-gnu. Any comments? Thanks, Richard. 2011-10-17 Richard Guenther PR middle-end/50716 * expr.c (get_object_or_type_alignment): New function. (expand_assignment): Use it. (expand_expr_real_1): Li

[PATCH] Fix PR50729

2011-10-17 Thread Richard Guenther
This fixes PR50729, so much for not implementing it by using value-ranges ... opens up the door for more bugs ;) Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2011-10-17 Richard Guenther PR tree-optimization/50729 * tree-vrp.c

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

2011-10-17 Thread Richard Guenther
On Mon, Oct 17, 2011 at 2:22 PM, Kai Tietz wrote: > 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), >                

Re: [PATCH] Simplify and fix restrict handling

2011-10-17 Thread Richard Guenther
On Fri, 14 Oct 2011, Richard Guenther wrote: > > This follows up Michas testcase where we fail to handle the > conservatively propagated restrict tags properly. The following > patch simplifies handling of restrict in the oracle and thus > only excludes NONLOCAL (as designed),

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

2011-10-17 Thread Richard Guenther
On Mon, Oct 17, 2011 at 3:36 PM, Kai Tietz wrote: > 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

Re: [PATCH][RFC] "Fix" PR50716, override type alignment knowledge

2011-10-18 Thread Richard Guenther
On Mon, 17 Oct 2011, Eric Botcazou wrote: > > 2011-10-17 Richard Guenther > > > > PR middle-end/50716 > > * expr.c (get_object_or_type_alignment): New function. > > (expand_assignment): Use it. > > (expand_expr_real_1): Likewise. > >

Re: [PATCH] Add capability to run several iterations of early optimizations

2011-10-18 Thread Richard Guenther
On Tue, Oct 18, 2011 at 1:45 AM, Maxim Kuvyrkov wrote: > On 13/10/2011, at 12:58 AM, Richard Guenther wrote: > >> On Wed, Oct 12, 2011 at 8:50 AM, Maxim Kuvyrkov >> wrote: >>> The following patch adds new knob to make GCC perform several iterations of >>&

Re: [PATCH] Simplify and fix restrict handling

2011-10-18 Thread Richard Guenther
On Mon, 17 Oct 2011, Richard Guenther wrote: > On Fri, 14 Oct 2011, Richard Guenther wrote: > > > > > This follows up Michas testcase where we fail to handle the > > conservatively propagated restrict tags properly. The following > > patch simplifies handling of r

[PATCH] Fix PR50767

2011-10-18 Thread Richard Guenther
This fixes an oversight of my patch folding the added stmt in PRE - failing to update it. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2011-10-18 Richard Guenther PR tree-optimization/50767 * tree-ssa-pre.c (create_expression_by_pieces): Update

Re: [4.6] Fix type of SRAed enum accesses

2011-10-19 Thread Richard Guenther
On Tue, Oct 18, 2011 at 2:21 PM, Jakub Jelinek wrote: > On Tue, Sep 27, 2011 at 03:26:03PM +0100, Richard Sandiford wrote: >> This patch fixes a miscompilation of stage1 c-parser.o in an ARM bootstrap. >> When an access to an enum field was SRAed, a component ref used the type >> of the integer te

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

2011-10-19 Thread Richard Guenther
On Tue, Oct 18, 2011 at 1:33 PM, Kai Tietz wrote: > 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 > >

Re: [PATCH] Fix gcc.dg/guality/asm-1.c regressions on 4.6 branch

2011-10-19 Thread Richard Guenther
On Tue, Oct 18, 2011 at 5:37 PM, Jakub Jelinek wrote: > Hi! > > Apparently a recent change (2011-10-1[23] or so) regressed > gcc.dg/guality/asm-1.c test on x86_64-linux on the 4.6 branch. > This turned out to be a bug in loc_descriptor which has been passing wrong > mode on the recursive call, so

Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.

2011-10-19 Thread Richard Guenther
On Wed, Oct 19, 2011 at 1:58 AM, Maxim Kuvyrkov wrote: > On 29/09/2011, at 10:23 PM, Richard Guenther wrote: > >> On Thu, Sep 29, 2011 at 10:27 AM, Tom de Vries >> wrote: > >> +              && SSA_NAME_IS_DEFAULT_DEF (expr) >> +    

[PATCH] Fix PR50768, rewrite gimplify_and_update_call_from_tree

2011-10-19 Thread Richard Guenther
second stage. Also doing the lhs assignment processing upfront which removes the need for all the duplicate code at the tail. Bootstrap and regtest ongoing on x86_64-unknown-linux-gnu, let's hope it can stay this simple ;) Thanks, Richard. 2011-10-19 Richard Guenther PR middle-end/

[PATCH] Fix PR50780, make comparisons able to throw again ...

2011-10-19 Thread Richard Guenther
. Bootstrap and regtest running on x86_64-unknown-linux-gnu ... Richard. 2011-10-19 Richard Guenther PR middle-end/50780 * tree-ssa-forwprop.c (forward_propagate_into_cond): Verify the condition is properly gimple before using it. * tree-eh (stmt_could_throw_1_p

Re: [PATCH, PR50769] Fix ICE in phi_alternatives_equal.

2011-10-19 Thread Richard Guenther
On Wed, Oct 19, 2011 at 10:23 AM, Tom de Vries wrote: > Richard, > > For the example from the PR, -ftree-tail-merge discovers that blocks 6 and 7 > are > equal, removes block 7 and redirects the outgoing edge of it's predecessor > block > 11 to block 6. > > Block 6 contains a phi, which after re

[PATCH] Loop IM cost TLC

2011-10-20 Thread Richard Guenther
We've got new tree codes, the following makes Loop IM cost consider those expensive that make sense. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-10-19 Richard Guenther * tree-ssa-loop-im.c (stmt_cost): Add WIDEN_*, FMA_EXPR and rotates t

Re: [PATCH] Account for devirtualization opportunities in inliner

2011-10-20 Thread Richard Guenther
On Wed, Oct 19, 2011 at 11:59 PM, Maxim Kuvyrkov wrote: > On 28/09/2011, at 4:56 PM, Maxim Kuvyrkov wrote: > >> Jan, >> >> The following patch starts a series of patches which improve >> devirtualization optimizations in GCC. >> >> This patch builds on ipa-cp.c and ipa-prop.c infrastructure for a

Re: Avoid gcc.dg/tree-prof/val-prof-7.c dependence on

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 1:25 AM, Joseph S. Myers wrote: > The testcase gcc.dg/tree-prof/val-prof-7.c includes to get > a declaration of bzero.  This causes it to fail on targets where bzero > (a legacy function removed in the latest version of POSIX) is not > declared in that header; declaring it

Re: new patches using -fopt-info (issue5294043)

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 1:33 AM, Andi Kleen wrote: > x...@google.com (Rong Xu) writes: > >> After some off-line discussion, we decided to use a more general approach >> to control the printing of optimization messages/warnings. We will >> introduce a new option -fopt-info: >>  * fopt-info=0 or fno

Re: Avoid -mno-accumulate-outgoing-args in tests on Windows target

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 2:03 AM, Joseph S. Myers wrote: > The -mno-accumulate-outgoing-args option does not work with the stack > probing used on Windows targets, giving a warning and so causing tests > using that option to fail.  This patch makes three tests not use that > option on affected targ

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 9:24 AM, Andi Kleen wrote: > From: Andi Kleen > > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most > convenient way to get this into existing Makefiles is using small > wrappers that pass the plugin. This matches how other compilers > (LLVM, icc) do thi

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 10:56 AM, Jan Hubicka wrote: >> On Thu, Oct 20, 2011 at 9:24 AM, Andi Kleen wrote: >> > From: Andi Kleen >> > >> > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most >> > convenient way to get this into existing Makefiles is using small >> > wrappers tha

Re: Honnor -fno-topleverl-reorder with whopr for vars and functions

2011-10-20 Thread Richard Guenther
gt; +orderb = VEC_index (cgraph_node_ptr, pb->cgraph_set->nodes, 0)->order; > + else if (VEC_length (varpool_node_ptr, pb->varpool_set->nodes)) > +orderb = VEC_index (varpool_node_ptr, pb->varpool_set->nodes, 0)->order; > + return orderb - ordera; > +} > + > /* Write all output files in WPA mode and the file with the list of > LTRANS units. */ > > @@ -2191,7 +2284,12 @@ lto_wpa_write_files (void) >blen = strlen (temp_filename); > >n_sets = VEC_length (ltrans_partition, ltrans_partitions); > - VEC_qsort (ltrans_partition, ltrans_partitions, cmp_partitions); > + > + /* Sort partitions by size so small ones are compiled last. > + FIXME: Even when not reordering we may want to output one list for > parallel make > + and other for final link command. */ > + VEC_qsort (ltrans_partition, ltrans_partitions, > + flag_toplevel_reorder ? cmp_partitions_size : cmp_partitions_order); >for (i = 0; i < n_sets; i++) > { >size_t len; > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

Re: [PATCH] Extend vect_recog_bool_pattern also to stores into bool memory (PR tree-optimization/50596)

2011-10-20 Thread Richard Guenther
if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f2 (); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f3 (); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 || ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f4 (); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 || ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f5 (k); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f6 (k); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f7 (k); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 || ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + f8 (k); > + for (i = 0; i < N; i++) > +if (k[i] != ((i % 3) == 0 || ((i / 9) % 3) == 0)) > + abort (); > + __builtin_memset (k, 0, sizeof (k)); > + > + return 0; > +} > + > +/* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 8 "vect" } } > */ > +/* { dg-final { cleanup-tree-dump "vect" } } */ > > Jakub > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

Re: [patch] dwarf2out crash: missing GTY? (PR 50806)

2011-10-20 Thread Richard Guenther
On Thu, Oct 20, 2011 at 12:14 PM, Jan Kratochvil wrote: > Hi, > > with custom patched dwarf2out.c I got a crash on memory mangled by the garbage > collector.  With patched GTY there the crash no longer happened - but I do not > have a reproducer anymore, sorry if it is a bogus patch. > > The memor

Re: new patches using -fopt-info (issue5294043)

2011-10-21 Thread Richard Guenther
On Thu, Oct 20, 2011 at 7:11 PM, Xinliang David Li wrote: > On Thu, Oct 20, 2011 at 1:21 AM, Richard Guenther > wrote: >> On Thu, Oct 20, 2011 at 1:33 AM, Andi Kleen wrote: >>> x...@google.com (Rong Xu) writes: >>> >>>> After some off-line discussion,

Fwd: [patch] Fix PR tree-optimization/49960 ,Fix self data dependence

2011-10-21 Thread Richard Guenther
Forwarded to the list, gcc.gnu.org doesn't like gmail anymore. -- Forwarded message -- From: Richard Guenther Date: Fri, Oct 21, 2011 at 11:03 AM Subject: Re: [patch] Fix PR tree-optimization/49960 ,Fix self data dependence To: Razya Ladelsky Cc: gcc-patches@gcc.gnu.org

Re: [PATCH, PR50763] Fix for ICE in verify_gimple

2011-10-21 Thread Richard Guenther
On Thu, Oct 20, 2011 at 3:48 PM, Tom de Vries wrote: > Richard, > > I have a fix for PR50763. > > The second example from the PR looks like this: > ... > int bar (int i); > > void > foo (int c, int d) > { >  if (bar (c)) >    bar (c); >  d = 33; >  while (c == d); > } > ... > > When compiled with

Re: [PATCH] Extend vect_recog_bool_pattern also to stores into bool memory (PR tree-optimization/50596)

2011-10-21 Thread Richard Guenther
On Thu, Oct 20, 2011 at 12:31 PM, Jakub Jelinek wrote: > On Thu, Oct 20, 2011 at 11:42:01AM +0200, Richard Guenther wrote: >> > +  if (TREE_CODE (scalar_dest) == VIEW_CONVERT_EXPR >> > +      && is_pattern_stmt_p (stmt_info)) >> > +    scalar_dest = TRE

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

2011-10-21 Thread Richard Guenther
On Thu, Oct 20, 2011 at 3:08 PM, Kai Tietz 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 > boolean-types are preserved, but FE might expands simple-expression to

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-21 Thread Richard Guenther
On Tue, Oct 18, 2011 at 4:14 PM, William J. Schmidt wrote: > Greetings, > > Here is a new revision of the tree portions of this patch.  I moved the > pattern recognizer to expand, and added additional logic to look for the > same pattern in gimple form.  I added two more tests to verify the new >

Re: [PATCH 1/3] Add missing page rounding of a page_entry

2011-10-21 Thread Richard Guenther
On Fri, Oct 21, 2011 at 7:52 AM, Andi Kleen wrote: > From: Andi Kleen > > This one place in ggc forgot to round page_entry->bytes to the > next page boundary, which lead to all the heuristics in freeing to > check for continuous memory failing. Round here too, like all other > allocators already

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-21 Thread Richard Guenther
On Fri, Oct 21, 2011 at 7:52 AM, Andi Kleen wrote: > From: Andi Kleen > > This implements the freeing back of large chunks in the ggc madvise path > Richard Guenther asked for.  This way on systems with limited > address space malloc() and other allocators still have > a cha

Re: [C++ Patch] __builtin_choose_expr *bump*

2011-10-21 Thread Richard Guenther
On Fri, Oct 21, 2011 at 11:57 AM, Andy Gibbs wrote: > Hi, > > Please can I "bump" this patch and ask for it to be approved and committed: > http://gcc.gnu.org/ml/gcc-patches/2011-10/msg01711.html > > The patch is to implement the C built-in function __builtin_choose_expr(...) > in C++. > > I'm afr

Re: [patch] Fix inconsistency in invert_tree_comparison

2011-10-23 Thread Richard Guenther
On Sun, Oct 23, 2011 at 10:56 AM, Eric Botcazou wrote: > Hi, > > the comment of the function reads: > > /* Given a tree comparison code, return the code that is the logical inverse >   of the given code.  It is not safe to do this for floating-point >   comparisons, except for NE_EXPR and EQ_EXPR,

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

2011-10-23 Thread Richard Guenther
On Fri, Oct 21, 2011 at 2:19 PM, Kai Tietz wrote: > 2011/10/21 Richard Guenther : >> On Thu, Oct 20, 2011 at 3:08 PM, Kai Tietz wrote: >>> Hello, >>> >>> this patch re-enables the branch-cost optimization on simple boolean-typed >>> operands, whi

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-23 Thread Richard Guenther
On Fri, Oct 21, 2011 at 2:22 PM, William J. Schmidt wrote: > > > On Fri, 2011-10-21 at 11:26 +0200, Richard Guenther wrote: >> On Tue, Oct 18, 2011 at 4:14 PM, William J. Schmidt >> wrote: > > > >> > + >> > +  /* We don't use get_def_for_exp

Re: new patches using -fopt-info (issue5294043)

2011-10-23 Thread Richard Guenther
On Fri, Oct 21, 2011 at 6:48 PM, Xinliang David Li wrote: > There are two proposals here. One is -fopt-info which prints out > informational notes to stderr, and the other is -fopt-report which is > more elaborate form of dump files. Are you object to both or just the > opt-report one? What? I'm

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-23 Thread Richard Guenther
On Fri, Oct 21, 2011 at 8:30 PM, Andi Kleen wrote: >> > diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c >> > index ba88e3f..eb0eeef 100644 >> > --- a/gcc/ggc-page.c >> > +++ b/gcc/ggc-page.c >> > @@ -972,6 +972,54 @@ release_pages (void) >> >   page_entry *p, *start_p; >> >   char *start; >> >   size

Re: [PATCH 2/3] Free large chunks in ggc

2011-10-23 Thread Richard Guenther
On Sun, Oct 23, 2011 at 12:23 PM, Richard Guenther wrote: > On Fri, Oct 21, 2011 at 8:30 PM, Andi Kleen wrote: >>> > diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c >>> > index ba88e3f..eb0eeef 100644 >>> > --- a/gcc/ggc-page.c >>> > +++ b/gcc/

Re: new patches using -fopt-info (issue5294043)

2011-10-24 Thread Richard Guenther
On Sun, Oct 23, 2011 at 7:28 PM, Xinliang David Li wrote: > On Sun, Oct 23, 2011 at 3:18 AM, Richard Guenther > wrote: >> On Fri, Oct 21, 2011 at 6:48 PM, Xinliang David Li >> wrote: >>> There are two proposals here. One is -fopt-info which prints out >>> in

Re: [RFA:] fix breakage with "Update testsuite to run with slim LTO"

2011-10-24 Thread Richard Guenther
On Fri, Oct 21, 2011 at 1:56 PM, Rainer Orth wrote: > Iain Sandoe writes: > >> It looks like the gnat testsuite is also broken - but HP's fix doesn't >> recover that. >> .. will try and take a look - but short on time today, > > I think I see what's going on: in gnat.log, I find > > Running /vol/

[PATCH] Fix PR50838

2011-10-24 Thread Richard Guenther
This fixes PR50838. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-10-24 Richard Guenther PR tree-optimization/50838 * tree-data-ref.c (dr_analyze_indices): Properly canonicalize a MEM_REF base if we change it. * gcc.dg/torture

Re: [PATCH] Extend vect_recog_bool_pattern also to stores into bool memory (PR tree-optimization/50596)

2011-10-24 Thread Richard Guenther
On Thu, 20 Oct 2011, Jakub Jelinek wrote: > On Thu, Oct 20, 2011 at 11:42:01AM +0200, Richard Guenther wrote: > > > + if (TREE_CODE (scalar_dest) == VIEW_CONVERT_EXPR > > > + && is_pattern_stmt_p (stmt_info)) > > > +scalar_dest = TREE_OPERAND (s

[PATCH][RFC] Simple IPA mod-ref analysis

2011-10-24 Thread Richard Guenther
need to know whether parameters may reach calls, and in which position - something that looks more close to IPA CP than IPA pure-const. Not yet bootstrapped or tested other than on the simple testcase. Any comments? Thanks, Richard. 2011-10-24 Richard Guenther * gimple.c

Re: [PATCH] Extend vect_recog_bool_pattern also to stores into bool memory (PR tree-optimization/50596)

2011-10-24 Thread Richard Guenther
On Mon, 24 Oct 2011, Richard Guenther wrote: > On Thu, 20 Oct 2011, Jakub Jelinek wrote: > > > On Thu, Oct 20, 2011 at 11:42:01AM +0200, Richard Guenther wrote: > > > > + if (TREE_CODE (scalar_dest) == VIEW_CONVERT_EXPR > > > > + && is_pattern_

Re: [PATCH] Extend vect_recog_bool_pattern also to stores into bool memory (PR tree-optimization/50596, take 2)

2011-10-25 Thread Richard Guenther
On Mon, 24 Oct 2011, Jakub Jelinek wrote: > On Mon, Oct 24, 2011 at 04:09:49PM +0200, Richard Guenther wrote: > > This one bootstraps and regtests fine on x86_64-unknown-linux-gnu. > > I didn't find a good pattern to split out, eventually how we call > > the vectorizab

Re: new patches using -fopt-info (issue5294043)

2011-10-25 Thread Richard Guenther
On Mon, Oct 24, 2011 at 6:27 PM, Xinliang David Li wrote: >> Well, you seem to keep not reading what I write.  I am not opposed >> to adding -fopt-info/report nor to funnel messages to stdout/err.  What >> I am opposed is the way you want to introduce them.  I want you to >> fix what we dump into

Re: [PATCH 0/6] More vector permutation work

2011-10-25 Thread Richard Guenther
On Tue, Oct 25, 2011 at 2:17 AM, Richard Henderson wrote: > The Idea with this patch set is to re-arrange vector permutation > so that it can be used to implement other patterns automatically. > > In particular, Altivec, SPU currently have (and Sparc VIS would need) > a large amount of boilerplate

[PATCH][1/n] LTO option handling reorg

2011-10-25 Thread Richard Guenther
pending on x86_64-unknown-linux-gnu. Joseph, does this look like a sensible use of the common machinery? Do we want the init from COLLECT_GCC_OPTIONS in opts-common.c instead? Thanks, Richard. 2011-10-25 Richard Guenther * Makefile.in (lto-wrapper): Depend on and link against

Re: [PATCH][1/n] LTO option handling reorg

2011-10-25 Thread Richard Guenther
On Tue, 25 Oct 2011, Richard Guenther wrote: > > This moves lto-wrapper over to use common option processing to > parse and re-emit options from COLLECT_GCC_OPTIONS. In a second > step I will move the merging/complaining about different options > in different LTO input files to

Re: [PATCH][1/n] LTO option handling reorg

2011-10-26 Thread Richard Guenther
On Tue, 25 Oct 2011, Joseph S. Myers wrote: > On Tue, 25 Oct 2011, Richard Guenther wrote: > > > Joseph, does this look like a sensible use of the common > > machinery? Do we want the init from COLLECT_GCC_OPTIONS > > in opts-common.c instead? > > Certainly there

Re: new patches using -fopt-info (issue5294043)

2011-10-26 Thread Richard Guenther
On Tue, Oct 25, 2011 at 9:30 PM, Xinliang David Li wrote: > > > On Tue, Oct 25, 2011 at 1:02 AM, Richard Guenther > wrote: >> >> On Mon, Oct 24, 2011 at 6:27 PM, Xinliang David Li >> wrote: >> >> Well, you seem to keep not reading what I write.  I

Re: [PATCH,PR50763] Follow-up patch to fix i686 bootstrap failure

2011-10-26 Thread Richard Guenther
On Tue, Oct 25, 2011 at 2:15 PM, Tom de Vries wrote: > Richard, > > I have a patch for the i686 bootstrap problem reported in PR50763 comment 10. > > pr50763-2.c looks like this before tail_merge_optimize: > ... > std_canonical_va_list_type (union tree_node * typeD.1608) > { >  _BoolD.1576 pretmp.

Re: [PATCH, PR43814] Assume function arguments of pointer type are aligned.

2011-10-26 Thread Richard Guenther
On Tue, Oct 25, 2011 at 2:22 PM, Tom de Vries wrote: > On 09/24/2011 01:42 PM, Richard Guenther wrote: >> On Sat, Sep 24, 2011 at 11:40 AM, Jakub Jelinek wrote: >>> On Sat, Sep 24, 2011 at 11:31:25AM +0200, Richard Guenther wrote: >>>> In the end I'd proba

[PATCH] Fix lto-wrapper obstack handling

2011-10-26 Thread Richard Guenther
Seems only in some cases we fault freeing an uninitialized obstack. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-10-26 Richard Guenther * lto-wrapper.c (run_gcc): Properly init/free obstack. Index: gcc/lto-wrapper.c

[PATCH][RFC] Re-write LTO option merging

2011-10-26 Thread Richard Guenther
ts? Thanks, Richard. 2011-10-26 Richard Guenther * lto-opts.c: Re-implement. * lto-streamer.h (lto_register_user_option): Remove. (lto_read_file_options): Likewise. (lto_reissue_options): Likewise. (lto_clear_user_options): Likewise. (lto_clear_fil

Re: [PATCH][RFC] Re-write LTO option merging

2011-10-27 Thread Richard Guenther
On Wed, 26 Oct 2011, Mike Stump wrote: > On Oct 26, 2011, at 6:10 AM, Richard Guenther wrote: > > This completely rewrites LTO option merging. > > > Any comments? > > Wondering if It breaks darwin? > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50876 > > We

Re: [PATCH][RFC] Re-write LTO option merging

2011-10-27 Thread Richard Guenther
On Wed, 26 Oct 2011, Richard Guenther wrote: > > This completely rewrites LTO option merging. At compile (uselessly > now at WPA?) time we now stream a COLLECT_GCC_OPTIONS like string > as it comes from argv of the compiler binary. Those options are > read in by the LTO driv

Re: [PATCH, devirtualization] Detect the new type in type change detection

2011-10-27 Thread Richard Guenther
On Thu, Oct 27, 2011 at 1:22 AM, Martin Jambor wrote: > Hi, > > I've been asked by Maxim Kuvyrkov to revive the following patch which > has not made it to 4.6.  Currently, when type based devirtualization > detects a potential type change, it simply gives up on gathering any > information on the o

Re: [PATCH][RFC] Re-write LTO option merging

2011-10-27 Thread Richard Guenther
On Wed, 26 Oct 2011, Joseph S. Myers wrote: > On Wed, 26 Oct 2011, Richard Guenther wrote: > > > Index: trunk/gcc/opts-global.c > > === > > *** trunk.orig/gcc/opts-global.c2011-10-26 13:46:24.0

GCC 4.7.0 Status Report (2011-10-27), Stage 1 will end Nov 7th

2011-10-27 Thread Richard Guenther
that are not included in the list of primary and secondary targets. Previous Report === http://gcc.gnu.org/ml/gcc/2011-10/msg00177.html The next report will be sent by Jakub. -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF

[PATCH] Fix PR50731

2011-10-27 Thread Richard Guenther
We failed to handle the case of a scalar shift operand in do_binop. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2010-10-27 Richard Guenther PR middle-end/50731 * tree-vect-generic.c (do_binop): Handle scalar operands. Index: gcc/tree-vect

Re: [PATCH] Pass through jump functions for addressable (scalar) parameters

2011-10-27 Thread Richard Guenther
On Wed, Oct 26, 2011 at 8:25 PM, Martin Jambor wrote: > Hi, > > Honza requested that we do attempt to produce pass-through jump > functions even when the actual formal parameter that is being passed > on is addressable - provided that we can prove it has not changed > value, of course.  The follow

[PATCH] Fix PR50876

2011-10-27 Thread Richard Guenther
drivers instead of trying to allocate the right amount of space upfront. LTO Bootstrap and regtest running on x86_64-unknown-linux-gnu, I'll commit this tomorrow if that succeeded. Richard. 2010-10-28 Richard Guenther PR driver/50876 * lto-wrap

Re: [PATCH i386] PR47698 no CMOV for volatile mem

2011-10-28 Thread Richard Guenther
On Thu, 27 Oct 2011, Uros Bizjak wrote: > Hello! > > > Here's a patch for PR47698, which is about CMOV should not be > > generated for memory address marked as volatile. > > Successfully bootstrapped and passed make check on x86_64-unknown-linux-gnu. > > > PR rtl-optimization/47698 >

Re: [PATCH] Don't ICE on long long shifts in vectorizable_shift

2011-10-28 Thread Richard Guenther
fprintf (vect_dump, "unusable type for last operand in" > + " vector/vector shift/rotate."); > + return false; > + } > } >/* See if the machine has a vector shifted by scalar insn and if not > then see if it has a vector shifted by vector insn. */ > > Jakub > > -- Richard Guenther SUSE / SUSE Labs SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

Re: [PATCH] Miscompilation of __attribute__((constructor)) functions.

2011-10-28 Thread Richard Guenther
On Thu, Oct 27, 2011 at 7:24 PM, Paul Brook wrote: > Patch below fixes a miscompilation observed whem building uclibc libpthread on > a mips-linux system. > > The story start with the ipa-split optimization, which turns: > > void fn() > { >  if (cond) { >    DO_STUFF; >  } > } > > into: > > static

Re: [PATCH] Pass through jump functions for addressable (scalar) parameters

2011-10-28 Thread Richard Guenther
On Thu, Oct 27, 2011 at 9:11 PM, Martin Jambor wrote: > Hi, > > On Thu, Oct 27, 2011 at 03:07:10PM +0200, Richard Guenther wrote: >> On Wed, Oct 26, 2011 at 8:25 PM, Martin Jambor wrote: >> > Hi, >> > >> > >> > >> > 2011-10-26  Martin J

Re: [PATCH] Add capability to run several iterations of early optimizations

2011-10-28 Thread Richard Guenther
On Thu, Oct 27, 2011 at 11:53 PM, Matt wrote: Then you'd have to analyze the compile-time impact of the IPA splitting on its own when not iterating. ?Then you should look at what actually was the optimizations that were performed that lead to the improvement (I can see some ind

Re: [PATCH] Don't ICE on long long shifts in vectorizable_shift

2011-10-28 Thread Richard Guenther
On Fri, 28 Oct 2011, Jakub Jelinek wrote: > On Fri, Oct 28, 2011 at 10:22:15AM +0200, Richard Guenther wrote: > > Hm, but you are testing vector modes in the path that is supposed to > > handle shifts by a scalar. That looks odd. Also it should be easy > > No, I'm t

Re: [PATCH, devirtualization] Detect the new type in type change detection

2011-10-28 Thread Richard Guenther
On Thu, Oct 27, 2011 at 9:54 PM, Martin Jambor wrote: > Hi, > > On Thu, Oct 27, 2011 at 11:06:02AM +0200, Richard Guenther wrote: >> On Thu, Oct 27, 2011 at 1:22 AM, Martin Jambor wrote: >> > Hi, >> > >> > I've been asked by Maxim Kuvyrkov to revive

Re: [PATCH] Add capability to run several iterations of early optimizations

2011-10-28 Thread Richard Guenther
; > On 18/10/2011, at 9:56 PM, Richard Guenther wrote: > >>>> >>>> If we'd want to iterate early optimizations we'd want to do it by iterating >>>> an IPA pass so that we benefit from more precise size estimates >>>> when trying

Re: [RFC PATCH] Gather vectorization (PR tree-optimization/50789)

2011-10-28 Thread Richard Guenther
On Fri, 28 Oct 2011, Jakub Jelinek wrote: > On Fri, Oct 28, 2011 at 02:01:36PM +0400, Kirill Yukhin wrote: > > this looks really cool. I have a liitle question, since I do not > > understand vectorizer as good. > > > > Say, we have a snippet: > > int *p; > > int idx[N]; > > int arr[M]; > > for (.

Re: [PATCH] Add gcc-ar/nm/ranlib wrappers for slim LTO v2

2011-10-28 Thread Richard Guenther
On Fri, Oct 21, 2011 at 1:55 AM, Andi Kleen wrote: > From: Andi Kleen > > Slim LTO requires running ar/nm/ranlib with the LTO plugin. The most > convenient way to get this into existing Makefiles is using small > wrappers that pass the plugin. This matches how other compilers > (LLVM, icc) do thi

Re: Another ggc anti fragmentation patchkit

2011-10-28 Thread Richard Guenther
On Sat, Oct 22, 2011 at 7:54 AM, Andi Kleen wrote: > This version addresses all earlier review comments. Passes bootstrap > and testing on x86-64. Ok? Ok. Thanks, Richard. > -Andi > >

Re: [RFC PATCH] Gather vectorization (PR tree-optimization/50789)

2011-10-28 Thread Richard Guenther
On Fri, 28 Oct 2011, Jakub Jelinek wrote: > On Fri, Oct 28, 2011 at 12:59:48PM +0200, Richard Guenther wrote: > > It is also because of re-use of memory via memcpy (yes, some dubious > > TBAA case from C, but essentially we don't want to break that). Thus > > we c

Re: [RFC PATCH] Gather vectorization (PR tree-optimization/50789)

2011-10-28 Thread Richard Guenther
On Fri, 28 Oct 2011, Richard Guenther wrote: > On Fri, 28 Oct 2011, Jakub Jelinek wrote: > > > On Fri, Oct 28, 2011 at 12:59:48PM +0200, Richard Guenther wrote: > > > It is also because of re-use of memory via memcpy (yes, some dubious > > > TBAA case from C, bu

[PATCH][2/n] LTO option handling/merging rewrite

2011-10-28 Thread Richard Guenther
we can think what would be the most sensible behavior (and maybe start tagging options in the .opt files so they get treatment based on some flag). LTO bootstrapped and tested on x86_64-unknown-linux-gnu, ok? Thanks, Richard. 2011-10-28 Richard Guenther * lto-opts.c: Re-implem

Re: [PATCH i386] PR47698 no CMOV for volatile mem

2011-10-28 Thread Richard Guenther
On Fri, 28 Oct 2011, Sergey Ostanevich wrote: > On Fri, Oct 28, 2011 at 12:16 PM, Richard Guenther wrote: > > On Thu, 27 Oct 2011, Uros Bizjak wrote: > > > >> Hello! > >> > >> > Here's a patch for PR47698, which is about CMOV should not be >

[PATCH] Fix early inliner inlining uninlinable functions

2011-10-28 Thread Richard Guenther
. Bootstrap and regtest running on x86_64-unknown-linux-gnu, ok? Thanks, Richard. 2010-10-28 Richard Guenther PR tree-optimization/50890 * gimple.h (gimple_fold_call): Remove. * gimple-fold.c (fold_stmt_1): Move all call related code to ... (gimple_fold_call

Re: [PATCH][RFC] Re-write LTO option merging

2011-10-29 Thread Richard Guenther
On Fri, Oct 28, 2011 at 4:42 PM, Diego Novillo wrote: > On 11-10-27 01:46 , Richard Guenther wrote: >> >> On Wed, 26 Oct 2011, Richard Guenther wrote: >> >>> >>> This completely rewrites LTO option merging.  At compile (uselessly >>> now at WPA

Re: [PATCH][2/n] LTO option handling/merging rewrite

2011-10-29 Thread Richard Guenther
On Fri, Oct 28, 2011 at 5:48 PM, Joseph S. Myers wrote: > On Fri, 28 Oct 2011, Richard Guenther wrote: > >> +       /* Fallthru.  */ >> +     case OPT_fPIC: >> +     case OPT_fpic: >> +     case OPT_fpie: >> +     case OPT_fcommon: >> +     case

Re: Patch committed: Use GNU/Linux in comment

2011-10-29 Thread Richard Guenther
On Sat, Oct 29, 2011 at 7:06 AM, Ian Lance Taylor wrote: > "Joseph S. Myers" writes: > >> On Fri, 28 Oct 2011, Ian Lance Taylor wrote: >> >>> This patch changes "Linux" to "GNU/Linux" in a comment.  Bootstrapped >>> and ran libiberty testsuite on x86_64-unknown-linux-gnu.  Committed to >>> mainli

Re: [PATCH] Fix early inliner inlining uninlinable functions

2011-10-30 Thread Richard Guenther
On Sat, Oct 29, 2011 at 2:36 AM, Maxim Kuvyrkov wrote: > On 29/10/2011, at 1:57 AM, Richard Guenther wrote: > >> >> We fail to keep the cannot-inline flag up-to-date when turning >> indirect to direct calls.  The following patch arranges to do >> this during statemen

Re: [PATCH] Properly limit backwards label scanning in reorg.

2011-10-30 Thread Richard Guenther
On Sun, Oct 30, 2011 at 8:49 AM, David Miller wrote: > > My check-gcc runs are completely dominated by the time it takes to > test compile.exp=20001226-1.c > > On sparc when compiling this function at -O1 the lowest hanging fruit > is some sillyness in reorg.  It is trying to test a very specific

Re: [PR50878, PATCH] Fix for verify_dominators in -ftree-tail-merge

2011-10-30 Thread Richard Guenther
On Sun, Oct 30, 2011 at 9:27 AM, Tom de Vries wrote: > On 10/30/2011 09:20 AM, Tom de Vries wrote: >> Richard, >> >> I have a fix for PR50878. > > Sorry, with patch this time. Ok for now, but see Davids mail and the complexity issue with iteratively updating dominators. It seems to me that we kn

Re: [PATCH][2/n] LTO option handling/merging rewrite

2011-10-30 Thread Richard Guenther
On Fri, Oct 28, 2011 at 4:48 PM, Diego Novillo wrote: > Isn't this the same patch as > http://gcc.gnu.org/ml/gcc-patches/2011-10/msg02348.html? No, it's updated to do exactly what we do now. Changes to behavior to be split to 3/n (like warning about mismatches or fixing the way we handle fPIC).

Re: [PATCH] Fix AIX breakage from gcc-ar/nm/ranlib wrappers

2011-10-30 Thread Richard Guenther
On Sun, Oct 30, 2011 at 9:39 PM, David Edelsohn wrote: > This patch breaks bootstrap on AIX because it includes > before "config.h".  "config.h" header can affect system headers.  I am > not sure why stdio.h should be included because system.h itself > includes .  The appended patch moves stdio.h

Re: [PATCH, devirtualization] Detect the new type in type change detection

2011-11-01 Thread Richard Guenther
On Mon, Oct 31, 2011 at 5:58 PM, Martin Jambor wrote: > On Fri, Oct 28, 2011 at 11:21:23AM +0200, Richard Guenther wrote: >> On Thu, Oct 27, 2011 at 9:54 PM, Martin Jambor wrote: >> > Hi, >> > >> > On Thu, Oct 27, 2011 at 11:06:02AM +0200, Richard Guenther wr

Re: [PR50878, PATCH] Fix for verify_dominators in -ftree-tail-merge

2011-11-01 Thread Richard Guenther
On Mon, Oct 31, 2011 at 9:19 PM, Tom de Vries wrote: > On 10/30/2011 10:54 AM, Richard Guenther wrote: >> On Sun, Oct 30, 2011 at 9:27 AM, Tom de Vries wrote: >>> On 10/30/2011 09:20 AM, Tom de Vries wrote: >>>> Richard, >>>> >>>> I have

Re: AVX generic mode tuning discussion.

2011-11-01 Thread Richard Guenther
On Mon, Oct 31, 2011 at 9:36 PM, Jagasia, Harsha wrote: >> > > We would like to propose changing AVX generic mode tuning to >> generate >> > 128-bit >> > > AVX instead of 256-bit AVX. >> > >> > You indicate a 3% reduction on bulldozer with avx256. >> > How does avx128 compare to -mno-avx -msse4.2?

Re: [google] Enable loop unroll/peel notes under -fopt-info

2011-11-01 Thread Richard Guenther
On Tue, Nov 1, 2011 at 1:46 AM, Teresa Johnson wrote: > This patch is for google-main only. > > Tested with bootstrap and regression tests. > > Print unroll and peel factors along with loop source position under > -fopt-info. > > Teresa > > 2011-10-31   Teresa Johnson   > >        * common.opt (f

Re: [PATCH] Add capability to run several iterations of early optimizations

2011-11-01 Thread Richard Guenther
On Sat, Oct 29, 2011 at 1:06 AM, Matt wrote: > On Sat, 29 Oct 2011, Maxim Kuvyrkov wrote: > >>> I like this variant a lot better than the last one - still it lacks any >>> analysis-based justification for iteration (see my reply to Matt on >>> what I discussed with Honza). >> >> Yes, having a way

<    1   2   3   4   5   6   7   8   9   10   >