[patch, vectorizer] Handle pattern statements with multiple uses

2011-06-28 Thread Ira Rosen
Hi, This is a follow-up patch for http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01205.html. The previous patch added a support for widen-mult in intermediate type, e.g.,: char a_t; short a_it; int a_T, prod_T, prod_T'; S1 a_t = ; S3 a_T = (int) a_t; '--> a_i

[pph] Support simple C++ programs (issue4630074)

2011-06-28 Thread Diego Novillo
This patch adds support for emitting functions read from a PPH image. With this, we can now run some simple C++ programs whose header has been reconstructed from a single PPH image. The core problem it fixes was in the saving and restoring of functions with a body. 1- When the parser wants to re

Re: [patch] Fix oversight in tuplification of DOM

2011-06-28 Thread Hans-Peter Nilsson
On Tue, 28 Jun 2011, Eric Botcazou wrote: > Hi, > > the attached testcase triggers an ICE when compiled at -O or above, on all the > open branches. This is a regression introduced with the tuplification. The > problem is that 2 ARRAY_RANGE_REFs are recognized as equivalent, although they > don't

Request to backport two -mvzeroupper related patches to 4.6 branch

2011-06-28 Thread Fang, Changpeng
Hi, Attached are two patches in gcc 4.7 trunk that we request to backport to 4.6 branch. There are all related to -mvzerupper 1) 0001-Save-the-initial-options-after-checking-vzeroupper.patch This patch fixes bug 47315, ICE: in extract_insn, at recog.c:2109 (unrecognizable insn) with -mvzeroupp

Re: [RFC] Fix full memory barrier on SPARC-V8

2011-06-28 Thread David Miller
From: Eric Botcazou Date: Tue, 28 Jun 2011 23:27:43 +0200 > With the pristine compiler, the test passes with -mcpu=v9 but fails otherwise. > It passes with the patched compiler. However, I suspect that we would still > have problems with newer UltraSparc CPUs supporting full RMO, because the ne

Remove __GCC_FLOAT_NOT_NEEDED define

2011-06-28 Thread Joseph S. Myers
In the course of options changes I noted the existence of too many defines conditioning code built for the target . One of those defines, __GCC_FLOAT_NOT_NEEDED, is not tested anywhere, and this patch removes the definition. Bootstrappe

Re: [pph] Append DECL_CONTEXT of global namespace to cache in preload (issue4629081)

2011-06-28 Thread Diego Novillo
On Tue, Jun 28, 2011 at 18:37, Gabriel Charette wrote: > 2011-06-28  Gabriel Charette   > >        * pph-streamer.c (pph_preload_common_nodes): >        Append DECL_CONTEXT of global_namespace to cache. OK. Diego.

[pph] Append DECL_CONTEXT of global namespace to cache in preload (issue4629081)

2011-06-28 Thread Gabriel Charette
We need members of the global namespace to point to the global translation unit decl. Thus we will append DECL_CONTEXT of global namespace to cache in preload. This doesn't fix any tests, but helps towards making the tree nodes identicals in pph-mode. Tested with bootstrap build and pph regress

[ARM] Clean up dead code in thumb_pushpop

2011-06-28 Thread Richard Henderson
When I presented the patch that converted thumb1 prologue to rtl, I said I didn't clean up thumb_pushpop. I had thought about converting the epilogue to rtl as well and deleting the function entirely. However, for my immediate purposes cleaning up dwarf2out, I need to remove the text-based inter

[patch] Fix PR tree-optimization/49539

2011-06-28 Thread Eric Botcazou
Hi, this is an ICE building the gnattools on ARM, a regression present on the mainline (and reproducible on x86/Linux by switching to SJLJ exceptions). For the reduced testcase compiled at -O: Unable to coalesce ssa_names 2 and 174 which are marked as MUST COALESCE. comp_last_2(ab) and comp_las

RE: [PATCH, i386] Enable -mprefer-avx128 by default for Bulldozer

2011-06-28 Thread Fang, Changpeng
Hi, I re-attached the patch here. Can someone review it? We would like to commit to trunk as well as 4.6 branch. Thanks, Changpeng From: Fang, Changpeng Sent: Monday, June 27, 2011 5:42 PM To: Fang, Changpeng; Jan Hubicka Cc: Uros Bizjak; gcc-patche

[patch, fortran] Always return malloc(1) for empty arrays in the library

2011-06-28 Thread Thomas Koenig
Hello world, looking at PR 49479 and other functions in the library made me realize there are lots of places where we don't malloc one byte for empty arrays. This patch is an attempt at fixing the ton of regressions likely caused by this (like in the PR) which haven't been found yet. No test cas

Re: [RFC] Fix full memory barrier on SPARC-V8

