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

2012-04-27 Thread Igor Zamyatin
Are you sure that tree-level unrollers are turned on at O2? My impression was that they work only at O3 or with f[unroll,peel]-loops flags. 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 loop

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

2012-04-27 Thread Xinliang David Li
On Fri, Apr 27, 2012 at 12:07 AM, Igor Zamyatin wrote: > Are you sure that tree-level unrollers are turned on at O2? My > impression was that they work only at O3 or with f[unroll,peel]-loops > flags. yes they are on but only have effect on tiny loops with very small trip count. With O3 or with -

Re: [patch] Simplify tree-switch-conversion.c a bit - prep work for gimple switch lowering

2012-04-27 Thread Richard Guenther
On Thu, Apr 26, 2012 at 7:48 PM, Steven Bosscher wrote: > Hello, > > The attached patch re-organizes some code in tree-switch-conversion.c. > All information about a GIMPLE_SWITCH is now collected by one > function, so that my switch lowering code can use the same > switch_conv_info. Bootstrapped&

Re: combine_conversions int->double->int

2012-04-27 Thread Richard Guenther
On Thu, Apr 26, 2012 at 8:43 PM, Marc Glisse wrote: > On Thu, 26 Apr 2012, Richard Guenther wrote: > >> On Wed, Apr 25, 2012 at 3:58 PM, Marc Glisse wrote: >>> >>> Here is take 2 on this patch, which seems cleaner. Bootstrapped and >>> regression tested. >>> >>> gcc/ChangeLog >>> >>> 2012-04-25  

Re: [C] improve missing initializers diagnostics

2012-04-27 Thread Manuel López-Ibáñez
On 25 April 2012 18:08, Manuel López-Ibáñez wrote: > 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-init

Re: Continue strict-volatile-bitfields fixes

2012-04-27 Thread Jakub Jelinek
On Fri, Apr 27, 2012 at 12:42:41PM +0800, Thomas Schwinge wrote: > > > GET_MODE_BITSIZE (lmode)« (8 bits).  (With the current sources, lmode is > > > VOIDmode.) > > > > > > Is emmitting »BIT_FIELD_REF <*common, 32, 0> & 255« wrong in this case, > > > or should a later optimization pass be able to f

Re: combine_conversions int->double->int

2012-04-27 Thread Marc Glisse
On Fri, 27 Apr 2012, Richard Guenther wrote: Do you have a copyright assignment on file? Yes. -- Marc Glisse

Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-27 Thread Andrew Stubbs
Ping. On 10/04/12 14:00, Andrew Stubbs wrote: Ping. On 30/03/12 12:15, Andrew Stubbs wrote: On 28/02/12 16:20, Andrew Stubbs wrote: Hi all, This patch implements 64-bit immediate constant loads in NEON. The current state is that you can load const_vector, but not const_int. This is clearly

Re: [C11-atomic] [patch] gimple atomic statements

2012-04-27 Thread Richard Guenther
On Thu, Apr 26, 2012 at 7:53 PM, Andrew MacLeod wrote: > On 04/05/2012 05:14 AM, Richard Guenther wrote: >> >> >> Ok.  Remember that you should use non-tree things if you can in GIMPLE >> land.  This probably means that both the size and the memmodel "operands" >> should be >> >> + struct GTY(())

Re: [C11-atomic] [patch] gimple atomic statements

2012-04-27 Thread Richard Guenther
On Thu, Apr 26, 2012 at 10:07 PM, Andrew MacLeod wrote: > On 04/05/2012 05:14 AM, Richard Guenther wrote: >> >> + static inline bool >> + gimple_atomic_has_fail_order (const_gimple gs) >> + { >> +   return gimple_atomic_kind (gs) == GIMPLE_ATOMIC_COMPARE_EXCHANGE; >> + } >> >> btw, these kind of p

Re: Continue strict-volatile-bitfields fixes

