[patch] Enhance conditional store sinking

2011-03-16 Thread Ira Rosen
Hi, This patch adds a support of conditional store sinking for cases with multiple data references in then and else basic blocks. The correctness of the transformation is checked by verifying that there are no read-after-write and write-after-write dependencies. Bootstrapped and tested on

Re: Minor VRP jump threading improvement

2011-03-16 Thread Paolo Bonzini
On 03/15/2011 10:37 PM, Jeff Law wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I noticed that VRP was missing many obvious jump threading opportunities; investigation showed that it wasn't threading through conditionals with pointer types, just those with integral types. Fix is rather

Re: PR debug/47510

2011-03-16 Thread Dodji Seketeli
Tom Tromey tro...@redhat.com writes: I would like to ask that it be considered for 4.6. IIRC, if this patch does not go in 4.6, then we have to write some special and ugly GDB code to work around the debuginfo generated by 4.6. I would much prefer it if there was no need to write this code.

Re: [build, lto] Only accept -fuse-linker-plugin if linker supports -plugin (PR lto/46944)

2011-03-16 Thread Rainer Orth
Richard Guenther rguent...@suse.de writes: Ok for mainline if that passes, and perhaps also the 4.6 branch? I'm ok with this for mainline - Paolo, can you double-check the autofoo stuff? As for 4.6 I'd like to give it a day or two on trunk to allow people to report problems. Paolo, do you

Re: [PATCH] Fix part of PR48037

2011-03-16 Thread Richard Guenther
On Tue, 15 Mar 2011, Andrew Pinski wrote: On Tue, Mar 15, 2011 at 5:19 AM, Richard Guenther rguent...@suse.de wrote: This avoids spilling SSE registers to memory just because we access vector components in a C array way.  The trick is to simply rewrite those accesses to proper vector

Re: [build, lto] Only accept -fuse-linker-plugin if linker supports -plugin (PR lto/46944)

2011-03-16 Thread Rainer Orth
Paolo Bonzini bonz...@gnu.org writes: Paolo, do you have any comments on the configure.ac part of the patch? It's okay. Thanks, installed on mainline then. I hope Binutils will never switch to 3.x, but that's not your fault. True: although there are some precautions for binutils 2, I

Re: [PATCH] Fix fallout of my fold_binary EQ/NE patch (PR middle-end/48136)

2011-03-16 Thread Richard Guenther
On Tue, Mar 15, 2011 at 8:41 PM, Jakub Jelinek ja...@redhat.com wrote: Hi! The addition of STRIP_NOPS for EQ_EXPR/NE_EXPR revealed a bunch of cases which rely on arg0 and arg1 having the same type.  Only the last hunk fixes the testcase, the rest is what I saw and it was possible the types

Re: [PATCH][4.5] Fix backport of PR 47862 to 4.5 branch

2011-03-16 Thread Richard Guenther
On Tue, Mar 15, 2011 at 9:07 PM, Pat Haugen pthau...@linux.vnet.ibm.com wrote: The following changes are already present on trunk as part of the fix for PR44364. Not having them on 4.5 caused problems with the subject fix when trying to spill FP regs with a stack 32K. Bootstrap/regtest 4.5

Re: [v3] typeinfo tuning

2011-03-16 Thread Marc Glisse
On Mon, 14 Mar 2011, Benjamin Kosnik wrote: I hacked up scripts/check_compile and ran the libstdc++ testsuite to generate 4k+ .s files, and then analyzed the resulting assembly files for vague linkage. Here are the clear wins that are ABI-compatible, or in C++0x code. There are other issues,

Re: Minor VRP jump threading improvement

2011-03-16 Thread Richard Guenther
On Tue, Mar 15, 2011 at 10:37 PM, Jeff Law l...@redhat.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I noticed that VRP was missing many obvious jump threading opportunities; investigation showed that it wasn't threading through conditionals with pointer types, just those with

RE: Fix for PR target/47951

2011-03-16 Thread Henderson, Stuart
Thanks. I don't have write privileges. If no-one objects, can someone apply the patch to trunk/appropriate branches? 2011-03-16 Stuart Henderson stuart.hender...@analog.com PR target/47951 * config/bfin/bfin.md (loop_end): Update constraints to ensure inputs match output. -Original