2011-06-28 Thread Eric Botcazou
> Fair enough, you can add this code if you want. Thanks. Note that this is marginal for Solaris as GCC defaults to -mcpu=v9 on Solaris but, in all other cases, it defaults to -mcpu=v8. I can reproduce the problem on the SPARC/Linux machine 'grobluk' of the CompileFarm: cpu : TI U

Re: [patch] Fix oversight in tuplification of DOM

2011-06-28 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/11 14:36, Eric Botcazou wrote: > Hi, > > the attached testcase triggers an ICE when compiled at -O or above, on all > the > open branches. This is a regression introduced with the tuplification. The > problem is that 2 ARRAY_RANGE_REFs a

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread H.J. Lu
On Tue, Jun 28, 2011 at 8:44 AM, H.J. Lu wrote: > On Tue, Jun 28, 2011 at 8:19 AM, Ulrich Weigand wrote: >> H.J. Lu wrote: >>> > it doesn't work; >>> > >>> > allocation.f: In function 'allocation': >>> > allocation.f:1048:0: internal compiler error: in subreg_get_info, at >>> > rtlanal.c:3235 >>>

[patch] Fix oversight in tuplification of DOM

2011-06-28 Thread Eric Botcazou
Hi, the attached testcase triggers an ICE when compiled at -O or above, on all the open branches. This is a regression introduced with the tuplification. The problem is that 2 ARRAY_RANGE_REFs are recognized as equivalent, although they don't have the same number of elements. This is so beca

[patch] libiberty/cp-demangle.c: Fix CP_DEMANGLE_DEBUG SIGSEGV

2011-06-28 Thread Jan Kratochvil
Hi, a mechanical patch which fixes during #define CP_DEMANGLE_DEBUG make check -> /bin/sh: line 1: 9179 Segmentation fault ./test-demangle < ./demangle-expected which also fixes confusing output for _Z1hI1AIiEdEDTcldtfp_1gIT0_EEET_S2_ binary operator arguments binary ope

Re: [pph] Add cp_global_trees to cache in preload (issue4635077)

2011-06-28 Thread gchare
Commited as r175595. http://codereview.appspot.com/4635077/

Re: [pph] Add cp_global_trees to cache in preload (issue4635077)

2011-06-28 Thread Diego Novillo
On Tue, Jun 28, 2011 at 15:23, Gabriel Charette wrote: > 2011-06-28  Gabriel Charette   > >        * pph-streamer.c (pph_preload_common_nodes): >        Add cp_global_trees[] to cache. > >        * g++.dg/pph/x1typerefs.cc: Remove xfail. OK. Diego.

[pph] Add cp_global_trees to cache in preload (issue4635077)

2011-06-28 Thread Gabriel Charette
Add the cp_global_trees to the cache during the preload. Those are preconstructed trees which we only need the pointers to (i.e. they should be identical in both the .cc and .h) One exception to this is the keyed_classes tree which is generated during parsing. We will need to merge the keyed_c

Re: Updated: RFA: partially hookize POINTER_SIZE

2011-06-28 Thread Tom Tromey
> "Joern" == Joern Rennecke writes: Joern> This is basically the same patch as posted before in Joern> http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02772.html and updated in Joern> http://gcc.gnu.org/viewcvs?view=revision&revision=168273, but with a Joern> few merge conflicts in current mainl

Re: [patch, fortran] Fix PR 49479, reshape with optional arg

2011-06-28 Thread Thomas Koenig
Hi Jerry, On 06/27/2011 03:18 PM, Thomas Koenig wrote: Hello world, the attached patch fixes PR 49479, a regression for 4.7 and 4.6. Test case was supplied by Joost, the approach to the patch was suggested by Tobias in comment#4 of the PR. The patch certainly looks safe enough. Regression-test

Re: PATCH [8/n]: Prepare x32: PR other/48007: Unwind library doesn't work with UNITS_PER_WORD > sizeof (void *)

2011-06-28 Thread H.J. Lu
On Mon, Jun 27, 2011 at 7:58 AM, Jason Merrill wrote: > On 06/26/2011 05:58 PM, H.J. Lu wrote: >> >> The current unwind library scheme provides only one unwind >> context and is backward compatible with multiple different unwind >> contexts from multiple unwind libraries: >> >> http://gcc.gnu.org/

Re: Simplify Solaris configuration

