Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread Richard Sandiford
Vladimir Makarov writes: > I am thinking that pseudo assignment (reg_renumber) could be used to > differ base and index registers too. Although I am not sure it is worth > to do as it creates strange dependencies and that it can help probably > in very rare cases or only for some weird targets

Re: RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Richard Sandiford
Richard Sandiford writes: > Vladimir Makarov writes: >> On 10/25/2012 05:45 AM, Richard Sandiford wrote: >>> Hi Vlad, >>> >>> As discussed in the reviews, one of the things that worried me was the >>> combination of: >>> >>> 1) the displacement fixup code in process_address assumes that the addre

[PR54693] loss of debug info in jump threading and loop ivopts

2012-10-25 Thread Alexandre Oliva
Both jump threading and loop induction variable optimizations were dropping useful debug information, and it took improvements in both for debug info about relevant variables in the enclosed testcase to survive all the way to the end. The first problem was that jump threading could bypass blocks c

Re: LRA has been merged into trunk.

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 11:21 PM, Jakub Jelinek wrote: > On Thu, Oct 25, 2012 at 11:15:06PM -0700, H.J. Lu wrote: >> Should there be a -fno-ira option before reload pass is >> removed? It will be useful to investiage IRA regressions. > > You mean -fno-lra, and s/IRA/LRA/, right? I think the reas

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 8:53 PM, H.J. Lu wrote: > On Thu, Oct 25, 2012 at 3:34 PM, H.J. Lu wrote: >> On Thu, Oct 25, 2012 at 3:13 PM, Richard Sandiford >> wrote: >>> "H.J. Lu" writes: On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford wrote: > This patch is an attempt at the rou

Re: LRA has been merged into trunk.

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 11:15:06PM -0700, H.J. Lu wrote: > Should there be a -fno-ira option before reload pass is > removed? It will be useful to investiage IRA regressions. You mean -fno-lra, and s/IRA/LRA/, right? I think the reason for no compiler switch is that while returning false from ix

Re: LRA has been merged into trunk.

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 11:12 PM, David Miller wrote: > From: "H.J. Lu" > Date: Thu, 25 Oct 2012 22:59:58 -0700 > >> On Wed, Oct 24, 2012 at 3:16 AM, H.J. Lu wrote: >>> On Tue, Oct 23, 2012 at 8:46 AM, Vladimir Makarov >>> wrote: Hi, I was going to merge LRA into trunk last Sunday. It

Re: LRA has been merged into trunk.

2012-10-25 Thread David Miller
From: "H.J. Lu" Date: Thu, 25 Oct 2012 22:59:58 -0700 > On Wed, Oct 24, 2012 at 3:16 AM, H.J. Lu wrote: >> On Tue, Oct 23, 2012 at 8:46 AM, Vladimir Makarov >> wrote: >>> Hi, I was going to merge LRA into trunk last Sunday. It did not happen. >>> LRA was actively changed last 4 weeks by imp

Re: [patch, applied] avr RTEMS config/avr/* cleanups.

2012-10-25 Thread Ralf Corsepius
On 10/26/2012 06:48 AM, Georg-Johann Lay wrote: Ralf Corsepius schrieb: I've applied the patch below to trunk and gcc-4.7-branch. It contains 2 RTEMS specific cleanups which have been in use for avr-rtems for quite a while. Ralf 2012-10-26 Ralf Corsépius * config/avr/rtems.h (TARGET

Re: LRA has been merged into trunk.

2012-10-25 Thread H.J. Lu
On Wed, Oct 24, 2012 at 3:16 AM, H.J. Lu wrote: > On Tue, Oct 23, 2012 at 8:46 AM, Vladimir Makarov wrote: >> Hi, I was going to merge LRA into trunk last Sunday. It did not happen. >> LRA was actively changed last 4 weeks by implementing reviewer's proposals >> which resulted in a lot of new

[RFC PATCH] Enable LRA on Sparc.

2012-10-25 Thread David Miller
With Richard Sandiford's address decomposition patch, Sparc looks really good on the 32-bit side. This is the patch I am using. 2012-10-25 David S. Miller * config/sparc/sparc.c (sparc_lra_p): New function. (sparc_spill_class): New function. (TARGET_LRA_P): Define.

Re: [patch, applied] avr RTEMS config/avr/* cleanups.

2012-10-25 Thread Georg-Johann Lay
Ralf Corsepius schrieb: I've applied the patch below to trunk and gcc-4.7-branch. It contains 2 RTEMS specific cleanups which have been in use for avr-rtems for quite a while. Ralf 2012-10-26 Ralf Corsépius * config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove __USE_INIT_

Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode

2012-10-25 Thread Alan Modra
On Thu, Oct 25, 2012 at 03:57:38PM -0700, Segher Boessenkool wrote: > for most others. This patch disables all lwa insns in 32-bit mode. > We can later re-enable it if the assembler used handles it properly, Well, you can now do that. Mainline gas and ld are now fixed. -- Alan Modra Australia

Re: [PATCH] Fix target/PR55061

2012-10-25 Thread Ian Lance Taylor
Jack Howarth writes: > 2012-10-25 Jack Howarth > > target/PR55061 > * configure.ac: Check for _Unwind_GetIPInfo function declaration. > * configure: Regenerate. > > Index: libbacktrace/configure.ac > === > --- li

Re: Fix several time updating issues in the inliner analysis

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 10:12 AM, Jan Hubicka wrote: > Hi, > this patch adds several sanity checks that inline summaries are up to date and > makes sense; it also fixes several minor updating bugs and two perhaps > important > integer overflows. > > Bootstrapped/regtested x86_64-linux, will commi

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 3:34 PM, H.J. Lu wrote: > On Thu, Oct 25, 2012 at 3:13 PM, Richard Sandiford > wrote: >> "H.J. Lu" writes: >>> On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford >>> wrote: This patch is an attempt at the routine sketched here: http://gcc.gnu.org/ml/g

patch to fix bootstrap with disabled checking

2012-10-25 Thread Vladimir Makarov
The following patch fixes reported bootstrap failure when --disable-checking is used. The patch was successfully bootstrapped with and without --disable-checking. 2012-10-25 Vladimir Makarov * lra-int.h (lra_assert): Redefine it gcc_checking_assert. * lra-constraints.c (chec

Re: Bootstrap broken with --disable-checking

2012-10-25 Thread Vladimir Makarov
On 12-10-25 4:35 PM, Steven Bosscher wrote: On Thu, Oct 25, 2012 at 10:24 PM, Jonathan Wakely wrote: This seems to fix it, is it correct? (Untested as I'm still waiting for a bootstrap to finish) I'd do it the other way around: --- lra-constraints.c 2012-10-24 13:39:19.830019609 -0700 +++

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread Vladimir Makarov
On 12-10-25 11:04 PM, Vladimir Makarov wrote: On 12-10-25 3:57 PM, Richard Sandiford wrote: It is ok for me to commit the patch. I have no power to approve changes for files outside LRA although I think the place is not important for approval as LRA now only use it and with the point of LRA

[PATCH] Fix target/PR55061

2012-10-25 Thread Jack Howarth
Currently gcc trunk fails to bootstrap on powerpc-apple-darwin9, using the default system compiler, in libbacktrace due to the absence of _Unwind_GetIPInfo() in the unwind.h header of Apple gcc 4.0.1 compiler. The attached patch eliminates this failure by enhancing the configure.ac test for th

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread Vladimir Makarov
On 12-10-25 3:57 PM, Richard Sandiford wrote: This patch is an attempt at the routine sketched here: http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01016.html for decomposing addresses into constituent parts. It applies on top of the patches I sent out earlier today. To summarise that mess

Re: RFA: Clarify requirements of process_address

2012-10-25 Thread Vladimir Makarov
On 12-10-25 4:21 PM, Richard Sandiford wrote: Vladimir Makarov writes: On 10/25/2012 05:18 AM, Richard Sandiford wrote: Hi Vlad, When testing other patches, I was misled by: /* Addresses were legitimate before LRA. So if the address has two registers than it can have two of them.

Re: [PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Dehao Chen
Binary search shows that the culprit for the recent gdb regression is http://gcc.gnu.org/viewcvs?view=revision&revision=192719, it failed the following tests: gdb.base/store.exp gdb.base/restore.exp The block_location patch also breaks the following tests: gdb.cp/method.exp But the error is fix

[C++ Patch] PR 54984

2012-10-25 Thread Paolo Carlini
Hi, in this very old regression, which AFAICS dates back to when we started using VECs, in templates we wrongly handle: new char[size] like new char[size]() Turns out the issue is simple: in build_new, when *init is null we wrongly turn it into a pointer to an empty vector when we

[patch, applied] avr RTEMS config/avr/* cleanups.

2012-10-25 Thread Ralf Corsepius
Hi, I've applied the patch below to trunk and gcc-4.7-branch. It contains 2 RTEMS specific cleanups which have been in use for avr-rtems for quite a while. Ralf 2012-10-26 Ralf Corsépius * config/avr/rtems.h (TARGET_OS_CPP_BUILTINS): Remove __USE_INIT_FINI__. * config/avr/t-rtems (LIB

Re: [PATCH] rs6000: Disable generation of lwa in 32-bit mode

2012-10-25 Thread David Edelsohn
On Thu, Oct 25, 2012 at 6:57 PM, Segher Boessenkool wrote: > 2012-10-25 Segher Boessenkool > > gcc/ > * config/rs6000/rs6000.md (sign_extend:SI patterns): Split > the memory case off. Merge the two register cases. Change > the condition for the memory case to require

Re: [PATCH] rs6000: Correct ATOMIC mode iterator

2012-10-25 Thread David Edelsohn
On Thu, Oct 25, 2012 at 6:56 PM, Segher Boessenkool wrote: > This fixes the ICE with -m32 -mpowerpc64 on many of the testcases that > use atomics: > Bootstrapped and tested on powerpc64-linux, -m64,-m32,-m32/-mpowerpc64; > no new failures, and the above improvements. > > Okay to apply? > 2012-10

Re: LRA has been merged into trunk.

2012-10-25 Thread David Edelsohn
On Wed, Oct 24, 2012 at 8:08 PM, David Edelsohn wrote: > And PR bootstrap/55068 due to assert failure in push_reload() . GCC bootstrapped on AIX with your patches. Thanks for fixing the problems so quickly. - David

[PATCH] rs6000: Disable generation of lwa in 32-bit mode

2012-10-25 Thread Segher Boessenkool
Many (most? all?) assemblers (and really the 32-bit ABIs) do not handle lwa and ld properly. Those instructions have a 14-bit offset field, and the low two bits of the instruction are the extended opcode. But the 32-bit toolchains use a 16-bit offset relocation, clobbering the low two bits. See

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 03:48:07PM -0700, Wei Mi wrote: > Thanks for all the comments. Fixed. Ok to checkin? > > 2012-10-25 Wei Mi   > > * varasm.c (assemble_variable): Set asan_protected even > for decls that are already ASAN_RED_ZONE_SIZE or more > bytes aligned. Yes,

[PATCH] rs6000: Correct ATOMIC mode iterator

2012-10-25 Thread Segher Boessenkool
This fixes the ICE with -m32 -mpowerpc64 on many of the testcases that use atomics: gcc: -# of expected passes 108465 -# of unexpected failures 365 +# of expected passes 108499 +# of unexpected failures 303 libgomp: -# of expected passes 8664 -# of unexpe

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Wei Mi
Hi, Thanks for all the comments. Fixed. Ok to checkin? 2012-10-25 Wei Mi   * varasm.c (assemble_variable): Set asan_protected even for decls that are already ASAN_RED_ZONE_SIZE or more bytes aligned. Index: varasm.c ==

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Jakub Jelinek
On Fri, Oct 26, 2012 at 12:23:41AM +0200, Dodji Seketeli wrote: > +/* Instrument the strlen builtin call pointed to by ITER. > + > + This function instruments the access to the first byte of the > + argument, right before the call. After the call it instruments the > + access to the last byt

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 3:13 PM, Richard Sandiford wrote: > "H.J. Lu" writes: >> On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford >> wrote: >>> This patch is an attempt at the routine sketched here: >>> >>> http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01016.html >>> >>> for decomposing ad

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Dodji Seketeli
Jakub Jelinek writes: >> +instrument_derefs (iter, dest, location, is_store); > > BUILTIN_ATOMIC_LOAD* are just loads and so should clear is_store. Done. > >> + if (len != NULL_TREE) >> +{ >> + is_store = (dest != NULL_TREE); >> + >> + if (source0 != NULL_TREE) >> +instru

[PATCH] Remove unnecessary and troublesome sparc constraint.

2012-10-25 Thread David Miller
This was discovered while playing around with LRA, but of course I regstrapped this using the existing reload pass. Constraint "U" is a register constraint, that accepts either a pseudo or an even numbered hard register. But it is bogus, and in fact unnecessary. First, it isn't marked as a "def

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford > wrote: >> This patch is an attempt at the routine sketched here: >> >> http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01016.html >> >> for decomposing addresses into constituent parts. It applies >> on top of the patches

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread H.J. Lu
On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford wrote: > This patch is an attempt at the routine sketched here: > > http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01016.html > > for decomposing addresses into constituent parts. It applies > on top of the patches I sent out earlier today. T

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 11:32:58PM +0200, Dodji Seketeli wrote: > + tree source0 = NULL_TREE, source1 = NULL_TREE, > +dest = NULL_TREE, len = NULL_TREE; > + bool is_store = true; ... nothing sets is_store here. ... > + > + instrument_derefs (iter, dest, location, is_store); BUILTIN_ATOMI

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Xinliang David Li
Why not relaxing the check even more to allow for instance 128 byte alignment which may be common? David On Thu, Oct 25, 2012 at 2:51 PM, Jakub Jelinek wrote: > On Thu, Oct 25, 2012 at 05:46:47PM -0400, Diego Novillo wrote: >> The change looks fine to me, but why not just move the alignment chec

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 05:46:47PM -0400, Diego Novillo wrote: > The change looks fine to me, but why not just move the alignment check > into asan_protect_global? I'll defer to David or Jakub in this. asan_protect_global has || DECL_ALIGN_UNIT (decl) > 2 * ASAN_RED_ZONE_SIZE check among other th

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 02:32:33PM -0700, Wei Mi wrote: > A small patch to remove the bogus error reports exposed in the > spec2000 testing. In varasm.c, asan_protected should be equivalent > with asan_protect_global (decl) all the time, or else compiler will > not insert redzones for some globals

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Diego Novillo
On Thu, Oct 25, 2012 at 5:32 PM, Wei Mi wrote: > Hi, > > A small patch to remove the bogus error reports exposed in the > spec2000 testing. In varasm.c, asan_protected should be equivalent > with asan_protect_global (decl) all the time, or else compiler will > not insert redzones for some globals

Re: [asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Xinliang David Li
Should the alignment check be moved into 'asan_protect_global' method? David On Thu, Oct 25, 2012 at 2:32 PM, Wei Mi wrote: > Hi, > > A small patch to remove the bogus error reports exposed in the > spec2000 testing. In varasm.c, asan_protected should be equivalent > with asan_protect_global (d

Re: [PATCH 3/3] [asan] Instrument built-in memory access function calls

2012-10-25 Thread Dodji Seketeli
Jakub Jelinek writes: > case BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE: > case BUILT_IN_ATOMIC_IS_LOCK_FREE: > I think don't touch the memory at all (or not necessarily), > and IMHO you don't want to handle the BUILT_IN_*_N variants either, > those are just FE builtins that are lowered to the corr

[asan] a small patch to fix bogus error about global buffer overflow

2012-10-25 Thread Wei Mi
Hi, A small patch to remove the bogus error reports exposed in the spec2000 testing. In varasm.c, asan_protected should be equivalent with asan_protect_global (decl) all the time, or else compiler will not insert redzones for some globals planned to be protected. gcc/ChangeLog: 2012-10-25 Wei M

Re: Change hash_table for separate comparator, documentation, cleanups...

2012-10-25 Thread Diego Novillo
On Thu, Oct 25, 2012 at 5:03 PM, Lawrence Crowl wrote: > Change hash_table to support a comparator type different from the > value type stored in the hash table. The 'find' functions now may > take a different type from the value type. This requires introducing > a second typedef into the Descri

Change hash_table for separate comparator, documentation, cleanups...

2012-10-25 Thread Lawrence Crowl
Change hash_table to support a comparator type different from the value type stored in the hash table. The 'find' functions now may take a different type from the value type. This requires introducing a second typedef into the Descriptor conceptual type. Change the Descriptor concept to use type

Re: [PATCH] Reduce conservativeness in REE using machine model (issue6631066)

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 01:28:32PM -0700, Teresa Johnson wrote: > > 2012-10-18 Teresa Johnson > > > > * ree.c (add_removable_extension): Remove unnecessary > > mode check with other extension. > > > > 2012-10-18 Teresa Johnson > > > > * gcc.c-torture/execute/20111227-2

Re: Fix bugs introduced by switch-case profile propagation

2012-10-25 Thread Easwaran Raman
Hi, On Tue, Oct 23, 2012 at 3:03 AM, Jan Hubicka wrote: >> Ping. >> >> >> On Wed, Oct 17, 2012 at 1:48 PM, Easwaran Raman wrote: >> > Hi, >> > This patch fixes bugs introduced by my previous patch to propagate >> > profiles during switch expansion. Bootstrap and profiledbootstrap >> > successfu

Re: Bootstrap broken with --disable-checking

2012-10-25 Thread Steven Bosscher
On Thu, Oct 25, 2012 at 10:24 PM, Jonathan Wakely wrote: > This seems to fix it, is it correct? (Untested as I'm still waiting > for a bootstrap to finish) I'd do it the other way around: --- lra-constraints.c 2012-10-24 13:39:19.830019609 -0700 +++ lra-constraints.c 2012-10-25 13:32:39.99001

Re: [PATCH] Reduce conservativeness in REE using machine model (issue6631066)

2012-10-25 Thread Teresa Johnson
ping. Teresa On Thu, Oct 18, 2012 at 8:21 AM, Teresa Johnson wrote: > > The attached patch implements avoids conservative behavior in REE by allowing > removal of redundant extends when the def feeds another extend with a > different > mode. This works because in merge_def_and_ext only calls com

Bootstrap broken with --disable-checking

2012-10-25 Thread Jonathan Wakely
This seems to fix it, is it correct? (Untested as I'm still waiting for a bootstrap to finish) diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 4b35726..827fd4d 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1216,11 +1216,13 @@ check_and_process_move (bool *cha

Re: RFA: Clarify requirements of process_address

2012-10-25 Thread Richard Sandiford
Vladimir Makarov writes: > On 10/25/2012 05:18 AM, Richard Sandiford wrote: >> Hi Vlad, >> >> When testing other patches, I was misled by: >> >>/* Addresses were legitimate before LRA. So if the address has >> two registers than it can have two of them. We should also >> not worr

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread David Miller
From: Richard Sandiford Date: Thu, 25 Oct 2012 20:57:05 +0100 > I'm hoping this will help with the x32 problems that HJ is seeing. > Like Vlad, I don't have a set-up to try for certain, but I tried > compiling a set of non-x32 gcc .ii files with -mx32 -maddress-mode=long > and it fixed all but on

Re: RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Vladimir Makarov
On 10/25/2012 04:06 PM, Richard Sandiford wrote: Vladimir Makarov writes: On 10/25/2012 05:45 AM, Richard Sandiford wrote: I see a potential bug here. We should not reject new equiv values for base and index here. After we decided to use equiv it should be changed everywhere as we remove ini

Re: RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Richard Sandiford
Vladimir Makarov writes: > On 10/25/2012 05:45 AM, Richard Sandiford wrote: >> Hi Vlad, >> >> As discussed in the reviews, one of the things that worried me was the >> combination of: >> >> 1) the displacement fixup code in process_address assumes that the address >> is exactly equal to BASE_L

RFC/A: A generic decompose_address routine

2012-10-25 Thread Richard Sandiford
This patch is an attempt at the routine sketched here: http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01016.html for decomposing addresses into constituent parts. It applies on top of the patches I sent out earlier today. To summarise that message, the main point is to have an address descrip

Re: RFA: Generate canonical rtl in process_address

2012-10-25 Thread Vladimir Makarov
On 10/25/2012 05:50 AM, Richard Sandiford wrote: Hi Vlad, As promised a while ago, here's a patch to make process_address create canonical rtl. It also fixes the base_reg_class for the index + disp => base + index case. Tested on x86_64-linux-gnu. Also tested by making sure that there were no

Re: RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Vladimir Makarov
On 10/25/2012 05:45 AM, Richard Sandiford wrote: Hi Vlad, As discussed in the reviews, one of the things that worried me was the combination of: 1) the displacement fixup code in process_address assumes that the address is exactly equal to BASE_LOC + INDEX_LOC + DISP (with null values b

Re: RFA: Split address validation out of process_address

2012-10-25 Thread Vladimir Makarov
On 10/25/2012 05:21 AM, Richard Sandiford wrote: Hi Vlad, This patch splits out the code to verify an address, so that it's easier to experiment with different approaches. See the next patch for one example where this might be useful in future. Tested on x86_64-linux-gnu. OK to install? Yes

Re: RFA: Clarify requirements of process_address

2012-10-25 Thread Vladimir Makarov
On 10/25/2012 05:18 AM, Richard Sandiford wrote: Hi Vlad, When testing other patches, I was misled by: /* Addresses were legitimate before LRA. So if the address has two registers than it can have two of them. We should also not worry about scale for the same reason. */

Re: [PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Dehao Chen
On Thu, Oct 25, 2012 at 11:11 AM, Tom Tromey wrote: >> "Dehao" == Dehao Chen writes: > > Dehao> This patch fixes debug info for expr and jump stmt. > Dehao> Bootstrapped and passed gcc regression tests. > Dehao> Is it okay for trunk? > > I wonder whether this affects the gdb test suite result

Re: [PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Dehao Chen
On Thu, Oct 25, 2012 at 11:06 AM, Eric Botcazou wrote: >> This patch fixes debug info for expr and jump stmt. > > It would be nice to have testcases... Sure, I'll try to forge some testcases for this. > >> * cfgexpand.c (set_expr_location_r): New callback function. >> (gimple_assign_rhs_to_tree)

[patch] Fix PR 55063: Check whether DIE is already a declaration

2012-10-25 Thread Cary Coutant
I've committed the following fix for PR 55063: -cary 2012-10-25 Cary Coutant PR debug/55063 * dwarf2out.c (prune_unused_types_prune): Check whether DIE is already a declaration. Index: dwarf2out.c === -

Re: patch to fix PR55055

2012-10-25 Thread Ramana Radhakrishnan
On 10/24/12 21:02, Vladimir Makarov wrote: The following patch fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55055 In this case, operand was an address containing subreg. LRA before the patch processed only operands which are subregs of regs. The patch was successfully bootstrapp

Re: libgo patch committed: Update to current Go library

2012-10-25 Thread Ian Lance Taylor
On Thu, Oct 25, 2012 at 2:36 AM, Rainer Orth wrote: > Ian Lance Taylor writes: > >> There is a decent change that this will break something on non-x86 >> systems. I will do what testing I am able to do after the commit. > > As expected, it did break the Solaris libgo build: > > * udpsock_posix.g

Re: [PATCH v3] Add support for sparc compare-and-branch

2012-10-25 Thread David Miller
From: David Miller Date: Mon, 22 Oct 2012 23:39:23 -0400 (EDT) > Eric and Rainer, I think that functionally this patch is fully ready > to go into the tree except for the Solaris aspects which I do not have > the means to work on. Have either of you made any progress in this > area? Just wonder

Re: LRA has been merged into trunk.

2012-10-25 Thread David Miller
From: Richard Sandiford Date: Thu, 25 Oct 2012 16:34:00 +0100 > David Miller writes: >> I'll add the straightforward check to sparc's legitimate_address_p, >> but I'm really surprised you never hit this case in your testing. > > Adding the check sounds like the right thing to do. And remember

Re: [PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Tom Tromey
> "Dehao" == Dehao Chen writes: Dehao> This patch fixes debug info for expr and jump stmt. Dehao> Bootstrapped and passed gcc regression tests. Dehao> Is it okay for trunk? I wonder whether this affects the gdb test suite results. I'm not trying to pick on you specifically, but there's been

Re: [PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Eric Botcazou
> This patch fixes debug info for expr and jump stmt. It would be nice to have testcases... > * cfgexpand.c (set_expr_location_r): New callback function. > (gimple_assign_rhs_to_tree): Walk the expr recursively. > (expand_call_stmt): Likewise. > (expand_gimple_stmt_1): Likewise. This cannot be r

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Diego Novillo
On Thu, Oct 25, 2012 at 1:24 PM, Xinliang David Li wrote: > I don't know why you think so (It seems that the points mentioned in > http://www.akkadia.org/drepper/no_static_linking.html mainly apply to > release binaries, not sanitized ones), but for now let's drop the > static link request. Yeah

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 10:19 AM, Jakub Jelinek wrote: > On Thu, Oct 25, 2012 at 10:00:03AM -0700, Xinliang David Li wrote: >> How about statically linking just for executables, not shared library buid? > > That is IMHO still a bad idea. I don't know why you think so (It seems that the points men

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 10:00:03AM -0700, Xinliang David Li wrote: > How about statically linking just for executables, not shared library buid? That is IMHO still a bad idea. Jakub

Fix several time updating issues in the inliner analysis

2012-10-25 Thread Jan Hubicka
Hi, this patch adds several sanity checks that inline summaries are up to date and makes sense; it also fixes several minor updating bugs and two perhaps important integer overflows. Bootstrapped/regtested x86_64-linux, will commit it shortly. Honza * ipa-cp.c (ipcp_discover_new_direct_e

[PATCH] Fix debug info for expr and jump stmt

2012-10-25 Thread Dehao Chen
Hi, This patch fixes debug info for expr and jump stmt. Bootstrapped and passed gcc regression tests. Is it okay for trunk? Thanks, Dehao gcc/ChangeLog: 2012-10-25 Dehao Chen * tree-eh.c (do_return_redirection): Set location for jump statement. (do_goto_redirection): Likewise. (frob_into_b

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 9:55 AM, Jakub Jelinek wrote: > On Thu, Oct 25, 2012 at 09:48:54AM -0700, Xinliang David Li wrote: >> > Why should be libasan linked statically by default? > >> There are a couple of reasons: >> >> 1) it makes running sanitized binary on remote machines which does not >> ha

Re: Additional fix for pre-reload schedule on x86 targets.

2012-10-25 Thread Vladimir Makarov
On 10/23/2012 07:38 AM, Yuri Rumyantsev wrote: Hi All, This fix is aimed to remove stability issues with using pre-reload scheduler for x86 targets caused by cross-block motion of function arguments passed in likely-spilled HW registers. We found one more issue in a process of more detail testin

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 09:48:54AM -0700, Xinliang David Li wrote: > > Why should be libasan linked statically by default? > There are a couple of reasons: > > 1) it makes running sanitized binary on remote machines which does not > have libasan installed easier; > 2) There is no guarantee that l

patch to fix lra crash on a big test

2012-10-25 Thread Vladimir Makarov
The following patch fixes a crash in lra.c::check_rtl on a big spec2000 test. Unfortunately, I can not extract a small test. The crash occurs exactly in complicated processing of a big function. The reason for the crash was in ignoring insn for reload processing after a hard reg assignment

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 9:52 AM, Diego Novillo wrote: > On Thu, Oct 25, 2012 at 12:48 PM, Xinliang David Li > wrote: >> On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek wrote: >>> >>> librt is a very bad name, that clashes with glibc librt, would only create >>> confusion. >> >> Ok, then we shoul

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Diego Novillo
On Thu, Oct 25, 2012 at 12:48 PM, Xinliang David Li wrote: > On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek wrote: >> >> librt is a very bad name, that clashes with glibc librt, would only create >> confusion. > > Ok, then we should pick something that is not confusing but reflect > the fact the

Re: [patch,gcc] Add microblaze*-rtems*

2012-10-25 Thread Ralf Corsepius
On 10/25/2012 04:38 PM, Michael Eager wrote: On 10/25/2012 06:49 AM, Ralf Corsepius wrote: Hi, And another RTEMS-patch, I'd like to apply to GCC trunk and GCC-4_7-branch: Adding microblaze*-rtems* target. This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 1/2 a year. OK

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek wrote: > On Thu, Oct 25, 2012 at 09:24:51AM -0700, Xinliang David Li wrote: >> To accommodate tsan (and msan in the future), the directory structure >> needs to be changed. The top level directory can be called something >> like librt with the followi

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Jakub Jelinek
On Thu, Oct 25, 2012 at 09:24:51AM -0700, Xinliang David Li wrote: > To accommodate tsan (and msan in the future), the directory structure > needs to be changed. The top level directory can be called something > like librt with the following subdirs: asan, tsan, sanitizer_common, > and interception

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
To accommodate tsan (and msan in the future), the directory structure needs to be changed. The top level directory can be called something like librt with the following subdirs: asan, tsan, sanitizer_common, and interception. Also the libasan should be linked in statically by default. thanks, Da

C++ PATCH to warn about inheriting ctors with variadic constructors

2012-10-25 Thread Jason Merrill
The specification of C++11 inheriting constructors doesn't seem to handle C-style variadic functions, so we just drop the ... when declaring the constructor in the derived class. This patch adds a warning about that, on by default. Tested x86_64-pc-linux-gnu, applying to trunk. commit e38315

Small C++ PATCH to fix OpenMP threadprivate with templates

2012-10-25 Thread Jason Merrill
Threadprivate was complaining about a template-id being an incomplete type, because we weren't calling complete_type to instantiate it. Tested x86_64-pc-linux-gnu, applying to trunk. commit 055a6956282763467ce0b84776dbb49e89c5a347 Author: Jason Merrill Date: Mon Oct 15 11:06:25 2012 -0700

Re: C++ PATCH for c++/53733 (DR 1402, deleting move ctor)

2012-10-25 Thread Jason Merrill
In Portland we decided that we should allow defaulted move ctors/op= even if they could throw or might move a virtual base more than once, and that overload resolution should ignore an implicitly deleted move ctor/op=. This patch implements that resolution. Tested x86_64-pc-linux-gnu, applyin

Re: LRA has been merged into trunk.

2012-10-25 Thread Richard Sandiford
David Miller writes: > From: David Miller > Date: Tue, 23 Oct 2012 22:06:55 -0400 (EDT) > >> From: David Miller >> Date: Tue, 23 Oct 2012 21:44:05 -0400 (EDT) >> >>> The first issue sparc runs into is that it does not define it's >>> extra constraints properly. In particular 'T' and 'W' must u

Re: [m68k] Fix option handling for -m68020-40 and -m68020-60

2012-10-25 Thread Gunther Nikl
Andreas Schwab wrote: > Gunther Nikl writes: > >> While working with GCC 4.7, I noticed that the -m68020-40 and -m68020-60 >> options are broken. > > Broken in which way? These compound options are supposed to cause m68k.c/m68k_option_override to set m68k_cpu_entry and m68k_tune_entry. However

Re: [patch,gcc] Add microblaze*-rtems*

2012-10-25 Thread Michael Eager
On 10/25/2012 06:49 AM, Ralf Corsepius wrote: Hi, And another RTEMS-patch, I'd like to apply to GCC trunk and GCC-4_7-branch: Adding microblaze*-rtems* target. This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 1/2 a year. OK to apply. -- Michael Eagerea...@eagerc

Re: [C++ Patch] PR 53761

2012-10-25 Thread Jason Merrill
On 10/24/2012 04:47 PM, Paolo Carlini wrote: Essentially, what really matters is that the first field must be a pointer. In this case, yes. Let's just say what the issue is: the type of the first field has a different ABI from the class overall. Jason

Re: [PATCH][RFC] Fix PR54824, deal with BBs with no successor

2012-10-25 Thread Eric Botcazou
> + /* If we have a basic-block with no successors that does not > + end with a control statement or a noreturn call connect it > + to itself. This situation can occur when inlining a noreturn > + call that does in fact return. */ The '-' is superfluous in basic-block. And

[patch,gcc] Add microblaze*-rtems*

2012-10-25 Thread Ralf Corsepius
Hi, And another RTEMS-patch, I'd like to apply to GCC trunk and GCC-4_7-branch: Adding microblaze*-rtems* target. This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 1/2 a year. Ralf 2012-04-19 Ralf Corsépius * config.gcc (microblaze*-*-rtems*): New target. * confi

Re: [PATCH][RFC] Fix PR54824, deal with BBs with no successor

2012-10-25 Thread Steven Bosscher
On Thu, Oct 25, 2012 at 3:34 PM, Richard Biener wrote: > + > + /* If we have a basic-block with no successors that does not > +end with a control statement or a noreturn call connect it > +to itself. This situation can occur when inlining a noreturn > +call that does

Re: [PATCH][RFC] Fix PR54824, deal with BBs with no successor

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Richard Biener wrote: > On Thu, 25 Oct 2012, Jakub Jelinek wrote: > > > On Thu, Oct 25, 2012 at 12:58:26PM +0200, Richard Biener wrote: > > > So the bug here is really in find_many_sub_basic_blocks then > > > and your patch would certainly avoid triggering its bug > > > (or i

Re: Fix estimation of array accesses

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Jan Hubicka wrote: > Hi, > while looking into cunroll issues I noticed that we miss quite lot of > important unrolling > at -O2 for EON because we think it will increase code size. This is because > we do not > account the fact that making array index constant is good thing

Re: Fix estimation of array accesses

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Jan Hubicka wrote: > > Hmm, also in ASM/call/return? It will definitely make quite a fuzz into > > the cost metric > > by making a=b+c to have cost of 3 instead of 1 as it have now. I am not > > 100% sure if > > a+b should be more expensive than a+1. > > I can give that a

Re: Fix estimation of array accesses

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Jan Hubicka wrote: > > > +/* For operands of load/stores estimate cost of the address computations > > > + involved. */ > > > + > > > +static int > > > +estimate_operand_cost (tree op) > > > +{ > > > + int cost = 0; > > > + while (handled_component_p (op)) > > > +{ >

  1   2   >