Re: FW: [v3] libstdc++/52689 testcase

2012-04-25 Thread Igor Zamyatin
This testcase is reported as failed on x86 > > Noticed that this testcase wasn't put in as part of the patch. Fixed as > follows. > > tested x86/linux > > -benjamin >

combine_conversions int->double->int

2012-04-25 Thread Marc Glisse
Hello, a conversion like int->double->int is just the identity, as long as double is big enough to represent all ints exactly. The most natural way I found to do this optimization is the attached: 2012-04-25 Marc Glisse PR middle-end/27139 * tree-ssa-forwprop.c (combine_co

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Andi Kleen
> Tree level unrollers (cunrolli and cunroll) do complete unroll. At O2, > both of them are turned on, but gcc does not allow any code growth -- > which makes them pretty useless at O2 (very few loops qualify). The > default max complete peel iteration is also too low compared with both > icc and l

Re: move default_tree_printer out of toplev.c

2012-04-25 Thread Richard Guenther
On Tue, 24 Apr 2012, Manuel López-Ibáñez wrote: > It seems an obvious cleanup to me. > > OK? > > 2012-04-24 Manuel López-Ibáñez > > gcc/ > * tree-pretty-print.h (default_tree_printer): Do not declare. > * tree-diagnostic.c: Include tree-pretty-print.h, tree-pass.h and > int

[PATCH] Validate the HLE memory models.

2012-04-25 Thread Andi Kleen
From: Andi Kleen This is on top of Kirill's latest patch. Based on the earlier discussion. Warn and enforce reasonable memory models for HLE ACQUIRE and RELEASE. It's not useful to have a weaker compiler memory model than what the CPU implements for a transaction. With HLE_ACQUIRE model must b

Re: [rfc] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-04-25 Thread Richard Guenther
On Tue, 24 Apr 2012, Ulrich Weigand wrote: > Hello, > > PR 52633 is caused by bad interaction between two different vectorizer > pattern recognition passed. A minimal test case is: > > void > test (unsigned short *x, signed char *y) > { > int i; > for (i = 0; i < 32; i++) > x[i] = (shor

Re: [rfc] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-04-25 Thread Jakub Jelinek
On Wed, Apr 25, 2012 at 10:29:36AM +0200, Richard Guenther wrote: > > Does this look reasonable? Any comments or suggestions appreciated! > > Yes, getting rid of this fragile interaction by doing more work in > vect_recog_widen_shift_pattern sounds like the correct thing to do. Or give up when s

[PATCH, tree-optimization] Fix for PR 52868

2012-04-25 Thread Igor Zamyatin
Hi all! I'd like to post for review the patch which makes some costs adjusting in get_computation_cost_at routine in ivopts part. As mentioned in the PR changes also fix the bwaves regression from PR 52272. Also changes introduce no degradations on spec2000/2006 and EEMBC1.1/2.0(this was measured

Re: move default_tree_printer out of toplev.c

2012-04-25 Thread Manuel López-Ibáñez
On 25 April 2012 10:27, Richard Guenther wrote: > On Tue, 24 Apr 2012, Manuel López-Ibáñez wrote: > >> It seems an obvious cleanup to me. >> >> OK? >> >> 2012-04-24  Manuel López-Ibáñez   >> >> gcc/ >>       * tree-pretty-print.h (default_tree_printer): Do not declare. >>       * tree-diagnostic.c

Re: combine_conversions int->double->int

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 10:12 AM, Marc Glisse wrote: > Hello, > > a conversion like int->double->int is just the identity, as long as double > is big enough to represent all ints exactly. The most natural way I found to > do this optimization is the attached: > > 2012-04-25  Marc Glisse   > >    

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Richard Guenther
On Tue, Apr 24, 2012 at 11:26 PM, Teresa Johnson wrote: > This patch adds heuristics to limit unrolling in loops with branches that may > increase > branch mispredictions. It affects loops that are not frequently iterated, and > that are > nested within a hot region of code that already contains

Re: [PATCH 04/11] Fix expansion point loc for macro-like tokens

2012-04-25 Thread Dodji Seketeli
Jason Merrill writes: > On 04/10/2012 03:42 PM, Dodji Seketeli wrote: >> In that case, besides returning NULL, enter_macro_context sets >> pfile->context->c.macro to NULL, making cpp_get_token_1 forget to set >> the location of the "vari" to the expansion point of A. > > This seems like a bug tha

Re: [PATCH, tree-optimization] Fix for PR 52868

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 10:56 AM, Igor Zamyatin wrote: > Hi all! > > I'd like to post for review the patch which makes some costs adjusting > in get_computation_cost_at routine in ivopts part. > As mentioned in the PR changes also fix the bwaves regression from PR 52272. > Also changes introduce n

Re: [PATCH] Fix VRP ICE on x >> cst1; if (x cmp cst2) (PR tree-optimization/53058, take 2)

2012-04-25 Thread Jakub Jelinek
On Tue, Apr 24, 2012 at 10:33:58AM +0200, Richard Guenther wrote: > > So like this instead? > > Yes! Unfortunately that didn't bootstrap, apparently double-int.h is included in gen* which aren't linked with double-int.o, and the inlines stay at -O0 or with -fkeep-inline-functions. Even guarding

Re: combine_conversions int->double->int

2012-04-25 Thread Marc Glisse
First, thanks a lot for answering. On Wed, 25 Apr 2012, Richard Guenther wrote: On Wed, Apr 25, 2012 at 10:12 AM, Marc Glisse wrote: Hello, a conversion like int->double->int is just the identity, as long as double is big enough to represent all ints exactly. The most natural way I found to

Re: [PATCH 05/11] Make expand_location resolve to locus in main source file

2012-04-25 Thread Dodji Seketeli
> On 04/10/2012 03:49 PM, Dodji Seketeli wrote: >> Apparently, quite some places in the compiler (like the C/C++ >> preprocessor, the debug info machinery) expect expand_location to >> resolve to locations that are in the main source file, even if the >> token at stake comes from a macro that was d

Re: [C++ Patch] PR 39970

2012-04-25 Thread Paolo Carlini
On 04/25/2012 01:41 AM, Jason Merrill wrote: On 04/24/2012 05:24 PM, Paolo Carlini wrote: Perhaps we aren't checking default arguments unless they're actually used; a could change that if they aren't dependent. Your reply reached the mailing list a bit mangled, could you please clarify? If the

Re: [PATCH] Fix for PR51879 - Missed tail merging with non-const/pure calls

2012-04-25 Thread Richard Guenther
On Tue, Apr 24, 2012 at 11:19 PM, Tom de Vries wrote: > On 17/04/12 14:24, Richard Guenther wrote: >> On Sat, Apr 14, 2012 at 9:26 AM, Tom de Vries wrote: >>> On 27/01/12 21:37, Tom de Vries wrote: On 24/01/12 11:40, Richard Guenther wrote: > On Mon, Jan 23, 2012 at 10:27 PM, Tom de Vrie

Re: [PATCH] Fix VRP ICE on x >> cst1; if (x cmp cst2) (PR tree-optimization/53058, take 2)

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 11:21 AM, Jakub Jelinek wrote: > On Tue, Apr 24, 2012 at 10:33:58AM +0200, Richard Guenther wrote: >> > So like this instead? >> >> Yes! > > Unfortunately that didn't bootstrap, apparently double-int.h is included in > gen* which aren't linked with double-int.o, and the inl

Re: move default_tree_printer out of toplev.c

2012-04-25 Thread Richard Guenther
On Wed, 25 Apr 2012, Manuel López-Ibáñez wrote: > On 25 April 2012 10:27, Richard Guenther wrote: > > On Tue, 24 Apr 2012, Manuel López-Ibáñez wrote: > > > >> It seems an obvious cleanup to me. > >> > >> OK? > >> > >> 2012-04-24  Manuel López-Ibáñez   > >> > >> gcc/ > >>       * tree-pretty-print

Re: [PATCH] Fix for PR51879 - Missed tail merging with non-const/pure calls

2012-04-25 Thread Jakub Jelinek
On Wed, Apr 25, 2012 at 11:57:09AM +0200, Richard Guenther wrote: > void *foo () > { > return __builtin_return_address (0); > } > > void *bar (_Bool b) > { > if (b) > return foo (); > else > return foo (); > } > > int main() > { > if (bar(true) == bar(false)) > abort (); > } >

Re: [PATCH] Fix for PR51879 - Missed tail merging with non-const/pure calls

2012-04-25 Thread Tom de Vries
On 25/04/12 12:09, Jakub Jelinek wrote: > On Wed, Apr 25, 2012 at 11:57:09AM +0200, Richard Guenther wrote: >> void *foo () >> { >> return __builtin_return_address (0); >> } >> >> void *bar (_Bool b) >> { >> if (b) >> return foo (); >> else >> return foo (); >> } >> >> int main() >> {

Re: PR c/53066 Wshadow should not warn for shadowing an extern function

2012-04-25 Thread Manuel López-Ibáñez
On 25 April 2012 00:01, Joseph S. Myers wrote: > On Sun, 22 Apr 2012, Manuel López-Ibáñez wrote: > >> Wshadow warns whenever any declaration shadows a global function >> declaration. This is almost always noise, since most (always?) of the >> time one cannot mistakenly replace a function by anothe

Re: Continue strict-volatile-bitfields fixes

2012-04-25 Thread Thomas Schwinge
Hi! On Thu, 19 Apr 2012 19:46:17 +0200, I wrote: > Here is my current test case, reduced from gcc.dg/tree-ssa/20030922-1.c: > > extern void abort (void); > > enum tree_code > { > BIND_EXPR, > }; > struct tree_common > { > enum tree_code code:8; > }; >

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Jan Hubicka
> This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53088 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53089 The first one seems just moved warning because of different gimplification order. Fixed thus. Note that the warning comes out at weird place with input_location, but that pro

[PING][Patch, Testsuite] fix failure in test gcc.dg/pr52283.c

2012-04-25 Thread Greta Yorsh
PING! Here is the original post: http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01235.html This patch fixes the failure in gcc.dg/pr52283.c by adding the missing dg-warning and dg-options. OK for trunk? Thanks, Greta gcc/testsuite/ChangeLog 2012-04-20 Greta Yorsh * gcc.dg/pr52283.c:

Re: RFC reminder: an alternative -fsched-pressure implementation

2012-04-25 Thread Ulrich Weigand
Richard Sandiford wrote: > Vladimir Makarov writes: > > Taking your results for S390 and ARM with Neon into account, I guess it > > should be included and probably made by default for these 2 targets (for > > sure for s390). > > OK, thanks to both of you. > > Ulrich and Andreas: would you be h

Re: [rfc] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-04-25 Thread Ulrich Weigand
Jakub Jelinek wrote: > On Wed, Apr 25, 2012 at 10:29:36AM +0200, Richard Guenther wrote: > > > Does this look reasonable? Any comments or suggestions appreciated! > > > > Yes, getting rid of this fragile interaction by doing more work in > > vect_recog_widen_shift_pattern sounds like the correct

Re: [PR tree-optimization/52558]: RFC: questions on store data race

2012-04-25 Thread Richard Guenther
On Tue, Apr 24, 2012 at 7:43 PM, Aldy Hernandez wrote: > On 04/13/12 03:46, Richard Guenther wrote: >> >> On Fri, Apr 13, 2012 at 12:11 AM, Aldy Hernandez  wrote: > > > Richard.  Thanks so much for reviewing and providing an alternative > approach, which AFAICT provides superior results. > > >> A

Re: [rfc] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-04-25 Thread Ulrich Weigand
Richard Guenther wrote: > On Tue, 24 Apr 2012, Ulrich Weigand wrote: > > Does this look reasonable? Any comments or suggestions appreciated! > > Yes, getting rid of this fragile interaction by doing more work in > vect_recog_widen_shift_pattern sounds like the correct thing to do. OK, I'll try t

[PATCH] Fix bitfield expansion (PR middle-end/52979)

2012-04-25 Thread Jakub Jelinek
Hi! This patch fixes the attached execute/ testcases. In some cases get_best_mode was ignoring bitregion_* restrictions and returned mode that overlapped into adjacent non-bitfields, or store_bit_field_1 for insv could ignore those restrictions completely. After fixing that I've run into several

[Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Greta Yorsh
The test gcc.dg/vect/slp-perm-8.c fails on arm-none-eabi with neon enabled: FAIL: gcc.dg/vect/slp-perm-8.c scan-tree-dump-times vect "vectorized 1 loops" 2 The test expects 2 loops to be vectorized, while gcc successfully vectorizes 3 loops in this test using neon on arm. This patch adjusts the ex

Re: Continue strict-volatile-bitfields fixes

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 1:27 PM, Thomas Schwinge wrote: > Hi! > > On Thu, 19 Apr 2012 19:46:17 +0200, I wrote: >> Here is my current test case, reduced from gcc.dg/tree-ssa/20030922-1.c: >> >>     extern void abort (void); >> >>     enum tree_code >>     { >>       BIND_EXPR, >>     }; >>     stru

Re: [PING][Patch, Testsuite] fix failure in test gcc.dg/pr52283.c

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 1:40 PM, Greta Yorsh wrote: > PING! Here is the original post: > http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01235.html > > This patch fixes the failure in gcc.dg/pr52283.c by adding the missing > dg-warning and dg-options. > > OK for trunk? Didn't I approve this already?

Re: PR c/53066 Wshadow should not warn for shadowing an extern function

2012-04-25 Thread Joseph S. Myers
On Wed, 25 Apr 2012, Manuel López-Ibáñez wrote: > On 25 April 2012 00:01, Joseph S. Myers wrote: > > On Sun, 22 Apr 2012, Manuel López-Ibáñez wrote: > > > >> Wshadow warns whenever any declaration shadows a global function > >> declaration. This is almost always noise, since most (always?) of the

Re: [PATCH] Fix bitfield expansion (PR middle-end/52979)

2012-04-25 Thread Richard Guenther
On Wed, 25 Apr 2012, Jakub Jelinek wrote: > Hi! > > This patch fixes the attached execute/ testcases. In some cases > get_best_mode was ignoring bitregion_* restrictions and returned > mode that overlapped into adjacent non-bitfields, or store_bit_field_1 > for insv could ignore those restrictio

Re: [Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 1:51 PM, Greta Yorsh wrote: > The test gcc.dg/vect/slp-perm-8.c fails on arm-none-eabi with neon enabled: > FAIL: gcc.dg/vect/slp-perm-8.c scan-tree-dump-times vect "vectorized 1 > loops" 2 > > The test expects 2 loops to be vectorized, while gcc successfully vectorizes > 3

Re: PR c/53066 Wshadow should not warn for shadowing an extern function

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 5:36 AM, Manuel López-Ibáñez wrote: > On 25 April 2012 00:01, Joseph S. Myers wrote: >> On Sun, 22 Apr 2012, Manuel López-Ibáñez wrote: >> >>> Wshadow warns whenever any declaration shadows a global function >>> declaration. This is almost always noise, since most (always?

Re: PR c/53066 Wshadow should not warn for shadowing an extern function

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 6:54 AM, Joseph S. Myers wrote: > On Wed, 25 Apr 2012, Manuel López-Ibáñez wrote: > >> On 25 April 2012 00:01, Joseph S. Myers wrote: >> > On Sun, 22 Apr 2012, Manuel López-Ibáñez wrote: >> > >> >> Wshadow warns whenever any declaration shadows a global function >> >> decl

Re: PowerPC prologue and epilogue 6

2012-04-25 Thread David Edelsohn
On Wed, Apr 25, 2012 at 1:20 AM, Alan Modra wrote: > This patch adds a testcase to verify register saves and restores. > I tried to write it so that it will run on all powerpc targets.  From > past experience it probably won't.  OK to apply anyway, and fix > fallout later? > >        * gcc.target

Re: [PATCH] reload: Try alternative with swapped operands before going to the next

2012-04-25 Thread Ulrich Weigand
Andreas Krebbel wrote: > 2011-11-17 Andreas Krebbel > > * reload.c (find_reloads): Change the loop nesting when trying an > alternative with swapped operands. This is OK. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@d

[PATCH] Fix testsuite fallout of last patch

2012-04-25 Thread Richard Guenther
Committed, tested on x86_64-unknown-linux-gnu. Richard. 2012-04-25 Richard Guenther * gcc.target/i386/l_fma_float_5.c: Adjust. * gcc.target/i386/l_fma_double_4.c: Likewise. * gcc.target/i386/l_fma_float_2.c: Likewise. * gcc.target/i386/l_fma_float_6.c: Likewis

fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-25 Thread Olivier Hainque
Hello, For the "PA(1).Z := 44;" assignment in the attached Ada testcase, we observe the gcc 4.5 SRA pass performing an invalid transformation, turning: struct { system__pack_48__bits_48 OBJ; } D.1432; D.1432.OBJ = D.1435; T1b.F = VIEW_CONVERT_EXPR(D.1432); into: SR.12_17 = D.143

Re: [PATCH 08/11] Make conversion warnings work on NULL with -ftrack-macro-expansion

2012-04-25 Thread Dodji Seketeli
Gabriel Dos Reis writes: > On Wed, Apr 11, 2012 at 3:46 AM, Dodji Seketeli wrote: >> There are various conversion related warnings that trigger on >> potentially dangerous uses of NULL (or __null).  NULL is defined as a >> macro in a system header, so calling warning or warning_at on a virtual >

Re: [PING][Patch, Testsuite] fix failure in test gcc.dg/pr52283.c

2012-04-25 Thread Mike Stump
On Apr 25, 2012, at 4:52 AM, Richard Guenther wrote: > On Wed, Apr 25, 2012 at 1:40 PM, Greta Yorsh wrote: >> PING! Here is the original post: >> http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01235.html >> >> This patch fixes the failure in gcc.dg/pr52283.c by adding the missing >> dg-warning and

[PATCH] Default to -gdwarf-4

2012-04-25 Thread Jakub Jelinek
Hi! For reasonable debugging experience recent GCC versions need GDB >= 7.0 for quite some time, and DWARF4 is almost 2 years old now, and offers lots of improvements over DWARF2 we still default to. So, I'd like to make -gdwarf-4 (just the version, of course -g is needed to enable debug info gen

Re: [PATCH] Make sizetypes no longer sign-extending

2012-04-25 Thread Richard Guenther
On Tue, 24 Apr 2012, Richard Guenther wrote: > On Tue, 24 Apr 2012, Richard Guenther wrote: > > > > > I've been carrying this patch for quite some while now and really > > want to go forward with it - the problem is that while all default > > languages work fine after this patch Ada shows some t

Re: [PATCH, PR38785] Throttle PRE at -O3

2012-04-25 Thread Gerald Pfeifer
On Wed, 25 Apr 2012, Maxim Kuvyrkov wrote: > OK. Gerald, does the patch for gcc-4.8/changes.html look OK? Yes, it does, thank you. Just add "a" and "the" in three places, as in "A new option", "the...optimization" and "at the...level" when committing it, please. Cheers, Gerald

[PATCH 10/13] Fix location for static class members

2012-04-25 Thread Dodji Seketeli
Consider the test case g++.dg/other/offsetof5.C: #include struct A { char c; int &i; }; int j = offsetof (A, i);// { dg-warning "invalid access|offsetof" } template struct S { T h; T &i; static const int j = offsetof (

Re: combine_conversions int->double->int

2012-04-25 Thread Marc Glisse
On Wed, 25 Apr 2012, Richard Guenther wrote: On Wed, Apr 25, 2012 at 10:12 AM, Marc Glisse wrote: Hello, a conversion like int->double->int is just the identity, as long as double is big enough to represent all ints exactly. The most natural way I found to do this optimization is the attached

PATCH: PR debug/52857: DW_OP_GNU_regval_type is generated with INVALID_REGNUM

2012-04-25 Thread H.J. Lu
Hi, We may generate DW_OP_GNU_regval_type with INVALID_REGNUM. This patch adds an assert to make sure that we don't. OK for trunk? Thanks. H.J. --- 2012-04-06 H.J. Lu PR debug/52857 * dwarf2out.c (dbx_reg_number): Assert return value != INVALID_REGNUM. diff --git a

[PATCH 11/13] Fix va_start related location

2012-04-25 Thread Dodji Seketeli
In gcc/testsuite/gcc.dg/pr30457.c, the first warning was not being emitted because the relevant location was inside the var_start macro defined in a system header. It can even point to a token for a builtin macro there. This patch unwinds to the first token in real source code in that case. Test

Re: [PATCH 08/11] Make conversion warnings work on NULL with -ftrack-macro-expansion

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 8:42 AM, Dodji Seketeli wrote: > Gabriel Dos Reis writes: > >> On Wed, Apr 11, 2012 at 3:46 AM, Dodji Seketeli wrote: >>> There are various conversion related warnings that trigger on >>> potentially dangerous uses of NULL (or __null).  NULL is defined as a >>> macro in a

Re: [PATCH 11/13] Fix va_start related location

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 9:04 AM, Dodji Seketeli wrote: > In gcc/testsuite/gcc.dg/pr30457.c, the first warning was not being > emitted because the relevant location was inside the var_start macro > defined in a system header.  It can even point to a token for a > builtin macro there.  This patch un

Re: [PATCH 10/13] Fix location for static class members

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 8:55 AM, Dodji Seketeli wrote: > Consider the test case g++.dg/other/offsetof5.C: > >    #include > >    struct A >    { >      char c; >      int &i; >    }; > >    int j = offsetof (A, i);            // { dg-warning "invalid > access|offsetof" } > >    template >    st

Re: fix incorrect SRA transformation on non-integral VIEW_CONVERT argument

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 3:37 PM, Olivier Hainque wrote: > Hello, > > For the  "PA(1).Z := 44;" assignment in the attached Ada > testcase, we observe the gcc 4.5 SRA pass performing an > invalid transformation, turning: > >  struct { >    system__pack_48__bits_48 OBJ; >  } D.1432; > >  D.1432.OBJ =

[PATCH 12/13] Adjust relevant test cases wrt -ftrack-macro-expansion=[0|2]

2012-04-25 Thread Dodji Seketeli
Even after all the patches I have already submitted for this -ftrack-macro-expansion business, some test cases where errors happens on tokens that are defined in macros see their output change in an incompatible way, when you run them with or without -ftrack-macro-expansion. I think this is expect

[C++ Patch] PR 53096

2012-04-25 Thread Paolo Carlini
Hi, this PR is about the resolution of core/1333 being unimplemented, thus we reject things like: struct foo { foo(foo&) = default; // ERROR HERE }; (and this can be annoying, as explained by Eric on the reflector, for example when one has to resort to out-of-class defaulti

RE: [Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Greta Yorsh
Richard Guenther wrote: > On Wed, Apr 25, 2012 at 3:34 PM, Greta Yorsh > wrote: > > Richard Guenther wrote: > >> On Wed, Apr 25, 2012 at 1:51 PM, Greta Yorsh > >> wrote: > >> > The test gcc.dg/vect/slp-perm-8.c fails on arm-none-eabi with neon > >> enabled: > >> > FAIL: gcc.dg/vect/slp-perm-8.c s

Re: [Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 4:27 PM, Greta Yorsh wrote: > Richard Guenther wrote: >> On Wed, Apr 25, 2012 at 3:34 PM, Greta Yorsh >> wrote: >> > Richard Guenther wrote: >> >> On Wed, Apr 25, 2012 at 1:51 PM, Greta Yorsh >> >> wrote: >> >> > The test gcc.dg/vect/slp-perm-8.c fails on arm-none-eabi wi

Re: [PATCH, tree-optimization] Fix for PR 52868

2012-04-25 Thread Igor Zamyatin
On Wed, Apr 25, 2012 at 1:14 PM, Richard Guenther wrote: > On Wed, Apr 25, 2012 at 10:56 AM, Igor Zamyatin wrote: >> Hi all! >> >> I'd like to post for review the patch which makes some costs adjusting >> in get_computation_cost_at routine in ivopts part. >> As mentioned in the PR changes also fi

[PATCH 13/13] Switch -ftrack-macro-expansion=2 on by default.

2012-04-25 Thread Dodji Seketeli
Hopefully closing the series, this patch switches the compiler to -ftrack-macro-expansion=2 by default. Tested and bootstrapped on x86_64-unknown-linux-gnu against trunk. libcpp/ * init.c (cpp_create_reader): Switch -ftrack-macro-expansion=2 on by default. Add comments. gcc/doc

Re: [PATCH, tree-optimization] Fix for PR 52868

2012-04-25 Thread Richard Guenther
On Wed, Apr 25, 2012 at 4:32 PM, Igor Zamyatin wrote: > On Wed, Apr 25, 2012 at 1:14 PM, Richard Guenther > wrote: >> On Wed, Apr 25, 2012 at 10:56 AM, Igor Zamyatin wrote: >>> Hi all! >>> >>> I'd like to post for review the patch which makes some costs adjusting >>> in get_computation_cost_at r

Re: [C] improve missing initializers diagnostics

2012-04-25 Thread H.J. Lu
On Sat, Apr 21, 2012 at 4:58 AM, Manuel López-Ibáñez wrote: > This patch improves missing initializers diagnostics. From: > > pr36446.c:13:3: warning: missing initializer [-Wmissing-field-initializers] >   .h = {1}, >   ^ > pr36446.c:13:3: warning: (near initialization for ‘m0.h.b’) > [-Wmissing-f

Re: [PATCH 08/11] Make conversion warnings work on NULL with -ftrack-macro-expansion

2012-04-25 Thread Dodji Seketeli
Gabriel Dos Reis writes: > Thanks. But a point of the suggestion was that we won't need the > same comment/explanation duplicated over at least 3 places. Just > one. All those three places deal exactly with one instance: null > pointer constant. That deserves a function in and of itself, whic

RE: [Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Greta Yorsh
> -Original Message- > From: Richard Guenther [mailto:richard.guent...@gmail.com] > Sent: 25 April 2012 15:32 > To: Greta Yorsh > Cc: gcc-patches@gcc.gnu.org; mikest...@comcast.net; r...@cebitec.uni- > bielefeld.de; Richard Earnshaw > Subject: Re: [Patch, testsuite] fix failure in test gc

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Jan Hubicka
Hi, the fortran problem is caused by fact that fortran does nested funtions that are static constructors. I did not really think of that case in cgraph construction code. Fixed thus. Honza PR middle-end/53089 * cgraphunit.c (cgraph_process_new_functions): Do not enqueue new fun

[Ada] Atomic protected types

2012-04-25 Thread Arnaud Charlet
This patch cleans up the implementation of atomic protected types. No changes in behavior. Tested on x86_64-pc-linux-gnu, committed on trunk 2012-04-25 Hristian Kirtchev * exp_ch9.adb: Rename Lock_Free_Sub_Type to Lock_Free_Subprogram. Remove type Subprogram_Id. Rename

Re: [PATCH 11/13] Fix va_start related location

2012-04-25 Thread Dodji Seketeli
Gabriel Dos Reis writes: > On Wed, Apr 25, 2012 at 9:04 AM, Dodji Seketeli wrote: >> In gcc/testsuite/gcc.dg/pr30457.c, the first warning was not being >> emitted because the relevant location was inside the var_start macro >> defined in a system header.  It can even point to a token for a >> bu

Re: [PATCH 08/11] Make conversion warnings work on NULL with -ftrack-macro-expansion

2012-04-25 Thread Gabriel Dos Reis
OK, thanks! -- Gaby

Re: [PATCH 11/13] Fix va_start related location

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 10:20 AM, Dodji Seketeli wrote: > Gabriel Dos Reis writes: > >> On Wed, Apr 25, 2012 at 9:04 AM, Dodji Seketeli wrote: >>> In gcc/testsuite/gcc.dg/pr30457.c, the first warning was not being >>> emitted because the relevant location was inside the var_start macro >>> defin

Re: [PATCH 12/13] Adjust relevant test cases wrt -ftrack-macro-expansion=[0|2]

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 9:16 AM, Dodji Seketeli wrote: > Even after all the patches I have already submitted for this > -ftrack-macro-expansion business, some test cases where errors happens > on tokens that are defined in macros see their output change in an > incompatible way, when you run them

Re: [PATCH 13/13] Switch -ftrack-macro-expansion=2 on by default.

2012-04-25 Thread Gabriel Dos Reis
On Wed, Apr 25, 2012 at 9:33 AM, Dodji Seketeli wrote: > Hopefully closing the series, this patch switches the compiler to > -ftrack-macro-expansion=2 by default. > > Tested and bootstrapped on x86_64-unknown-linux-gnu against trunk. Makes sense to me; Tom? -- Gaby

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Teresa Johnson
On Tue, Apr 24, 2012 at 4:38 PM, Steven Bosscher wrote: > On Tue, Apr 24, 2012 at 11:26 PM, Teresa Johnson wrote: > >>        * params.def (PARAM_MIN_ITER_UNROLL_WITH_BRANCHES): New param. >>        (PARAM_UNROLL_OUTER_LOOP_BRANCH_BUDGET): Ditto. > > You should add documentation for these new PAR

Re: [PATCH 05/11] Make expand_location resolve to locus in main source file

2012-04-25 Thread Dodji Seketeli
I have re-based my tree on top of a recent tree that incorporates the changes for caret diagnostics and I had to update this patch accordingly. Here is its new version on trunk of today. It basically updates the new diagnostic_show_locus function to point to spelling locations. The patch does pa

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Teresa Johnson
On Tue, Apr 24, 2012 at 6:13 PM, Andi Kleen wrote: > tejohn...@google.com (Teresa Johnson) writes: > >> This patch adds heuristics to limit unrolling in loops with branches that >> may increase >> branch mispredictions. It affects loops that are not frequently iterated, >> and that are >> nested

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Teresa Johnson
On Wed, Apr 25, 2012 at 2:03 AM, Richard Guenther wrote: > On Tue, Apr 24, 2012 at 11:26 PM, Teresa Johnson wrote: >> This patch adds heuristics to limit unrolling in loops with branches that >> may increase >> branch mispredictions. It affects loops that are not frequently iterated, >> and tha

Re: [RFA] Update config.sub to 2012-04-18 version.

2012-04-25 Thread Joel Brobecker
> ChangeLog: > > * config.sub: Update to 2012-04-18 version from official repo. Thanks to everyone who answered. This patch is no in, both GCC & src. -- Joel

Re: [PATCH] Default to -gdwarf-4

2012-04-25 Thread Richard Henderson
On 04/25/12 06:47, Jakub Jelinek wrote: > 2012-04-25 Jakub Jelinek > > * common.opt (flag_debug_types_section): Default to 0. > (dwarf_version): Default to 4. > (dwarf_record_gcc_switches): Default to 1. > (dwarf_strict): Default to 0. > * toplev.c (process_options

Re: [C] improve missing initializers diagnostics

2012-04-25 Thread Manuel López-Ibáñez
On 25 April 2012 16:46, H.J. Lu wrote: > On Sat, Apr 21, 2012 at 4:58 AM, Manuel López-Ibáñez > wrote: >> This patch improves missing initializers diagnostics. From: >> >> pr36446.c:13:3: warning: missing initializer [-Wmissing-field-initializers] >>   .h = {1}, >>   ^ >> pr36446.c:13:3: warning:

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-04-25 Thread Xinliang David Li
I think the general mechanism applies to most of the targets. What is needed is target specific parameter (branch budget) tuning which can be done separately -- there exist a way to do that already. David On Wed, Apr 25, 2012 at 2:03 AM, Richard Guenther wrote: > On Tue, Apr 24, 2012 at 11:26 PM

Re: [Patch, testsuite] fix failure in test gcc.dg/vect/slp-perm-8.c

2012-04-25 Thread Richard Earnshaw
On 25/04/12 15:31, Richard Guenther wrote: > On Wed, Apr 25, 2012 at 4:27 PM, Greta Yorsh wrote: >> Richard Guenther wrote: >>> On Wed, Apr 25, 2012 at 3:34 PM, Greta Yorsh >>> wrote: Richard Guenther wrote: > On Wed, Apr 25, 2012 at 1:51 PM, Greta Yorsh > wrote: >> The test gcc

Re: various minor obvious fixes in th track-macro-expansion code

2012-04-25 Thread Dodji Seketeli
Manuel López-Ibáñez writes: > Hi Dodji, Hello Manuel, Sorry for my late reply, I was on the road. > I was going to commit this as obvious, but I want to make sure that it > doesn't conflict with your new track-macro-expansion patches. It can > also wait until you commit all your patches. [sni

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Steven Bosscher
On Wed, Apr 25, 2012 at 5:04 PM, Jan Hubicka wrote: > + /* Return true when there are references to NODE.  */ > + > + static bool > + referred_to_p (symtab_node node) > + { > +   int i; > +   struct ipa_ref *ref; > + > +   for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list, i, > r

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Jan Hubicka
> On Wed, Apr 25, 2012 at 5:04 PM, Jan Hubicka wrote: > > + /* Return true when there are references to NODE.  */ > > + > > + static bool > > + referred_to_p (symtab_node node) > > + { > > +   int i; > > +   struct ipa_ref *ref; > > + > > +   for (i = 0; ipa_ref_list_referring_iterate (&node->symb

Re: Symbol table 14/many: cleanups of cgraphunit.c

2012-04-25 Thread Steven Bosscher
Hello, Thanks for this work! Below are a bunch of spelling fixes ;-) On Wed, Apr 25, 2012 at 6:32 PM, Jan Hubicka wrote: > --- 19,28 >  along with GCC; see the file COPYING3.  If not see >  .  */ > > ! /* This module implements main driver of compilation proc

Re: [PATCH 13/13] Switch -ftrack-macro-expansion=2 on by default.

2012-04-25 Thread Tom Tromey
> "Gaby" == Gabriel Dos Reis writes: Gaby> On Wed, Apr 25, 2012 at 9:33 AM, Dodji Seketeli wrote: >> Hopefully closing the series, this patch switches the compiler to >> -ftrack-macro-expansion=2 by default. >> >> Tested and bootstrapped on x86_64-unknown-linux-gnu against trunk. Gaby> Mak

Re: FW: [v3] libstdc++/52689 testcase

2012-04-25 Thread Jonathan Wakely
On 25 April 2012 08:33, Igor Zamyatin wrote: > This testcase is reported as failed on x86 Yep. http://gcc.gnu.org/ml/gcc-testresults/2012-04/msg02547.html Benjamin? >> >> Noticed that this testcase wasn't put in as part of the patch. Fixed as >> follows. >> >> tested x86/linux >> >> -benjamin

[v3] fix scoped_allocator problems

2012-04-25 Thread Jonathan Wakely
* include/std/scoped_allocator (scoped_allocator::__outermost): Do not pass non-POD to varargs function. * testsuite/20_util/scoped_allocator/1.cc: Fix test. This fixes a potential problem in and fixes a broken test (and ensures it actually runs!) Tested x86_64-linux, com

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Jan Hubicka
> > On Wed, Apr 25, 2012 at 5:04 PM, Jan Hubicka wrote: > > > + /* Return true when there are references to NODE.  */ > > > + > > > + static bool > > > + referred_to_p (symtab_node node) > > > + { > > > +   int i; > > > +   struct ipa_ref *ref; > > > + > > > +   for (i = 0; ipa_ref_list_referring_

Re: Symbol table 14/many: cleanups of cgraphunit.c

2012-04-25 Thread Jan Hubicka
> Hello, > > Thanks for this work! > > Below are a bunch of spelling fixes ;-) Thanks! > >        The function can be called multiple times when multiple source level > > !       compilation units are combined. > > Is this still applicable? I thought -combine was removed. Or is this > for thing

Re: PATCH: PR debug/52857: DW_OP_GNU_regval_type is generated with INVALID_REGNUM

2012-04-25 Thread Richard Henderson
On 04/25/12 06:59, H.J. Lu wrote: > PR debug/52857 > * dwarf2out.c (dbx_reg_number): Assert return value != > INVALID_REGNUM. Ok. r~

Re: Symbol table 13/many: reachability code rewrite

2012-04-25 Thread Richard Henderson
On 04/25/12 11:46, Jan Hubicka wrote: >>> On Wed, Apr 25, 2012 at 5:04 PM, Jan Hubicka wrote: + /* Return true when there are references to NODE. */ + + static bool + referred_to_p (symtab_node node) + { + int i; + struct ipa_ref *ref; + + for (i

[PATCH][Cilkplus] Elemental function insertion

2012-04-25 Thread Iyer, Balaji V
Hello Everyone, This patch is for the Cilkplus branch affecting both C and C++ compilers. This patch will insert elemental functions when the loop is vectorized. Thanking You, Yours Sincerely, Balaji V. Iyer.diff --git a/gcc/cilk.h b/gcc/cilk.h index 27d5dd0..27ccd16 100644 --- a/gcc/cilk.h

[PATCH] Improve andq $0xffffffff, %reg handling (PR target/53110)

2012-04-25 Thread Jakub Jelinek
Hi! We have a splitter for reg1 = reg2 & 0x, but only if regnums are different. But movl %edi, %edi is a cheaper variant of andq $0x, %rdi even with the same register and doesn't clobber flags, so this patch attempts to expand it as a zero extension early. Bootstrapped/regtested

Re: [PATCH] Improve andq $0xffffffff, %reg handling (PR target/53110)

2012-04-25 Thread Richard Henderson
On 04/25/12 12:14, Jakub Jelinek wrote: > 2012-04-25 Jakub Jelinek > > PR target/53110 > * config/i386/i386.md (and3): For andq $0x, reg > instead expand it as zero extension. Ok. r~

FW: [PATCH][Cilkplus] Elemental function insertion

2012-04-25 Thread Iyer, Balaji V
Sorry, I forgot to include Changelog entries. I am attaching the updated patch. Thanks, Balaji V. Iyer. From: Iyer, Balaji V Sent: Wednesday, April 25, 2012 3:08 PM To: gcc-patches@gcc.gnu.org Subject: [PATCH][Cilkplus] Elemental function insertion Hello

Re: [PATCH] Validate the HLE memory models.

2012-04-25 Thread Richard Henderson
On 04/25/12 01:29, Andi Kleen wrote: > gcc/: > 2012-04-24 Andi Kleen > > * builtins.c (get_memmodel): Add val. Call target.memmodel_check > and return new variable. > * config/i386/i386.c (ix86_memmodel_check): Add. > (TARGET_MEMMODEL_MASK): Replace with TARGET_MEMMODEL_

[lra] patch to fix some LRA failures of GCC tests on PA-RISC

2012-04-25 Thread Vladimir Makarov
The following patch fixes some testsuite regressions of LRA in comparison with reload on PA-RISC. There are still few regressions which I'll work on later. The patch was bootstrapped on x86/x86-64. Committed as rev. 186823. 2012-04-25 Vladimir Makarov * lra-constraints.c (get_op_m

[google-4_6] fix broken -S in streaming LIPO (issue6115052)

2012-04-25 Thread Rong Xu
Hi, This patch is for google-4_6 branch only. It fixes the broken -S in streaming LIPO mode. Tested with bootstrap. Thanks, 2012-04-25 Rong Xu * gcc/gcc.c (ripa_lto_spec): Support -S. (cc1_options): Ditto. Index: gcc/gcc.c ==

  1   2   >