2011-06-28 Thread Rainer Orth
Eric Botcazou writes: >> The patch allowed a sparcv9-sun-solaris2.11 bootstrap to run well into >> building the target libraries (failed configuring libgfortran since I'd >> mis-merged the 32-bit and 64-bit gmp.h), a sparc-sun-solaris2.10 >> bootstrap is still running. >> >> I'll probably fix the

Re: Simplify Solaris configuration

2011-06-28 Thread Eric Botcazou
> The patch allowed a sparcv9-sun-solaris2.11 bootstrap to run well into > building the target libraries (failed configuring libgfortran since I'd > mis-merged the 32-bit and 64-bit gmp.h), a sparc-sun-solaris2.10 > bootstrap is still running. > > I'll probably fix the gmp.h issue, rebuild the spar

Re: [pph] Fix var order when streaming in. (issue4635074)

2011-06-28 Thread gchare
On 2011/06/28 11:27:56, Diego Novillo wrote: http://codereview.appspot.com/4635074/diff/1/gcc/cp/pph-streamer-in.c File gcc/cp/pph-streamer-in.c (right): http://codereview.appspot.com/4635074/diff/1/gcc/cp/pph-streamer-in.c#newcode1144 gcc/cp/pph-streamer-in.c:1144: /* The chains are built ba

Re: [testsuite] Remove dg-extra-errors in gcc.dg/inline_[12].c etc.

2011-06-28 Thread Xinliang David Li
Your fix works ok for me (on x86-64/linux) too. Thanks, David On Tue, Jun 28, 2011 at 10:09 AM, Rainer Orth wrote: > Three new testcases seem to XPASS everywhere, at least on all of my > targets: > > XPASS: gcc.dg/inline_1.c (test for excess errors) > XPASS: gcc.dg/inline_2.c (test for excess e

[testsuite] Remove dg-extra-errors in gcc.dg/inline_[12].c etc.

2011-06-28 Thread Rainer Orth
Three new testcases seem to XPASS everywhere, at least on all of my targets: XPASS: gcc.dg/inline_1.c (test for excess errors) XPASS: gcc.dg/inline_2.c (test for excess errors) XPASS: gcc.dg/unroll_1.c (test for excess errors) The following patch fixes this to remove the noise. Tested with the a

Use common and target option handling hooks in driver

2011-06-28 Thread Joseph S. Myers
This patch makes the driver use the common and target option handling hooks, so making the option state in the driver much closer to that in the core compiler as needed for it to drive multilib selection. opts.o is put in libcommon-target; a few cases of global state usage in opts.c (either missed

Re: [testsuite, objc] Don't XFAIL objc.dg/torture/forward-1.m

2011-06-28 Thread Iain Sandoe
On 28 Jun 2011, at 17:47, Rainer Orth wrote: objc.dg/torture/forward-1.m now seems to XPASS everywhere, creating an annoying amount of testsuite noise. Dominique provided the following patch in PR libobjc/Bug 36610. Tested with the appropriate runtest invocations on i386-pc-solaris2.10 (both

[testsuite, objc] Don't XFAIL objc.dg/torture/forward-1.m

2011-06-28 Thread Rainer Orth
objc.dg/torture/forward-1.m now seems to XPASS everywhere, creating an annoying amount of testsuite noise. Dominique provided the following patch in PR libobjc/Bug 36610. Tested with the appropriate runtest invocations on i386-pc-solaris2.10 (both multilibs), sparc-sun-solaris2.10 (both multilibs

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-06-28 Thread Michael Matz
Hi, On Tue, 28 Jun 2011, Andrew Stubbs wrote: > What I want (and I'm not totally clear on what this actually means) is > to be able to optimize all the cases where the end result will be the > same as the compiler produces now (using multiple multiply, shift, and > add operations). Okay, then

Re: [PATCH (7/7)] Mixed-sign multiplies using narrowest mode

2011-06-28 Thread Andrew Stubbs
On 23/06/11 15:43, Andrew Stubbs wrote: Patch 4 introduced support for using signed multiplies to code unsigned multiplies in a narrower mode. Patch 5 then introduced support for mis-matched input modes. These two combined mean that there is case where only the smaller of two inputs is unsigned,

Re: [PATCH, SRA] Total scalarization and padding

2011-06-28 Thread Martin Jambor
Hi, On Tue, Jun 28, 2011 at 03:01:17PM +0200, Richard Guenther wrote: > On Tue, Jun 28, 2011 at 2:50 PM, Martin Jambor wrote: > > Hi, > > > > at the moment SRA can get confused by alignment padding and think that > > it actually contains some data for which there is no planned > > replacement and

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-06-28 Thread Andrew Stubbs
On 28/06/11 16:53, Michael Matz wrote: On Tue, 28 Jun 2011, Richard Guenther wrote: I'd name the predicate value_preserving_conversion_p which I think is what you mean. harmless isn't really descriptive. Note that you include non-value-preserving conversions, namely int -> unsigned int. It s

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-06-28 Thread Michael Matz
Hi, On Tue, 28 Jun 2011, Richard Guenther wrote: > I'd name the predicate value_preserving_conversion_p which I think is > what you mean. harmless isn't really descriptive. > > Note that you include non-value-preserving conversions, namely int -> > unsigned int. It seems that Andrew really d

Re: [google] Enable both ld and gold in gcc (issue4664051)

2011-06-28 Thread H.J. Lu
On Tue, Jun 28, 2011 at 4:59 AM, Diego Novillo wrote: > On 11-06-27 19:09 , Doug Kwan wrote: >> >> This patch enables both ld and gold in gcc using the -fuse-ld switch.  The >> original patch use written by Nick Clifton and was subsequently updated by >> Matthias Klose.  The patch currently does n

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread H.J. Lu
On Tue, Jun 28, 2011 at 8:19 AM, Ulrich Weigand wrote: > H.J. Lu wrote: >> > it doesn't work; >> > >> > allocation.f: In function 'allocation': >> > allocation.f:1048:0: internal compiler error: in subreg_get_info, at >> > rtlanal.c:3235 >> > Please submit a full bug report, >> > with preprocessed

installing properly gengtype

2011-06-28 Thread Basile Starynkevitch
Hello All, gengtype becomes a user-level program, like cc1 is, so should be installed at the same place as cc1. For reasons I don't understand, I was told that gengtype needs to be compiled twice (both as build & as host, IIRC). The patch below does not even work, but I would like some advice

[Patch, Fortran, F08] PR 49562: [4.6/4.7 Regression] [OOP] assigning value to type-bound function

2011-06-28 Thread Janus Weil
Hi all, here is a patch for a problem which was originally reported as an ICE-on-invalid regression (assigning to a type-bound function). In the course of fixing it, I noticed that it becomes valid according to F08 if the function is pointer-valued, and modified the patch such that it will accept

Re: [PATCH (6/7)] More widening multiply-and-accumulate pattern matching

2011-06-28 Thread Andrew Stubbs
On 23/06/11 15:42, Andrew Stubbs wrote: This patch fixes the case where widening multiply-and-accumulate were not recognised because the multiplication itself is not actually widening. This can happen when you have "DI + SI * SI" - the multiplication will be done in SImode as a non-widening mult

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread Ulrich Weigand
H.J. Lu wrote: > > it doesn't work; > > > > allocation.f: In function 'allocation': > > allocation.f:1048:0: internal compiler error: in subreg_get_info, at > > rtlanal.c:3235 > > Please submit a full bug report, > > with preprocessed source if appropriate. > > See fo

Re: [PATCH (5/7)] Widening multiplies for mis-matched mode inputs

2011-06-28 Thread Andrew Stubbs
On 23/06/11 15:41, Andrew Stubbs wrote: This patch removes the restriction that the inputs to a widening multiply must be of the same mode. It does this by extending the smaller of the two inputs to match the larger; therefore, it remains the case that subsequent code (in the expand pass, for ex

[patch tree-optimization]: Do bitwise operator optimizations for X op !X patterns

2011-06-28 Thread Kai Tietz
Hello, this patch implements the X op !X patterns within tree-ssa-forwprop.c without using here const-fold routines. Additionally it does some trivial folding for X op X. Implementation also looks through [(type)] X op [(type)] !X, if type of X is integral and precision is suitable for operat

Re: [PATCH] [ARM] Fix constraint modifiers for VFP patterns.

2011-06-28 Thread Ramana Radhakrishnan
On 28 June 2011 15:20, Ramana Radhakrishnan wrote: > Hi, > > Sometime back Chung-Lin noticed that a few of the VFP patterns as below > had the '+' constraint modifiers rather than the '=' constraint > modifiers. > > I've now corrected this as follows and tested this on trunk with > arm-linux-gnue

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread H.J. Lu
On Tue, Jun 28, 2011 at 7:47 AM, H.J. Lu wrote: > On Tue, Jun 28, 2011 at 7:24 AM, Ulrich Weigand wrote: >> H.J. Lu wrote: >>> > find_replacement never checks subreg: >>> > >>> > Breakpoint 3, find_replacement (loc=3D0x7068ab00) >>> > =A0 =A0at /export/gnu/import/git/gcc-x32/gcc/reload.c:6411

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread H.J. Lu
On Tue, Jun 28, 2011 at 7:24 AM, Ulrich Weigand wrote: > H.J. Lu wrote: >> > find_replacement never checks subreg: >> > >> > Breakpoint 3, find_replacement (loc=3D0x7068ab00) >> > =A0 =A0at /export/gnu/import/git/gcc-x32/gcc/reload.c:6411 >> > 6411 =A0 =A0 =A0 =A0 =A0if (reloadreg && r->where

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread Ulrich Weigand
H.J. Lu wrote: > > find_replacement never checks subreg: > > > > Breakpoint 3, find_replacement (loc=3D0x7068ab00) > > =A0 =A0at /export/gnu/import/git/gcc-x32/gcc/reload.c:6411 > > 6411 =A0 =A0 =A0 =A0 =A0if (reloadreg && r->where =3D=3D loc) > > (reg:DI 0 ax) > > (reg/v/f:DI 182 [ b ]) > > (g

[PATCH] [ARM] Fix constraint modifiers for VFP patterns.

2011-06-28 Thread Ramana Radhakrishnan
Hi, Sometime back Chung-Lin noticed that a few of the VFP patterns as below had the '+' constraint modifiers rather than the '=' constraint modifiers. I've now corrected this as follows and tested this on trunk with arm-linux-gnueabi and qemu for a v7-a neon test run. Committed. cheers Ramana

Re: [PATCH (4/7)] Unsigned multiplies using wider signed multiplies

2011-06-28 Thread Andrew Stubbs
On 28/06/11 13:33, Andrew Stubbs wrote: On 23/06/11 15:41, Andrew Stubbs wrote: If one or both of the inputs to a widening multiply are of unsigned type then the compiler will attempt to use usmul_widen_optab or umul_widen_optab, respectively. That works fine, but only if the target supports th

MN10330: Do not use linker relaxation and incremental linking together

2011-06-28 Thread Nick Clifton
Hi Guys, With the MN10300, enabling linker relaxation when performing a incremental link does not work: % mn10300-elf-gcc hello.c -mrelax -r collect-ld: --relax and -r may not be used together collect2: error: ld returned 1 exit status Hence I am applying the patch below as an

Re: PATCH [11/n]: Prepare x32: PR rtl-optimization/48155: Reload doesn't handle subreg properly

2011-06-28 Thread H.J. Lu
On Mon, Jun 27, 2011 at 10:03 AM, Ulrich Weigand wrote: > H.J. Lu wrote: >> On Mon, Jun 27, 2011 at 7:52 AM, Ulrich Weigand wrote: >> > H.J. Lu wrote: >> > >> >> Given input: >> >> >> >> (plus:SI (subreg:SI (plus:DI (reg/f:DI 7 sp) >> >> =A0 =A0 =A0 =A0 =A0 =A0 (const_int 16 [0x10])) 0) >> >> =A0

Re: PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

2011-06-28 Thread H.J. Lu
On Mon, Jun 27, 2011 at 3:25 PM, H.J. Lu wrote: > On Mon, Jun 27, 2011 at 3:19 PM, H.J. Lu wrote: >> On Mon, Jun 27, 2011 at 3:08 PM, Ulrich Weigand wrote: >>> H.J. Lu wrote: >>> reload generates: (insn 914 912 0 (set (reg:SI 0 ax)         (plus:SI (subreg:SI (reg/v/f:DI 182

Re: [Patch, AVR]: Better 32=16*16 widening multiplication

2011-06-28 Thread Denis Chertykov
2011/6/28 Georg-Johann Lay : > This implements "mulhisi3" and "umulhisi3" widening multiplication > insns if AVR_HAVE_MUL. > > I chose the interface as r25:r22 = r19:r18 * r21:r20 which is ok > because only avr-gcc BE will call respective __* support functions in > libgcc. > > Tested without regres

Re: Ping #1: [Patch, AVR]: Fix PR34734

2011-06-28 Thread Denis Chertykov
2011/6/28 Georg-Johann Lay : > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01462.html > > Georg-Johann Lay wrote: >> PR34734 produces annoying, false warnings if __attribute__((progmem)) >> is used in conjunction with C++.  DECL_INITIAL is not yet set up in >> avr_handle_progmem_attribute. >> >> J

Re: [PATCH, SRA] Total scalarization and padding

2011-06-28 Thread Richard Guenther
On Tue, Jun 28, 2011 at 2:50 PM, Martin Jambor wrote: > Hi, > > at the moment SRA can get confused by alignment padding and think that > it actually contains some data for which there is no planned > replacement and thus might leave some loads and stores in place > instead of removing them.  This

[PATCH, SRA] Total scalarization and padding

2011-06-28 Thread Martin Jambor
Hi, at the moment SRA can get confused by alignment padding and think that it actually contains some data for which there is no planned replacement and thus might leave some loads and stores in place instead of removing them. This is perhaps the biggest problem when we attempt total scalarization

Re: [PATCH (4/7)] Unsigned multiplies using wider signed multiplies

2011-06-28 Thread Paolo Bonzini
On 06/23/2011 04:41 PM, Andrew Stubbs wrote: I believe this should be legal as long as the top bit of both inputs is guaranteed to be zero. The code achieves this guarantee by zero-extending the inputs to a wider mode (which must still be narrower than the output mode). Yes, that's correct. P

Re: [PATCH (4/7)] Unsigned multiplies using wider signed multiplies

2011-06-28 Thread Andrew Stubbs
On 23/06/11 15:41, Andrew Stubbs wrote: If one or both of the inputs to a widening multiply are of unsigned type then the compiler will attempt to use usmul_widen_optab or umul_widen_optab, respectively. That works fine, but only if the target supports those operations directly. Otherwise, it ju

Re: [PATCH] [annotalysis] Support IPA-SRA cloned functions (issue 4591066)

2011-06-28 Thread Diego Novillo
On Wed, Jun 22, 2011 at 16:10, Delesley Hutchins wrote: > > Hi, > This patch is merely a port of an earlier patch, made by Le-Chun Wu, from > google/main to annotalysis.  It extends Annotalysis to support cloned > functions/methods (especially created by IPA-SRA). > Bootstrapped and passed GCC reg

Re: Simplify Solaris configuration

2011-06-28 Thread Rainer Orth
Eric, >> At least I can build the 64-bit libgcc now, but the 32-bit one fails for >> unrelated reasons: >> >> configure:3247: checking for suffix of object files >> configure:3269: /var/gcc/gcc-4.7.0-20110622/11-gcc/./gcc/xgcc >> -B/var/gcc/gcc-4.7.0-20110622/11-gcc/./gcc/ >> -B/usr/local/sparcv9-

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-06-28 Thread Richard Guenther
On Tue, Jun 28, 2011 at 12:47 PM, Andrew Stubbs wrote: > On 24/06/11 16:47, Richard Guenther wrote: >>> >>> I can certainly add checks to make sure that the skipped operations >>> >  actually don't make any important changes to the value, but do I need >>> > to? >> >> Yes. > > OK, how about this p

Re: [google] Enable both ld and gold in gcc (issue4664051)

2011-06-28 Thread Diego Novillo
On 11-06-27 19:09 , Doug Kwan wrote: This patch enables both ld and gold in gcc using the -fuse-ld switch. The original patch use written by Nick Clifton and was subsequently updated by Matthias Klose. The patch currently does not work with LTO but that is okay for now and it is no worse than i

Re: [PATCH, PR 49094] Refrain from creating misaligned accesses in SRA

2011-06-28 Thread Martin Jambor
Hi, On Mon, Jun 27, 2011 at 03:18:01PM +0200, Richard Guenther wrote: > On Sun, 26 Jun 2011, Martin Jambor wrote: > > > Hi, > > > > under some circumstances involving user specified alignment and/or > > packed attributes, SRA can create a misaligned MEM_REF. As the > > testcase demonstrates, it

Re: [patch tree-optimization]: Try to sink type-casts for binary and/or/xor operations

2011-06-28 Thread Richard Guenther
On Tue, Jun 28, 2011 at 12:04 PM, Kai Tietz wrote: > Ok, moved code out of special case for addresses. > > Bootstrapped for x86_64-pc-linux-gnu.  Patch ok for apply? There is no need to check for CST op (T) arg, the constant is always the 2nd operand for commutative operations. Ok with that vari

Re: [pph] Fix var order when streaming in. (issue4635074)

2011-06-28 Thread dnovillo
http://codereview.appspot.com/4635074/diff/1/gcc/cp/pph-streamer-in.c File gcc/cp/pph-streamer-in.c (right): http://codereview.appspot.com/4635074/diff/1/gcc/cp/pph-streamer-in.c#newcode1144 gcc/cp/pph-streamer-in.c:1144: /* The chains are built backwards (ref: add_decl_to_level@name-lookup.c),

Re: [pph] Fix var order when streaming in. (issue4635074)

2011-06-28 Thread dnovillo
On 2011/06/28 00:27:04, Gabriel Charette wrote: The names and namespaces chains are built by adding each new element to the front of the list. When streaming it in we traverse the list of names and re-add them to the current chains; thus reversing the order in which they were defined in the

Ping #1: [Patch, AVR]: Fix PR34734

2011-06-28 Thread Georg-Johann Lay
http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01462.html Georg-Johann Lay wrote: > PR34734 produces annoying, false warnings if __attribute__((progmem)) > is used in conjunction with C++. DECL_INITIAL is not yet set up in > avr_handle_progmem_attribute. > > Johann > > PR target/34734 >

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-06-28 Thread Andrew Stubbs
On 24/06/11 16:47, Richard Guenther wrote: I can certainly add checks to make sure that the skipped operations > actually don't make any important changes to the value, but do I need to? Yes. OK, how about this patch? I've added checks to make sure the value is not truncated at any point. I

[Patch, AVR]: Better 32=16*16 widening multiplication

2011-06-28 Thread Georg-Johann Lay
This implements "mulhisi3" and "umulhisi3" widening multiplication insns if AVR_HAVE_MUL. I chose the interface as r25:r22 = r19:r18 * r21:r20 which is ok because only avr-gcc BE will call respective __* support functions in libgcc. Tested without regression and hand-tested assembler code. Johan

Ping Re: Clean up TARGET_ASM_NAMED_SECTION defaults

2011-06-28 Thread Joseph S. Myers
Ping. This patch is pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: [patch tree-optimization]: Try to do type sinking on comparisons

2011-06-28 Thread Kai Tietz
- Original Message - From: "Richard Guenther" To: "Kai Tietz" Cc: gcc-patches@gcc.gnu.org Sent: Tuesday, June 28, 2011 10:45:20 AM Subject: Re: [patch tree-optimization]: Try to do type sinking on comparisons On Mon, Jun 27, 2011 at 8:52 PM, Kai Tietz wrote: > Hello, > > this patch trie

Re: [patch tree-optimization]: Try to sink type-casts for binary and/or/xor operations

2011-06-28 Thread Kai Tietz
Ok, moved code out of special case for addresses. Bootstrapped for x86_64-pc-linux-gnu. Patch ok for apply? Regards, Kai Index: gcc-head/gcc/tree-ssa-forwprop.c === --- gcc-head.orig/gcc/tree-ssa-forwprop.c +++ gcc-head/gcc/tree-ssa

Re: [Patch ARM] Add predefine for availability of DSP multiplication functions.

2011-06-28 Thread Richard Earnshaw
On 24/06/11 09:09, James Greenhalgh wrote: > Hi, > > This patch adds a builtin macro __ARM_FEATURE_DSP which is defined > when the ARMv5E DSP multiplication extensions are available for use. > > Thanks, > James Greenhalgh > > 2011-06-22 James Greenhalgh > > * TARGET_CPU_CPP_BUILTINS: A

Re: [testsuite] ARM tests vfp-ldm*.c and vfp-stm*.c

2011-06-28 Thread Richard Earnshaw
On 24/06/11 15:49, Janis Johnson wrote: > On 06/24/2011 03:29 AM, Joseph S. Myers wrote: >> On Thu, 23 Jun 2011, Janis Johnson wrote: >> >>> Tests target/arm/vfp-ldm*.c and vfp-sdm*.c add -mfloat-abi=softfp but >>> fail if multilib flags override that option. This patch skips the test >>> for mult

Re: {patch tree-ssa-math-opts]: Change searching direction for bswap

2011-06-28 Thread Richard Guenther
On Tue, Jun 28, 2011 at 11:29 AM, Kai Tietz wrote: > Oh, missed to fill comment. > Thanks, > Kai > > Index: gcc-head/gcc/tree-ssa-math-opts.c > === > --- gcc-head.orig/gcc/tree-ssa-math-opts.c > +++ gcc-head/gcc/tree-ssa-math-opts.

Re: {patch tree-ssa-math-opts]: Change searching direction for bswap

2011-06-28 Thread Kai Tietz
Oh, missed to fill comment. Thanks, Kai Index: gcc-head/gcc/tree-ssa-math-opts.c === --- gcc-head.orig/gcc/tree-ssa-math-opts.c +++ gcc-head/gcc/tree-ssa-math-opts.c @@ -1821,7 +1821,11 @@ execute_optimize_bswap (void) {

Re: [patch, darwin, committed] fix PR47997

2011-06-28 Thread Iain Sandoe
On 26 Jun 2011, at 17:28, Iain Sandoe wrote: It should also be applied to 4.6.x at some stage. applied to 4.6 branch. gcc/ PR target/47997 * config/darwin.c (darwin_mergeable_string_section): Place string constants in '.cstring' rather than '.const' when CF/NSString

Commit: Add support for V850 variants to libgcc

2011-06-28 Thread Nick Clifton
Hi Guys, I am checking in the patch below to add support for V850 variant architectures to the libgcc/config.host file. Cheers Nick libgcc/ChangeLog 2011-06-28 Nick Clifton * config.host: Recognize all V850 variants. Index: libgcc/config.host ==

Re: Backport AVX256 load/store split patches to gcc 4.6 for performance boost on latest AMD/Intel hardware.

2011-06-28 Thread Richard Guenther
On Tue, Jun 28, 2011 at 12:33 AM, Fang, Changpeng wrote: > Hi, > > Attached are the patches we propose to backport to gcc 4.6 branch which are > related to avx256 unaligned load/store splitting. > As we mentioned before,  The combined effect of these patches are positive on > both AMD and Intel

Re: [RFC, ARM] Convert thumb1 prologue completely to rtl

2011-06-28 Thread Richard Earnshaw
On 27/06/11 19:31, Richard Henderson wrote: > On 06/24/2011 02:59 AM, Richard Earnshaw wrote: >> On 18/06/11 20:02, Richard Henderson wrote: >>> I couldn't find anything terribly tricky about the conversion. >>> >>> The existing push_mult pattern would service thumb1 with just >>> a tweak or two to

Re: [patch tree-optimization]: Try to do type sinking on comparisons

2011-06-28 Thread Richard Guenther
On Mon, Jun 27, 2011 at 8:52 PM, Kai Tietz wrote: > Hello, > > this patch tries to sink conversions for comparisons patterns: > a) (type) X cmp (type) Y => x cmp y. > b) (type) X cmp CST => x cmp ((type-x) CST). > c) CST cmp (type) X => ((type-x) CST) cmp x. > > This patch just allows type sinking

[RFC] Add middle end hook for stack red zone size

2011-06-28 Thread Jiangning Liu
This patch is to fix PR38644, which is a bug with long history about stack red zone access, and PR30282 is correlated. Originally red zone concept is not exposed to middle-end, and back-end uses special logic to add extra memory barrier RTL and help the correct dependence in middle-end. This way d

Re: [RFC] Fix full memory barrier on SPARC-V8

2011-06-28 Thread David Miller
From: Eric Botcazou Date: Tue, 28 Jun 2011 10:11:03 +0200 > The V8 architecture manual is quite clear about it: TSO allows stores to be > reordered after subsequent loads (it's the only difference in TSO with Strong > Consistency) so you need to do something to have a full memory barrier. As

Re: {patch tree-ssa-math-opts]: Change searching direction for bswap

2011-06-28 Thread Richard Guenther
On Mon, Jun 27, 2011 at 7:33 PM, Kai Tietz wrote: > Hello, > > this is the separated patch for issues noticed by doing type-sinking on > bitwise-operations.  The tests exposed that bswap pattern-matching searches > from top to down for each BB. As it replaces the found match for a bswap in > tr

Re: [patch tree-optimization]: Try to sink type-casts for binary and/or/xor operations

2011-06-28 Thread Richard Guenther
On Mon, Jun 27, 2011 at 7:17 PM, Kai Tietz wrote: > Ups, missed to update patch. You still modify the /* If the first argument is an SSA name that is itself a result of a typecast of an ADDR_EXPR to an integer, feed the ADDR_EXPR to the folder rather than the ssa name. */ block. P

Re: [PATCH] __builtin_assume_aligned

2011-06-28 Thread Richard Guenther
On Mon, Jun 27, 2011 at 6:54 PM, Jakub Jelinek wrote: > On Mon, Jun 27, 2011 at 12:17:40PM +0200, Richard Guenther wrote: >> Ok if you remove the builtins.c folding and instead verify arguments >> from check_builtin_function_arguments. > > Thanks, here is what I've committed after bootstrapping/re

[ARM] fix PR target/48637

2011-06-28 Thread Richard Earnshaw
For a long time now the compiler has permitted printing a symbol with the %c operator, but for some reason we've never permitted symbol+offset. This patch fixes this omission and also makes the compiler slightly more friendly to users of ASM statements by not generating an ICE when it can't handle

Re: [RFC] Fix full memory barrier on SPARC-V8

2011-06-28 Thread Eric Botcazou
> Let's clarify something, did you run your testcase that triggered this > bug on a v8 or a v9 machine? Sun UltraSPARC, so V9 of course. The point is that Solaris is TSO (TSO as defined for the V9 architecture, i.e. backward compatible with V8) so you have a V8-compatible TSO implementation, in

Re: varpool alias reorg

2011-06-28 Thread Richard Guenther
On Mon, 27 Jun 2011, Jan Hubicka wrote: > > On Fri, 24 Jun 2011, Jan Hubicka wrote: > > > > > Hi, > > > this is yet another variant of the fix. This time we stream builtins > > > decls as > > > usually, but at fixup time we copy the assembler names (if set) into the > > > builtin decls used by

Re: ia64-linux build broken

2011-06-28 Thread Tristan Gingold
On Jun 27, 2011, at 9:57 PM, Richard Henderson wrote: > On 06/27/2011 12:23 PM, Richard Henderson wrote: >> On 06/27/2011 12:11 PM, Richard Henderson wrote: >>> gcc -c -DUSE_LIBUNWIND_EXCEPTIONS -g -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE >>> -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototyp