[patch] Fix PR tree-optimization/49352

2011-06-12 Thread Ira Rosen
Hi, This patch fixes PR 49352 by ignoring debug uses in SLP reduction detection. While fixing it Jakub also discovered that an incorrect statement may be analyzed and operands of not commutative operation may be swapped. The patch fixes those as well. Bootstrapped and tested on powerpc64-suse-lin

Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))

2011-06-12 Thread Mike Stump
On Jun 12, 2011, at 3:55 AM, Richard Guenther wrote: > In almost all cases(*) the need for a lvalue VIEW_CONVERT_EXPR can be avoided > by moving the VIEW_CONVERT_EXPR to the rvalue assigned too it. Remember that > VIEW_CONVERT_EXPR always conver the full object and are not allowed to > change size

Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))

2011-06-12 Thread Mike Stump
On Jun 12, 2011, at 4:03 AM, Richard Guenther wrote: > Btw, see tree.def which says > > /* Represents viewing something of one type as being of a second type. > This corresponds to an "Unchecked Conversion" in Ada and roughly to > the idiom *(type2 *)&X in C. The only operand is the value to

Re: [patch, fortran] Final TRIM optimizations

2011-06-12 Thread Steve Kargl
On Mon, Jun 13, 2011 at 12:24:02AM +0200, Thomas Koenig wrote: > Hello world, > > this is the last round of TRIM optimizations. This patch extends the > treatment of trailing TRIMs in concatenations to comparisions. It also > does a bit of code cleanup by removing some duplication, and by not >

[patch, fortran] Final TRIM optimizations

2011-06-12 Thread Thomas Koenig
Hello world, this is the last round of TRIM optimizations. This patch extends the treatment of trailing TRIMs in concatenations to comparisions. It also does a bit of code cleanup by removing some duplication, and by not changing the rhs in optimize_assignment. OK for trunk? Thomas 2

Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))

2011-06-12 Thread Jason Merrill
On 06/12/2011 06:59 AM, Richard Guenther wrote: The please provide a specification on what a VIEW_CONVERT_EXPR does to type-based alias analysis. If the alias set of the VIEW_CONVERT_EXPR type the same as the set for the operand, ignore it; if it's a subset, handle it like a COMPONENT_REF; ot

PR tree-optimize/48836 (internal compiler error: in execute_todo, at passes.c:1261)

2011-06-12 Thread Jan Hubicka
Hi, I had this patch sitting in my tree for a while, but somehow forgot to commit it. The issue here is that edge redirection affects vops and thus imply need for SSA update in some cases. Bootstrapped/regtested x86_64-linux, will commit it shortly. PR middle-end/48836 * ipa-inlin

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread Jan Hubicka
Hi, this patch solves the bultin/strlen-3.c LTO linker plugin problem. While removing alias code I was bit overactive and removed the check that makes us to implicitly do -fwhole-program when resolution info is around. It is not quite clear to me why in LTO we need -fwhole-program to get the tes

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 9:40 AM, Jan Hubicka wrote: > Hi, > this is the fix (or rather a workaround) i comitted.  Thanks! > > Index: ChangeLog > === > --- ChangeLog   (revision 174968) > +++ ChangeLog   (working copy) > @@ -1,3 +1,9 @

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 9:33 AM, Jan Hubicka wrote: >> On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: >> >> >> >> This also pretty much destroyed C++ for ia32: >> >> >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 >> >> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html >> >

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread Jan Hubicka
Hi, this is the fix (or rather a workaround) i comitted. Thanks! Index: ChangeLog === --- ChangeLog (revision 174968) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2011-06-11 Jan Hubicka + + PR middle-end/49378 + *

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread Jan Hubicka
> On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: > >> > >> This also pretty much destroyed C++ for ia32: > >> > >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 > >> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html > > > > Hi, > > It seems somewhat amazing that we hit kernel sen

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 7:33 AM, H.J. Lu wrote: > On Sun, Jun 12, 2011 at 7:00 AM, H.J. Lu wrote: >> On Sun, Jun 12, 2011 at 6:50 AM, Richard Guenther >> wrote: >>> On Sun, Jun 12, 2011 at 3:18 PM, H.J. Lu wrote: On Sun, Jun 12, 2011 at 3:48 AM, Richard Guenther wrote: > On Sat,

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 8:01 AM, H.J. Lu wrote: > On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: >>> >>> This also pretty much destroyed C++ for ia32: >>> >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 >>> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html >> >> Hi, >> It seem

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: >> >> This also pretty much destroyed C++ for ia32: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 >> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html > > Hi, > It seems somewhat amazing that we hit kernel sensitive miscompilat

Re: Have a boehm-gc patch for gcj/rtems

2011-06-12 Thread Jie Liu
Hi, Java HelloWorld compiled by cross gcj for RTEMS can run without problem now, I think it's time for get the boehm-gc patch reviewed and merged. :) Here is the patch: Index: mach_dep.c === --- mach_dep.c (revision 172224) +++ ma

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread Jan Hubicka
> I am testing it now. Will know the results in 2 hours. Thanks. Could you also send me the preprocessed source for future.o? The object file I am getting don't have the bug you report, that is most probably due to glibc difference. Honza > > Thanks. > > -- > H.J.

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: >> >> This also pretty much destroyed C++ for ia32: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 >> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html > > Hi, > It seems somewhat amazing that we hit kernel sensitive miscompilat

Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)

2011-06-12 Thread Jan Hubicka
> > This also pretty much destroyed C++ for ia32: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 > http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html Hi, It seems somewhat amazing that we hit kernel sensitive miscompilation here. The problem most probably is the fact that thunks a

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 7:00 AM, H.J. Lu wrote: > On Sun, Jun 12, 2011 at 6:50 AM, Richard Guenther > wrote: >> On Sun, Jun 12, 2011 at 3:18 PM, H.J. Lu wrote: >>> On Sun, Jun 12, 2011 at 3:48 AM, Richard Guenther >>> wrote: On Sat, Jun 11, 2011 at 5:09 PM, H.J. Lu wrote: > Hi, >

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 6:50 AM, Richard Guenther wrote: > On Sun, Jun 12, 2011 at 3:18 PM, H.J. Lu wrote: >> On Sun, Jun 12, 2011 at 3:48 AM, Richard Guenther >> wrote: >>> On Sat, Jun 11, 2011 at 5:09 PM, H.J. Lu wrote: Hi, expand_builtin_strlen has src_reg = gen_reg_

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread Richard Guenther
On Sun, Jun 12, 2011 at 3:18 PM, H.J. Lu wrote: > On Sun, Jun 12, 2011 at 3:48 AM, Richard Guenther > wrote: >> On Sat, Jun 11, 2011 at 5:09 PM, H.J. Lu wrote: >>> Hi, >>> >>> expand_builtin_strlen has >>> >>> src_reg = gen_reg_rtx (Pmode); >>> ... >>> pat = expand_expr (src, src_reg, ptr_mode,

GCC mainline is broken on x86

2011-06-12 Thread H.J. Lu
Hi, Revision 174952: http://gcc.gnu.org/ml/gcc-cvs/2011-06/msg00441.html totally breaks C++ on x86: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378 http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html One symptom is we are using uninitialized registers, which leads to writing random me

Re: [PATCH] Un-obsolete Interix

2011-06-12 Thread Gerald Pfeifer
On Thu, 9 Jun 2011, Douglas B Rupp wrote: Comments welcome. --- gcc.orig/gcc/doc/install.texi 2011-06-08 14:05:22.0 -0700 +++ gcc/gcc/doc/install.texi2011-06-09 10:04:38.0 -0700 @@ -4499,7 +4499,7 @@ The Interix target is used by OpenNT, Interix, Services For UNIX (SFU

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread H.J. Lu
On Sun, Jun 12, 2011 at 3:48 AM, Richard Guenther wrote: > On Sat, Jun 11, 2011 at 5:09 PM, H.J. Lu wrote: >> Hi, >> >> expand_builtin_strlen has >> >> src_reg = gen_reg_rtx (Pmode); >> ... >> pat = expand_expr (src, src_reg, ptr_mode, EXPAND_NORMAL); >> if (pat != src_reg) >>  emit_move_insn (sr

Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))

2011-06-12 Thread Richard Guenther
On Sun, Jun 12, 2011 at 12:59 PM, Richard Guenther wrote: > On Sat, Jun 11, 2011 at 10:01 PM, Jason Merrill wrote: >> On 06/10/2011 10:20 AM, Richard Guenther wrote: >>> >>> no, a VIEW_CONVERT_EXPR is generally not an lvalue (fold for example >>> would turn the above to (volatile int) a[1]). >> >

Re: Is VIEW_CONVERT_EXPR an lvalue? (was Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10)))

2011-06-12 Thread Richard Guenther
On Sat, Jun 11, 2011 at 10:01 PM, Jason Merrill wrote: > On 06/10/2011 10:20 AM, Richard Guenther wrote: >> >> no, a VIEW_CONVERT_EXPR is generally not an lvalue (fold for example >> would turn the above to (volatile int) a[1]). > > The gimplifier seems to consider it an lvalue: gimplify_expr uses

Re: RFA (fold): PATCH for c++/49290 (folding *(T*)(ar+10))

2011-06-12 Thread Richard Guenther
On Sat, Jun 11, 2011 at 7:45 PM, Mike Stump wrote: > On Jun 10, 2011, at 7:20 AM, Richard Guenther wrote: >> On Fri, 10 Jun 2011, Jason Merrill wrote: >> >>> On 06/10/2011 10:03 AM, Richard Guenther wrote: >> *((volatile int *)&a[0] + 1) > > It would be correct to fold it to >

Re: PATCH [1/n]: Prepare x32: PR middle-end/47364: internal compiler error: in emit_move_insn, at expr.c:3355

2011-06-12 Thread Richard Guenther
On Sat, Jun 11, 2011 at 5:09 PM, H.J. Lu wrote: > Hi, > > expand_builtin_strlen has > > src_reg = gen_reg_rtx (Pmode); > ... > pat = expand_expr (src, src_reg, ptr_mode, EXPAND_NORMAL); > if (pat != src_reg) >  emit_move_insn (src_reg, pat); > > But src_reg may be in ptr_mode, wich may not be the

Re: Cgraph alias reorg 13/14 (disable inlining functions called once at -O0

2011-06-12 Thread Richard Guenther
On Fri, Jun 10, 2011 at 9:15 PM, Jan Hubicka wrote: >> On Fri, Jun 10, 2011 at 8:42 PM, Jan Hubicka wrote: >> > Hi, >> > by some mistake we enable functions called once at -O0 and it actually >> > happens from >> > time to time. >> >> Why do it for -O1?  It definitely makes debugging less reliab

[patch, moxie] Fix comparison regression

2011-06-12 Thread Anthony Green
I've just committed this patch. It makes match_operator modeless for moxie comparisons. This fixes a regression introduced in March by this patch: http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01344.html 2011-06-12 Anthony Green * config/moxie/moxie.md (cbranchsi4): Remove mode from

Re: [Patch, AVR]: Fix PR46779

2011-06-12 Thread Denis Chertykov
2011/6/10 Georg-Johann Lay : > Then I have a question on spill failures: > > There is PR46278, an optimization flaw that goes as follows: > > The avr BE defines fake addressing mode X+const that has to be written > down in asm as >  X += const >  a = *X >  X -= const > > The comment says that this

[patch] Improve peeling heuristic in the vectorizer

2011-06-12 Thread Ira Rosen
Hi, gcc.dg/vect/vect-72.c is not expected to use loop peeling for alignment, but it does on ARM with double-word vectors. The loop contains two data-refs of type char: one is aligned and the other is misaligned by 1. When the cost model is disabled the peeling heuristic chooses to peel a number of