2012-04-27 Thread Richard Guenther
On Fri, Apr 27, 2012 at 10:29 AM, Jakub Jelinek wrote: > On Fri, Apr 27, 2012 at 12:42:41PM +0800, Thomas Schwinge wrote: >> > > GET_MODE_BITSIZE (lmode)« (8 bits).  (With the current sources, lmode is >> > > VOIDmode.) >> > > >> > > Is emmitting »BIT_FIELD_REF <*common, 32, 0> & 255« wrong in thi

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

2012-04-27 Thread Richard Guenther
On Fri, Apr 27, 2012 at 8:20 AM, Tom de Vries wrote: > On 26/04/12 12:20, Richard Guenther wrote: >> On Wed, Apr 25, 2012 at 11:56 PM, Tom de Vries >> wrote: >>> On 25/04/12 11:57, Richard Guenther wrote: >>> Hmm.  I'm not sure we can conclude that they have the same value! >>

Re: Continue strict-volatile-bitfields fixes

2012-04-27 Thread Jakub Jelinek
On Fri, Apr 27, 2012 at 11:00:19AM +0200, Richard Guenther wrote: > But won't it re-introduce bugs like PR52080, 52097 or 48124? Also the No. All those are about bitfield stores, not reads. All extract_bit* functions currently pass 0, 0 as bitrange_{start,end}. > proper place for this optimiza

Request new specs string token for multilib_os_dir

2012-04-27 Thread Steven Drake
In the GCC FAQ under "Dynamic linker is unable to find GCC libraries", one suggestion is to add '-R' or '-rpath' linker option to the *link or *lib specs so that the GCC libraries can be found. E.G. the following line is added to the DRIVER_DEFINES when building gcc via pkgsrc ('$(LINKER_RPATH_FL

[patch] Obvious: Fix DF solution dirty marking in cfg.c:disconnect_src

2012-04-27 Thread Steven Bosscher
Hello, It makes no sense to mark DF solutions dirty on the gcc_unreachable() path but not on the return path. Bootstrapped&tested on x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu. I'll this, as obvious, some time late next week unless I hear objections. Ciao! Steven * cfg.c

Re: [patch] Obvious: Fix DF solution dirty marking in cfg.c:disconnect_src

2012-04-27 Thread Paolo Bonzini
Il 27/04/2012 11:18, Steven Bosscher ha scritto: > Hello, > > It makes no sense to mark DF solutions dirty on the gcc_unreachable() > path but not on the return path. > > Bootstrapped&tested on x86_64-unknown-linux-gnu and > powerpc64-unknown-linux-gnu. I'll this, as obvious, some time late > nex

[PATCH] teach emit_store_flag to use clz/ctz

2012-04-27 Thread Paolo Bonzini
If the value at zero is outside the range [0, GET_MODE_BITSIZE (mode)), "A != 0" and "A == 0" can be compiled to clz/ctz followed by a subtraction or one's complement (only for A != 0) and a shift. This trick can be used effectively on PPC (though there are other problems in the machine descriptio

[PATCH] pr53138 - miscompilation of spaceship operator

2012-04-27 Thread Paolo Bonzini
.md (x86_movcc_0_m1_neg): Add clobber. 2012-04-27 Paolo Bonzini PR target/53138 * gcc.c-torture/execute/20120427-1.c: New testcase. Index: config/i386/i386.md === --- config/i386/i386.md (revisione 186859

[PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Paolo Bonzini
(conditional_replacement): Replace PHIs whose arguments are -1 and 0, by negating the result of the conditional. 2012-04-27 Paolo Bonzini * gcc.c-torture/execute/20120427-2.c: New testcase. * gcc.dg/tree-ssa/phi-opt-10.c: New testcase. Index: tree-ssa-phiopt.c

Re: [PATCH] pr53138 - miscompilation of spaceship operator

2012-04-27 Thread Uros Bizjak
On Fri, Apr 27, 2012 at 11:49 AM, Paolo Bonzini wrote: > The testcase is miscompiled to this: > >        ... >        movl    (%rsi), %ecx >        cmpl    %ecx, (%rdi) >        sbbl    %edx, %edx >        cmovbe  %edx, %eax >        ret > > but sbbl only preserves the carry flag, not the zero fla

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

2012-04-27 Thread Eric Botcazou
> To followup myself - bootstrap with just the 2nd patch is still > broken: > > /abuild/rguenther/obj2/./gcc/xgcc -B/abuild/rguenther/obj2/./gcc/ > -B/usr/local/x86_64-unknown-linux-gnu/bin/ > -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem > /usr/local/x86_64-unknown-linux-gnu/include -isystem

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

2012-04-27 Thread Eric Botcazou
> Ah, and all ACATS fails and > > -FAIL: gnat.dg/loop_optimization3.adb (test for excess errors) > -FAIL: gnat.dg/loop_optimization3.adb execution test > -FAIL: gnat.dg/test_8bitlong_overflow.adb (test for excess errors) > -FAIL: gnat.dg/test_8bitlong_overflow.adb execution test > > are fixed by fo

Re: [PATCH] teach emit_store_flag to use clz/ctz

2012-04-27 Thread Paolo Bonzini
> Index: config/rs6000/rs6000.md > === > --- config/rs6000/rs6000.md (revisione 186859) > +++ config/rs6000/rs6000.md (copia locale) > @@ -2129,7 +2129,7 @@ > (define_expand "abssi2" >[(set (match_operand:SI 0 "gpc_reg_operan

Re: [patch] Fix cygwin ada install [was Re: Yet another issue with gcc current trunk with ada on cygwin]

2012-04-27 Thread Pascal Obry
Le 06/04/2012 17:27, Pascal Obry a écrit : > > Back on this! It turn out that this breaks the shared Ada runtime. > Indeed, exported variables on Ada packages in a DLLs are only accessible > when linking against DLL (thanks to runtime pseudo reloc). > > With the patch applied it is not possible t

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Richard Guenther
chard. > Paolo > > 2012-04-27 Paolo Bonzini > > * tree-ssa-phiopt.c (conditional_replacement): Replace PHIs > whose arguments are -1 and 0, by negating the result of the > conditional. > > 2012-04-27 Paolo Bonzini > > *

Re: set the correct block info for the call stmt in fnsplit (issue6111050)

2012-04-27 Thread Eric Botcazou
> We do not depend on the block structure any more when dealing with > stack layout for variables in GCC 4.7.0 and above. I am not saying > your patch is incorrect or not needed. Just it will not have an > effect on variable stack layout. It might be worth backporting to the 4.6 branch though, t

[Patch,4.7,committed]: Fix PR c/51527

2012-04-27 Thread Georg-Johann Lay
http://gcc.gnu.org/viewcvs?view=revision&revision=186899 Applied as approved in http://gcc.gnu.org/ml/gcc/2012-04/msg00843.html Johann PR c/51527 * convert.c (convert_to_integer): Avoid infinite recursion for target-defined built-in types. Index: convert.c ==

Re: set the correct block info for the call stmt in fnsplit (issue6111050)

2012-04-27 Thread Richard Guenther
On Fri, Apr 27, 2012 at 12:50 PM, Eric Botcazou wrote: >> We do not depend on the block structure any more when dealing with >> stack layout for variables in GCC 4.7.0 and above.  I am not saying >> your patch is incorrect or not needed.  Just it will not have an >> effect on variable stack layout

Re: [PATCH] teach emit_store_flag to use clz/ctz

2012-04-27 Thread Richard Guenther
On Fri, 27 Apr 2012, Paolo Bonzini wrote: > If the value at zero is outside the range [0, GET_MODE_BITSIZE (mode)), > "A != 0" and "A == 0" can be compiled to clz/ctz followed by a subtraction > or one's complement (only for A != 0) and a shift. This trick can be > used effectively on PPC (though

[PATCH] Remove is_hidden_global_store

2012-04-27 Thread Richard Guenther
This removes is_hidden_global_store in favor of two functions with more clear semantics. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2012-04-27 Richard Guenther * tree-flow.h (is_hidden_global_store): Remove. * tree-ssa-sink.c (is_hidden_global_store): Like

Re: [PATCH] Proper use of decl_function_context in dwar2out.c

2012-04-27 Thread Martin Jambor
Hi, I'd like to drag some attention to this bug again, it is the only ICE when LTO building Firefox with debug info and the problem also happens with the 4.7 so it would be nice to have this fixed for 4.7.1. On Mon, Mar 12, 2012 at 11:51:05AM +0100, Richard Guenther wrote: > On Thu, Mar 8, 2012 a

Re: [PATCH] Support for known unknown alignment

2012-04-27 Thread Martin Jambor
Hi, On Tue, Apr 24, 2012 at 12:31:38PM +0200, Martin Jambor wrote: > Hi, > > On Mon, Apr 23, 2012 at 03:30:19PM +0200, Richard Guenther wrote: > > On Mon, 23 Apr 2012, Martin Jambor wrote: > > > > > Hi, > > > > > > On Mon, Apr 23, 2012 at 12:50:51PM +0200, Richard Guenther wrote: > > > > On Fri

Re: set the correct block info for the call stmt in fnsplit (issue6111050)

2012-04-27 Thread Jan Hubicka
> On Fri, Apr 27, 2012 at 12:50 PM, Eric Botcazou wrote: > >> We do not depend on the block structure any more when dealing with > >> stack layout for variables in GCC 4.7.0 and above.  I am not saying > >> your patch is incorrect or not needed.  Just it will not have an > >> effect on variable st

Re: [C11-atomic] [patch] gimple atomic statements

2012-04-27 Thread Andrew MacLeod
On 04/27/2012 04:37 AM, Richard Guenther wrote: Since integral atomics are always of an unsigned type , I could switch over and use 'unsigned size' instead of 'tree fntype' for them (I will rename it), but then things may be more complicated when dealing with generic atomics... those can be st

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

2012-04-27 Thread Igor Zamyatin
On Wed, Apr 25, 2012 at 6:41 PM, Richard Guenther wrote: > 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

Re: [PATCH] teach emit_store_flag to use clz/ctz

2012-04-27 Thread Paolo Bonzini
Il 27/04/2012 13:16, Richard Guenther ha scritto: > In optabs.c we compare the CTZ_DEFINED_VALUE_AT_ZERO against two, > is != 0 really what you want here? The docs suggest to me > that as you are using the optab below you should compare against two, too. Interesting, first time I hear about this.

Re: [PATCH, i386, middle-end, tessuite] Intel TSX's HLE.

2012-04-27 Thread Kirill Yukhin
Hello guys, After conversation in IRC with Richard, I've slightly updated the patch. 1. According to Richards suggestion I moved PTA_HLE to `generic` march. 2. Applied and updated Andi's patch (see [1]). 3. Updated tests to use proper memory model combintations 4. Added 1-sentense description to ex

[PATCH] x86: emit tzcnt unconditionally

2012-04-27 Thread Paolo Bonzini
tzcnt is encoded as "rep;bsf" and unlike lzcnt is a drop-in replacement if we don't care about the flags (it has the same semantics for non-zero values). Since bsf is usually slower, just emit tzcnt unconditionally. However, write it as rep;bsf unless -mbmi is in use, to cater for old assemblers.

Re: [C11-atomic] [patch] gimple atomic statements

2012-04-27 Thread Andrew MacLeod
On 04/27/2012 04:52 AM, Richard Guenther wrote: hmm, yeah they always return a value. I was just copying the gimple_call code... Why would we need to do this processing for a GIMPLE_CALL lhs and not a GIMPLE_ATOMIC lhs? GIMPLE_CALL lhs can be memory if the call returns an aggregate, similar

dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-04-27 Thread Mark Wielaard
Hi, The DWARF spec says (since version 4) that DW_AT_high_pc can be represented by a constant form. If the value of the DW_AT_high_pc is of class address, it is the relocated address of the first location past the last instruction associated with the entity; if it is of cl

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread H.J. Lu
On Thu, Apr 26, 2012 at 10:08 PM, Sriraman Tallam wrote: > Hi, > >   I have made the following changes in this new patch which is attached: > > * Use target attribute itself to create function versions. > * Handle any number of ISA names and arch=  args to target attribute, > generating the right

Re: dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-04-27 Thread Jakub Jelinek
On Fri, Apr 27, 2012 at 03:36:56PM +0200, Mark Wielaard wrote: > But even without this, I think the patch is worth it just to get rid of > all the relocations necessary otherwise. IMHO we should defer applying this by a few months, given that GDB support is only being added these days and -gdwarf-

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-27 Thread Manuel López-Ibáñez
On 26 April 2012 12:12, Dodji Seketeli wrote: > Manuel López-Ibáñez a écrit: > >> On 21 April 2012 14:56, Jason Merrill wrote: >>> It seems like we'll do this for every line in the header, which could lead >>> to a lot of leaked memory.  Instead, we should canonicalize when setting >>> ORDINARY_

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

2012-04-27 Thread H.J. Lu
On Wed, Apr 25, 2012 at 6:23 AM, Ulrich Weigand wrote: > 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. > This caused: http://gcc.gnu.org/bugzilla/

Re: RFA: consolidate DWARF strings into libiberty

2012-04-27 Thread Tom Tromey
> "Jakub" == Jakub Jelinek writes: Jakub> On Thu, Apr 26, 2012 at 01:52:31PM -0400, DJ Delorie wrote: >> >> I will not oppose adding more unrelated stuff to libiberty, but >> neither will I approve it. I will let one of the other maintainers or >> a global maintainer approve it. Jakub> The

Re: PR c++/52538 Extend C++11 UDLs to be compatible with inttypes.h macros (issue6109043)

2012-04-27 Thread Ollie Wild
On Thu, Apr 26, 2012 at 8:35 AM, Tom Tromey wrote: > > This is ok with this change. Thanks. Updated and submitted to trunk. Ollie

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread Sriraman Tallam
On Fri, Apr 27, 2012 at 6:38 AM, H.J. Lu wrote: > On Thu, Apr 26, 2012 at 10:08 PM, Sriraman Tallam wrote: >> Hi, >> >>   I have made the following changes in this new patch which is attached: >> >> * Use target attribute itself to create function versions. >> * Handle any number of ISA names and

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 7:35 AM, Sriraman Tallam wrote: > On Fri, Apr 27, 2012 at 6:38 AM, H.J. Lu wrote: >> On Thu, Apr 26, 2012 at 10:08 PM, Sriraman Tallam >> wrote: >>> Hi, >>> >>>   I have made the following changes in this new patch which is attached: >>> >>> * Use target attribute itself

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread Sriraman Tallam
On Fri, Apr 27, 2012 at 7:38 AM, H.J. Lu wrote: > On Fri, Apr 27, 2012 at 7:35 AM, Sriraman Tallam wrote: >> On Fri, Apr 27, 2012 at 6:38 AM, H.J. Lu wrote: >>> On Thu, Apr 26, 2012 at 10:08 PM, Sriraman Tallam >>> wrote: Hi,   I have made the following changes in this new patch

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

2012-04-27 Thread Dodji Seketeli
Gabriel Dos Reis writes: > 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 in

[PATCH, diagnostics] Add -Wvarargs option

2012-04-27 Thread Dodji Seketeli
Hello Gabriel, Following your request[1], please find below the implementation for the -Wvarargs option, as well as its introductory text. It applies on top the changes to enable -ftrack-macro-expansion by default[2]. [1]: http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01604.html [2]: http://gcc.g

Re: [PATCH][ARM] NEON DImode immediate constants

2012-04-27 Thread Richard Earnshaw
On 30/03/12 12:15, Andrew Stubbs wrote: > On 28/02/12 16:20, Andrew Stubbs wrote: >> Hi all, >> >> This patch implements 64-bit immediate constant loads in NEON. >> >> The current state is that you can load const_vector, but not const_int. >> This is clearly not ideal. The result is a constant pool

Re: [libcpp] maybe canonicalize system paths in line-map

2012-04-27 Thread Dodji Seketeli
Manuel López-Ibáñez a écrit: > Another drawback I didn't realize until now is that in this way the > canonicalize every path, instead of only touching those that belong to > system headers. Ah. Good catch. I guess file->dir->sysp should tell us if we are in a system directory, so that we can a

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 7:53 AM, Sriraman Tallam wrote: > On Fri, Apr 27, 2012 at 7:38 AM, H.J. Lu wrote: >> On Fri, Apr 27, 2012 at 7:35 AM, Sriraman Tallam wrote: >>> On Fri, Apr 27, 2012 at 6:38 AM, H.J. Lu wrote: On Thu, Apr 26, 2012 at 10:08 PM, Sriraman Tallam wrote: > Hi,

Re: User directed Function Multiversioning via Function Overloading (issue5752064)

2012-04-27 Thread Sriraman Tallam
On Fri, Apr 27, 2012 at 8:36 AM, H.J. Lu wrote: > On Fri, Apr 27, 2012 at 7:53 AM, Sriraman Tallam wrote: >> On Fri, Apr 27, 2012 at 7:38 AM, H.J. Lu wrote: >>> On Fri, Apr 27, 2012 at 7:35 AM, Sriraman Tallam >>> wrote: On Fri, Apr 27, 2012 at 6:38 AM, H.J. Lu wrote: > On Thu, Apr 2

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Andrew Pinski
are -1 and 0, by negating the result of the >        conditional. > > 2012-04-27  Paolo Bonzini   > >        * gcc.c-torture/execute/20120427-2.c: New testcase. >        * gcc.dg/tree-ssa/phi-opt-10.c: New testcase. > > > Index: tree-ssa-phiopt.c >

Re: [PATCH] Default to -gdwarf-4

2012-04-27 Thread H.J. Lu
On Wed, Apr 25, 2012 at 6:47 AM, Jakub Jelinek wrote: > 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

Re: [PATCH, i386, middle-end, tessuite] Intel TSX's HLE.

2012-04-27 Thread Richard Henderson
On 04/27/12 05:49, Kirill Yukhin wrote: > + if (targetm.memmodel_check) > +val = targetm.memmodel_check (val); > + else if (val & ~MEMMODEL_MASK) > + > +{ Incorrect vertical whitespace. > + if ( (failure & MEMMODEL_MASK) == MEMMODEL_RELEASE > + || (failure & MEMMODEL_MASK) == MEM

Re: RFA: consolidate DWARF strings into libiberty

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 7:11 AM, Tom Tromey wrote: >> "Jakub" == Jakub Jelinek writes: > > Jakub> On Thu, Apr 26, 2012 at 01:52:31PM -0400, DJ Delorie wrote: >>> >>> I will not oppose adding more unrelated stuff to libiberty, but >>> neither will I approve it.  I will let one of the other mai

Re: RFA: consolidate DWARF strings into libiberty

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 9:01 AM, H.J. Lu wrote: > On Fri, Apr 27, 2012 at 7:11 AM, Tom Tromey wrote: >>> "Jakub" == Jakub Jelinek writes: >> >> Jakub> On Thu, Apr 26, 2012 at 01:52:31PM -0400, DJ Delorie wrote: I will not oppose adding more unrelated stuff to libiberty, but ne

Re: RFA: consolidate DWARF strings into libiberty

2012-04-27 Thread Tom Tromey
HJ> You should add extern "C" for C++ on those functions moved to HJ> libiberty. Yeah, sorry about that. I'm testing the fix. Tom

Re: Fix find_moveable_pseudos, PR52997

2012-04-27 Thread Ulrich Weigand
Bernd Schmidt wrote: > We're creating new pseudos, and while we're resizing some data > structures, we aren't doing it for everything. > @@ -3983,7 +3983,8 @@ find_moveable_pseudos (void) > >last_moveable_pseudo = max_reg_num (); > > - fix_reg_equiv_init(); > + fix_reg_equiv_init (); >

libgo patch committed: Correct syscall.Setenv if no setenv

2012-04-27 Thread Ian Lance Taylor
This patch to libgo corrects the implementation of syscall.Setenv for systems that do not have the setenv library call, but only have putenv. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu and i386-sun-solaris2.9. Committed to mainline and 4.7 branch. Ian diff -r 1ed95295e00b libg

libgo patch committed: Work around bug in Solaris 9 ldexp

2012-04-27 Thread Ian Lance Taylor
The Solaris 9 ldexp function has a bug: ldexp(-1, -1075) returns positive zero when it should return negative zero. This patch works around this bug in the Go math package. This fixes part of PR 52358. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu and i386-sun-solaris2.9. Committ

libgo patch committed: Provide i386 long double math fns if needed

2012-04-27 Thread Ian Lance Taylor
This patch to libgo provides the long double math functions if they are not in the system libm. This is needed on i386 because the Go frontend automatically converts calls to these functions from float64 (aka C double) to C long double, as guided by express_precision_type. This is done so that th

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread H.J. Lu
On Fri, Apr 27, 2012 at 3:01 AM, Paolo Bonzini wrote: > This patch teaches phiopt to look at phis whose arguments are -1 and 0, > and produce negated setcc statements. > > Bootstrapped/regtested x86_64-pc-linux-gnu, together with the patch > for pr53138.  Ok for mainline? > > Paolo > > 2012-04-27

Re: RFA: consolidate DWARF strings into libiberty

2012-04-27 Thread Tom Tromey
> "Tom" == Tom Tromey writes: HJ> You should add extern "C" for C++ on those functions moved to HJ> libiberty. Tom> Yeah, sorry about that. Tom> I'm testing the fix. Here is what I am checking in. Tom ChangeLog: 2012-04-27 Tom Tromey * dwarf2.h: Wrap function declarations in e

Re: set the correct block info for the call stmt in fnsplit (issue6111050)

2012-04-27 Thread Rong Xu
On Fri, Apr 27, 2012 at 5:06 AM, Jan Hubicka wrote: >> On Fri, Apr 27, 2012 at 12:50 PM, Eric Botcazou >> wrote: >> >> We do not depend on the block structure any more when dealing with >> >> stack layout for variables in GCC 4.7.0 and above.  I am not saying >> >> your patch is incorrect or not

Re: dwarf2out.c: For DWARF 4+, output DW_AT_high_pc as constant offset.

2012-04-27 Thread Mark Wielaard
On Fri, 2012-04-27 at 15:43 +0200, Jakub Jelinek wrote: > On Fri, Apr 27, 2012 at 03:36:56PM +0200, Mark Wielaard wrote: > > But even without this, I think the patch is worth it just to get rid of > > all the relocations necessary otherwise. > > IMHO we should defer applying this by a few months,

[PATCH] libatomic, v2

2012-04-27 Thread Richard Henderson
This tree is also available from git://repo.or.cz/gcc/rth.git rth/libatomic Changes since v1: * I believe I've addressed all of Torvald's feedback especially re barrier problems. I have not changed the lock hash function, as there were no concrete suggestions, and certainly that ough

Re: [PATCH] teach phi-opt to produce -(a COND b)

2012-04-27 Thread Paolo Bonzini
> This caused: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53144 Looks like a PPRE bug. Paolo

[committed] Fix section conflict compiling rtld.c

2012-04-27 Thread John David Anglin
The attached change fixes a problem compiling the linux dynamic loader for the PA target. Putting function labels (plabels) in the constant pool results in a section flag conflict compiling rtld.c. Other targets don't do this, and testing indicates that it is not necessary. Tested on hppa-unknow

Re: [PATCH] Proper use of decl_function_context in dwar2out.c

2012-04-27 Thread Jason Merrill
On 04/27/2012 07:56 AM, Martin Jambor wrote: PR lto/53138 * dwarf2out.c (dwarf2out_decl): Only lookup die representing context of a variable when the contect is a function. OK. Jason

[ARM] Add atomic_loaddi pattern

2012-04-27 Thread Richard Henderson
We can perform a single-copy atomic load with an ldrexd insn. If the load is all we care about, we need not pair this with a strexd. Ok? r~ * config/arm/arm.md (UNSPEC_LL): New. * config/arm/sync.md (atomic_loaddi, atomic_loaddi_1): New. diff --git a/gcc/config/arm/arm.md b/gcc/

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

2012-04-27 Thread Dodji Seketeli
Dodji Seketeli writes: > Tested on x86_64-unknown-linux-gnu against trunk. Bootstrap is still > running ... > > * builtins.c (fold_builtin_next_arg): Unwinds to the first > location in real source code. > --- > gcc/builtins.c | 23 +++ > 1 files changed, 19 in

Re: [PATCH, diagnostics] Add -Wvarargs option

2012-04-27 Thread Dodji Seketeli
Dodji Seketeli writes: > Tested on x86_64-unknown-linux-gnu against trunk. Bootstrap for all > languages is still underway. > > gcc/c-family/ > > * c.opt (Wvarargs): Define new option. > > gcc/ > builtins.c (fold_builtin_next_arg): Use OPT_Wvarargs as an > argument for the v

Go patch committed: Use less memory for some array/slice literals

2012-04-27 Thread Ian Lance Taylor
This patch to the Go frontend changes the representation of array/slice literals to use less memory when the literal uses index keys. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r ebdbe2ad3ef6 go/expressions.cc --- a/go/expression

[RFH / Patch] PR 51222

2012-04-27 Thread Paolo Carlini
Hi, I'm having a look to this PR filed by Daniel, which is again about SFINAE for combined delete / new expressions, eg a simple example could be (Daniel provided tens) template auto g(int) -> char; template auto g(...) -> char(&)[2]; static_assert(sizeof(g(0)) == 2, "Ouch"); We handle inc

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

2012-04-27 Thread Maxim Kuvyrkov
On 27/04/2012, at 1:17 AM, Richard Guenther wrote: > On Wed, Apr 25, 2012 at 8:06 AM, Maxim Kuvyrkov > wrote: > ... > +ppre_n_insert_for_speed_p (pre_expr expr, basic_block block, > + unsigned int inserts_needed) > +{ > + /* The more expensive EXPR is, the more we shou

Re: [RFH / Patch] PR 51222

2012-04-27 Thread Jason Merrill
On 04/27/2012 09:42 PM, Paolo Carlini wrote: In particular about the exact meaning of the FIXME? More generally, is the issue here matter of compile-time optimization? Like we want to save work when we actually *know* the type even in template context? (then looks like type_dependent_expression_p

Go patch committed: Fix a few compiler crashes

2012-04-27 Thread Ian Lance Taylor
This patch to the Go frontend fixes a few cases where the compiler was crashing on invalid code. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r cc46c1bb0278 go/expressions.cc --- a/go/expressions.cc Fri Apr 27 17:28:13 2012 -0700