[PATCH] Prepare for constant folder canonicalizations

2011-03-16 Thread Richard Guenther
This prepares things to share constant folding between passes (CCP, FRE and VRP). It simplifies maybe_fold_reference making sure to first canonicalize MEM_REFs and then call other folders. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2011-03-16 Richard

Re: [patch] Enhance conditional store sinking

2011-03-16 Thread Ira Rosen
On 16 March 2011 12:29, Richard Guenther richard.guent...@gmail.com wrote: On Wed, Mar 16, 2011 at 7:49 AM, Ira Rosen ira.ro...@linaro.org wrote: Hi, This patch adds a support of conditional store sinking for cases with multiple data references in then and else basic blocks. The correctness

RX: 4.5 branch: Fix alignment and addressing issues.

2011-03-16 Thread Nick Clifton
Hi Guys, I am checking in the attached patch to fix some regressions in the RX port with regard to alignment and addressing modes. With this patch applied I have 18 fewer failures in the GCC testsuite. Cheers Nick gcc/ChangeLog 2011-03-16 Nick Clifton ni...@redhat.com *

Re: [PATCH] Fix RTL DSE compile time hog (PR rtl-optimization/48141)

2011-03-16 Thread Jakub Jelinek
On Wed, Mar 16, 2011 at 09:46:20AM +0100, Paolo Bonzini wrote: On 03/16/2011 12:12 AM, Kenneth Zadeck wrote: so how much time does this save? I agree that this is a useful simplification, but it seems unlikely to be that important in real code. it seems like the 5000 store test would in

Re: [PATCH] Fix RTL DSE compile time hog (PR rtl-optimization/48141)

2011-03-16 Thread Richard Guenther
On Wed, Mar 16, 2011 at 12:52 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Mar 16, 2011 at 09:46:20AM +0100, Paolo Bonzini wrote: On 03/16/2011 12:12 AM, Kenneth Zadeck wrote: so how much time does this save? I agree that this is a useful simplification, but it seems unlikely to be

Re: [PATCH] Fix RTL DSE compile time hog (PR rtl-optimization/48141)

2011-03-16 Thread Paolo Bonzini
On 03/16/2011 12:59 PM, Richard Guenther wrote: On Wed, Mar 16, 2011 at 12:52 PM, Jakub Jelinekja...@redhat.com wrote: On Wed, Mar 16, 2011 at 09:46:20AM +0100, Paolo Bonzini wrote: On 03/16/2011 12:12 AM, Kenneth Zadeck wrote: so how much time does this save? I agree that this is a useful

[PATCH] Fix PR48146

2011-03-16 Thread Richard Guenther
My fixing of store-sinking exposed an issue that relying on SSA update to fixup virtual operands isn't a good idea if we incrementally walk through all sinking candidates. Fixed by manually updating virtual SSA form which is easy in this case. Bootstrapped and tested on

Re: [PATCH] Fix RTL DSE compile time hog (PR rtl-optimization/48141)

2011-03-16 Thread Kenneth Zadeck
i think that i sympathize with richard's do we really need another parm? whine. I would have just nailed it in without the parm. I think that it is unreasonable to expect that a program with basic blocks this big needs the full range of optimizations performed. It is perfectly reasonable

Re: Minor VRP jump threading improvement

2011-03-16 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/16/11 04:31, Richard Guenther wrote: On Tue, Mar 15, 2011 at 10:37 PM, Jeff Law l...@redhat.com wrote: I noticed that VRP was missing many obvious jump threading opportunities; investigation showed that it wasn't threading through

Re: [PATCH] renable lto on darwin9

2011-03-16 Thread Richard Guenther
On Wed, 16 Mar 2011, Jack Howarth wrote: The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can be renabled for darwin9 (for which it has been well tested on the regress server). Re-enabling lto for *-apple-darwin9 on darwin allows us to continue to monitor the status of

[patch] Simplify further in combine

2011-03-16 Thread Chung-Lin Tang
Hi, this patch adds slightly more simplification in try_combine(), under -fexpensive-optimizations, by calling subst() to both i2 and i1. Supplied is an ARM testcase where this resulted in one less redundant ZERO_EXTEND insn under ARMv6 and above. Bootstrapped and tested on i686 and x86_64,

Re: [PATCH] renable lto on darwin9

2011-03-16 Thread Jack Howarth
On Wed, Mar 16, 2011 at 03:50:20PM +0100, Richard Guenther wrote: On Wed, 16 Mar 2011, Jack Howarth wrote: The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can be renabled for darwin9 (for which it has been well tested on the regress server). Re-enabling lto for

[PATCH] Fix parts of PR48149

2011-03-16 Thread Richard Guenther
This fixes the easiest case in PR48149 by extending fold to handle COMPLEX_EXPR REALPART_EXPR x, IMAGPART_EXPR x. We have to be careful when the types do not match as fold-convert happily re-constructs a COMPLEX_EXPR of this kind when folding a complex-expr to a slightly different type.

Re: [v3] typeinfo tuning

2011-03-16 Thread Benjamin Kosnik
Could that be related to the fact that I now keep getting linker errors about std::range_error::~range_error() being undefined? The .o file is looking for _ZNSt11range_errorD2Ev but libstdc++ has D0Ev and D1Ev. Indeed. Fixed thusly. tested x86/linux -benjamin 2011-03-16 Benjamin Kosnik

Re: PR debug/47510

2011-03-16 Thread Jason Merrill
This patch is OK. I also think it's a bug that the constructors of the anonymous struct have 't' in their names; they should also be anonymous with DW_AT_linkage_name. Jason

Re: [PATCH] PR/Target 47998

2011-03-16 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/16/11 09:32, Yoshinori Sato wrote: Hi All, This problem optimize rule missing. gen_lowpart got invalid operand. I attached fix patch. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ca9398c..9982644 100644 --- a/gcc/ChangeLog +++

Re: PATCH: PR middle-end/48016: Inconsistency in non-local goto save area

2011-03-16 Thread H.J. Lu
On Wed, Mar 16, 2011 at 10:09:44AM -0700, H.J. Lu wrote: Hi, expand_function_start failed to properly store frame pointer for non-local goto when Pmode != ptr_mode. OK for trunk? Wrong patch. Here is the correct mode. OK for trunk? Thanks. H.J. --- diff --git a/gcc/ChangeLog.x32

RFA: fix PR c/48116

2011-03-16 Thread Tom Tromey
This patch fixes PR c/48116. The bug is that -Wreturn-type does not follow the documentation. In particular, it should warn for this code, but does not: static void f() {} static void g() { return f(); } I think the bug is that c-typeck.c calls pedwarn with either 0 or OPT_pedantic,

Re: Minor VRP jump threading improvement

2011-03-16 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/16/11 04:31, Richard Guenther wrote: On Tue, Mar 15, 2011 at 10:37 PM, Jeff Law l...@redhat.com wrote: I noticed that VRP was missing many obvious jump threading opportunities; investigation showed that it wasn't threading through

Re: RX: 4.5 branch: Fix alignment and addressing issues.

2011-03-16 Thread Nick Clifton
Hi Richard, Do you really need peepholes for this? I would have thought that merely adding the instruction patterns for this would have been enough to encourage combine to do its job merging these patterns... I thought so too, but I found in my tests that combine was missing plenty of cases

Re: [PATCH] renable lto on darwin9

2011-03-16 Thread Mike Stump
On Mar 16, 2011, at 7:49 AM, Jack Howarth wrote: The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can be renabled for darwin9 Okay for gcc trunk and 4.6.0? Ok. I've now applied the patch to trunk and 4.6.x, thanks.

Re: [RFC PATCH, i386]: Vectorize calls to floor, ceil, trunc and rint functions.

2011-03-16 Thread H.J. Lu
On Sun, Feb 27, 2011 at 5:45 AM, Uros Bizjak ubiz...@gmail.com wrote: Hello! Attached [RFC] patch vectorizes calls to floor, ceil, trunc and rint (and their float variants) functions using roundps/roundpd SSE4.1 instruction. 2011-02-27  Uros Bizjak  ubiz...@gmail.com        *

Re: [RFC PATCH, i386]: Vectorize calls to floor, ceil, trunc and rint functions.

2011-03-16 Thread H.J. Lu
On Wed, Mar 16, 2011 at 11:38 AM, H.J. Lu hjl.to...@gmail.com wrote: On Sun, Feb 27, 2011 at 5:45 AM, Uros Bizjak ubiz...@gmail.com wrote: Hello! Attached [RFC] patch vectorizes calls to floor, ceil, trunc and rint (and their float variants) functions using roundps/roundpd SSE4.1

Re: [Patch][AVR]: Support tail calls

2011-03-16 Thread Georg-Johann Lay
Richard Henderson schrieb: On 03/16/2011 03:32 AM, Georg-Johann Lay wrote: Richard Henderson schrieb: On 03/11/2011 05:43 AM, Georg-Johann Lay wrote: I did not find a way to make this work together with -mcall-prologues. Please let me know if you have suggestion on how call prologues can

Re: RX: 4.5 branch: Fix alignment and addressing issues.

2011-03-16 Thread Andrew Pinski
On Wed, Mar 16, 2011 at 4:48 AM, Nick Clifton ni...@redhat.com wrote: Hi Guys,  I am checking in the attached patch to fix some regressions in the RX  port with regard to alignment and addressing modes.  With this patch  applied I have 18 fewer failures in the GCC testsuite. + (set_attr

C++ PATCH for c++/48113 (SFINAE bug causing bind regression in libstdc++)

2011-03-16 Thread Jason Merrill
convert_for_initialization is sfinae-enabled, but it was calling ocp_convert, which is not. This patch changes it to use the newer perform_implicit_conversion_flags instead. To make that work, I needed to add support for LOOKUP_PREFER_RVALUE to that code path. Tested x86_64-pc-linux-gnu,

[PATCH] PR debug/28767 (Support pointer-to-member-function)

2011-03-16 Thread Dodji Seketeli
Hello, This PR is an enhancement request to emit a DW_TAG_ptr_to_member_type DIE for pointer-to-member-function types. The patch below does add a new language hook to support this and adapts the existing code that emits DW_TAG_ptr_to_member_type for ponter-to-data-member types to handle

Re: C++ PATCH for c++/48115 (ICE with ellipsis and templates)

2011-03-16 Thread Jakub Jelinek
On Wed, Mar 16, 2011 at 03:54:45PM -0400, Jason Merrill wrote: Here the issue was that require_complete_type doesn't do anything in templates, but convert_arg_to_ellipsis was assuming that it did. The simple fix is to make sure we really do have a complete type. Tested x86_64-pc-linux-gnu,

C++ PATCH for c++/48132 (ICE with constexpr and array)

2011-03-16 Thread Jason Merrill
Jakub was right that we were failing to add indices to the array CONSTRUCTOR along this code path. It seems appropriate to add them earlier, in reshape_init, like we do for classes, so this patch fixes the bug that way. Tested x86_64-pc-linux-gnu, applying to trunk. Also OK for 4.6.0? The

Re: A couple of small C++ cleanup PATCHes

2011-03-16 Thread Jason Merrill
One more: I noticed that we were calling require_complete_type within template-specific code, but in a template require_complete_type just returns immediately. Tested x86_64-pc-linux-gnu, applying to trunk. commit 453649bdbc1189503b34774d5a6cf2470a6bcd12 Author: Jason Merrill ja...@redhat.com

Re: RX: 4.5 branch: Fix alignment and addressing issues.

2011-03-16 Thread Mike Stump
On Mar 16, 2011, at 12:05 PM, Andrew Pinski wrote: + (set_attr length 5)] ;; Worst case sceanario. FIXME: If we defined separate patterns +);; rather than using iterators we could specify exact sizes. You can set up the correct length even without using

[V850] Hookize OUTPUT_ADDR_CONST_EXTRA

2011-03-16 Thread Anatoly Sokolov
Hello. This patch removes obsolete OUTPUT_ADDR_CONST_EXTRA macro from V850 back end in the GCC and introduces equivalent TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA target hook. Regression-tested on v850-unknown-elf. OK to install? * config/v850/v850.h (OUTPUT_ADDR_CONST_EXTRA):

Re: [PATCH] Updated DW_OP_GNU_entry_value/DW_TAG_GNU_call_site patch

2011-03-16 Thread H.J. Lu
On Tue, Mar 15, 2011 at 4:19 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! Now that we are back in stage 1, I'd like move on with the entry_value/call_site debug info extensions. Here is the http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01793.html patch updated to current trunk,

[PATCH] Fix prepare_call_arguments for types passed by reference (PR middle-end/48152)

2011-03-16 Thread Jakub Jelinek
Hi! Bootstrap currently fails on mingw, because targetm.calls.function_arg_advance has various asserts and doesn't like being passed parameters that should have been passed by reference. prepare_call_arguments code just tried to match up what types arguments have and if there is no match, just

libgo patch committed: Don't crash SIGPROF

2011-03-16 Thread Ian Lance Taylor
This patch to libgo changes the Go signal handling code to not try to handle SIGPROF. This lets the usual -pg profiler work. Except that it doesn't fully work with -fsplit-stack, but that is a separate issue. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline.

Re: [PATCH] Updated DW_OP_GNU_entry_value/DW_TAG_GNU_call_site patch

2011-03-16 Thread Jakub Jelinek
On Wed, Mar 16, 2011 at 03:38:25PM -0700, H.J. Lu wrote: IMNSHO you really should reconsider using Pmode != ptr_mode for your port. That said, the patch looks good to me, though I can't approve it. diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index 764e3de..45db256 100644 ---

Re: PR debug/47510

2011-03-16 Thread Mark Mitchell
On 3/16/2011 1:04 PM, Dodji Seketeli wrote: Would the RMs (in CC) object to this patch going into 4.6? What would be the justification for that? The bar is pretty high on putting a patch onto a release branch. I don't see any evidence that this is a regression, and a bug that affects

Re: [PATCH] Updated DW_OP_GNU_entry_value/DW_TAG_GNU_call_site patch

2011-03-16 Thread H.J. Lu
On Wed, Mar 16, 2011 at 4:28 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Mar 16, 2011 at 03:38:25PM -0700, H.J. Lu wrote: IMNSHO you really should reconsider using Pmode != ptr_mode for your port. Someone can give it a try. My main concern is the x32 process is running in 64bit mode.

Re: [patch][4.7] Enhance XOR handling in simplify-rtx.c

2011-03-16 Thread Chung-Lin Tang
On 2011/3/17 03:21 AM, Richard Henderson wrote: On 03/11/2011 06:14 AM, Chung-Lin Tang wrote: + /* Given (xor (and A B) C), using P^Q == ~PQ | ~QP (concat as AND), + we can transform (AB)^C into: + A(~CB) | ~AC | ~BC + Attempt a few

C++ PATCH for c++/47570 (constexpr failure with =)

2011-03-16 Thread Jason Merrill
In this case, fold is turning one() = 0 into (one(), true) because the comparison is always true because one() returns unsigned, and we were handling COMPOUND_EXPR like any other binary expression, expecting fold to turn (1, 1) into 1. But it doesn't, and it makes sense to handle

C++ PATCH for c++/48089 (ICE with invalid constexpr ctor)

2011-03-16 Thread Jason Merrill
In a normal constexpr function, we treat *this as a potential constant expression. But in a constexpr constructor it isn't, since we're still in the process of initializing the object. Tested x86_64-pc-linux-gnu, applying to trunk. commit 0f23f8a6fca94b1a00a51ea34643268e9ff840e9 Author: Jason

Re: C++ PATCH for c++/48089 (ICE with invalid constexpr ctor)

2011-03-16 Thread Gabriel Dos Reis
On Wed, Mar 16, 2011 at 9:32 PM, Jason Merrill ja...@redhat.com wrote: In a normal constexpr function, we treat *this as a potential constant expression.  But in a constexpr constructor it isn't, since we're still in the process of initializing the object. Hi Jason, I believe the patch is too

Re: C++ PATCH for c++/48089 (ICE with invalid constexpr ctor)

2011-03-16 Thread Gabriel Dos Reis
On Wed, Mar 16, 2011 at 10:02 PM, Jason Merrill ja...@redhat.com wrote: On 03/16/2011 10:43 PM, Gabriel Dos Reis wrote: The real problem is that the data member of the object is not initialized. Fully constructed subobjects in constexpr constructor are still be potential constant expressions.