Re: [patch,libgcc] sh-rtems: Add sh*-*-elf*'s extra_parts.

2012-10-25 Thread Kaz Kojima
Ralf Corsepius ralf.corsep...@rtems.org wrote: I would like to apply the patch below to trunk and gcc-4.7 branch. GCC doesn't build for sh-rtems* without it. OK. Please go ahead. Regards, kaz

Re: [patch,libgcc] sh-rtems: Add sh*-*-elf*'s extra_parts.

2012-10-25 Thread Ralf Corsepius
On 10/25/2012 09:36 AM, Kaz Kojima wrote: Ralf Corsepius ralf.corsep...@rtems.org wrote: I would like to apply the patch below to trunk and gcc-4.7 branch. GCC doesn't build for sh-rtems* without it. OK. Please go ahead. Thanks, patch applied to trunk and gcc-4.7-branch. Ralf

[patch,libgcc] sparc64-*-rtems*: Remove sparc/t-elf.

2012-10-25 Thread Ralf Corsepius
Hi, I would like to apply the following patch to trunk and gcc-4_7-branch. GCC doesn't build for sparc64-rtems* without it. Ralf 2012-07-05 Ralf Corsépius ralf.corsep...@rtems.org * config.host (sparc64-*-rtems*): Remove sparc/t-elf. diff --git a/libgcc/config.host b/libgcc/config.host

Re: [Patch] Potential fix for PR55033

2012-10-25 Thread Sebastian Huber
Hello Alan, thanks for looking at this issue. On 10/24/2012 04:50 PM, Alan Modra wrote: On Tue, Oct 23, 2012 at 06:25:43PM +0200, Sebastian Huber wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55033 This patch fixes my problem, but I am absolutely not sure if this is the right way.

[committed] Fix noncanonical rtl in emit_block_move_via_loop

2012-10-25 Thread Richard Sandiford
I was curious why LRA needed to handle noncanonical rtl in addresses: if (CONSTANT_P (arg0) || code1 == PLUS || code1 == MULT || code1 == ASHIFT) { tloc = arg1_loc; arg1_loc = arg0_loc; arg0_loc = tloc; arg0 =

Re: [C++] Handle ?: for vectors

2012-10-25 Thread Marc Glisse
On Wed, 17 Oct 2012, Marc Glisse wrote: Hello, this patch adds support for vector conditions to the C++ front-end. Note that the testcase currently only applies to x86. This is because there is work remaining in the middle-end for the case where vector selection for this vector mode is not

RFA: Clarify requirements of process_address

2012-10-25 Thread Richard Sandiford
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. */ which I took to mean that process_address only handles

RFA: Split address validation out of process_address

2012-10-25 Thread Richard Sandiford
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? Richard gcc/ * lra-constraints.c

Re: libgo patch committed: Update to current Go library

2012-10-25 Thread Rainer Orth
Ian Lance Taylor i...@google.com 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.go lacked definitions of joinIPv4Group,

RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Richard Sandiford
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 being equivalent to 0). 2) extract_address_regs

RFA: Generate canonical rtl in process_address

2012-10-25 Thread Richard Sandiford
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 changes in assembly output for a set of gcc .ii

Re: Make try_unroll_loop_completely to use loop bounds recorded

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Jan Hubicka wrote: * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel parameter and use it to estimate code optimized out in the final iteration. (loop_edge_to_cancel): New function.

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-25 Thread Richard Biener
On Wed, Oct 24, 2012 at 7:23 PM, Mike Stump mikest...@comcast.net wrote: On Oct 24, 2012, at 2:43 AM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Oct 23, 2012 at 6:12 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: On 10/23/2012 10:12 AM, Richard Biener wrote: +

Re: [C++] Handle ?: for vectors

2012-10-25 Thread Richard Biener
On Wed, Oct 24, 2012 at 10:41 PM, Marc Glisse marc.gli...@inria.fr wrote: On Wed, 24 Oct 2012, Mike Stump wrote: Well, I suspect the OpenCL community had a ton of people sweat over the details and take into consideration the realities and the needs of people. I'd like to believe they had more

Re: [patch,libgcc] sparc64-*-rtems*: Remove sparc/t-elf.

2012-10-25 Thread Eric Botcazou
I would like to apply the following patch to trunk and gcc-4_7-branch. GCC doesn't build for sparc64-rtems* without it. Sure, thanks. -- Eric Botcazou

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-25 Thread Kenneth Zadeck
On 10/25/2012 06:42 AM, Richard Biener wrote: On Wed, Oct 24, 2012 at 7:23 PM, Mike Stump mikest...@comcast.net wrote: On Oct 24, 2012, at 2:43 AM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Oct 23, 2012 at 6:12 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: On 10/23/2012

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

2012-10-25 Thread Steven Bosscher
On Thu, Oct 25, 2012 at 12:31 PM, Richard Biener rguent...@suse.de wrote: But, really, why inline noreturn functions at all? That's a good question. The question then is, why not? Because noreturn functions are usually on error paths. To inline a called noreturn function is to drag overhead

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

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Steven Bosscher wrote: On Thu, Oct 25, 2012 at 12:31 PM, Richard Biener rguent...@suse.de wrote: But, really, why inline noreturn functions at all? That's a good question. The question then is, why not? Because noreturn functions are usually on error paths. To

[PATCH] Fix PR54902

2012-10-25 Thread Richard Biener
This fixes PR54902, cfgcleanup may create / release SSA names which is something the VN machinery does not like. Thus avoid calling cfgcleanup before we finish it. Tail-merging requires dominators thus at least remove unreachable blocks before computing them. Bootstrapped and tested on

Re: patch to fix constant math - 4th patch - the wide-int class.

2012-10-25 Thread Richard Biener
On Thu, Oct 25, 2012 at 12:55 PM, Kenneth Zadeck zad...@naturalbridge.com wrote: On 10/25/2012 06:42 AM, Richard Biener wrote: On Wed, Oct 24, 2012 at 7:23 PM, Mike Stump mikest...@comcast.net wrote: On Oct 24, 2012, at 2:43 AM, Richard Biener richard.guent...@gmail.com wrote: On Tue, Oct

Re: Make try_unroll_loop_completely to use loop bounds recorded

2012-10-25 Thread Jan Hubicka
On Thu, 25 Oct 2012, Jan Hubicka wrote: * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel parameter and use it to estimate code optimized out in the final iteration. (loop_edge_to_cancel): New function.

Fix estimation of array accesses

2012-10-25 Thread Jan Hubicka
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. This tracks back to the fact that

Re: [patch,libgcc] sparc64-*-rtems*: Remove sparc/t-elf.

2012-10-25 Thread Ralf Corsepius
On 10/25/2012 12:53 PM, Eric Botcazou wrote: I would like to apply the following patch to trunk and gcc-4_7-branch. GCC doesn't build for sparc64-rtems* without it. Sure, thanks. Thanks, patch applied to trunk and gcc-4_7-branch. Ralf

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

2012-10-25 Thread Jakub Jelinek
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 its wrong expectations). I'll give it testing. I'd say we should insert the __builtin_unreachable already

Re: Make try_unroll_loop_completely to use loop bounds recorded

2012-10-25 Thread Richard Biener
On Thu, 25 Oct 2012, Jan Hubicka wrote: On Thu, 25 Oct 2012, Jan Hubicka wrote: * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Add edge_to_cancel parameter and use it to estimate code optimized out in the final iteration.

Fix accounting of code growth in recursive inliner

2012-10-25 Thread Jan Hubicka
Hi, recursive inliner is confusing the cost of inlining function to itself with cost of inlining the master clone. After first recursive inlining happened those are no longer equivalent. Fixed thus. Bootstrapped/regtested x86_64-linux, committed. Honza * ipa-inline.c

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: Make try_unroll_loop_completely to use loop bounds recorded

2012-10-25 Thread Jan Hubicka
We can also patch in __builtin_unreachable but that will make bugs with out overflows/ out of bound accesses hard in loops to debug at -O levels (as seen by do-1.f90 testcase and the new PR with integer overflow), so perhaps we could do that at -Ofast or only or with

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

2012-10-25 Thread Richard Biener
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 its wrong expectations). I'll give it testing. I'd say we

Re: [C++] Handle ?: for vectors

2012-10-25 Thread Jason Merrill
OK. Jason

Re: Fix estimation of array accesses

2012-10-25 Thread Jan Hubicka
+/* 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)) +{ + cost += estimate_ref_cost (op); + op = TREE_OPERAND (op, 0);

Re: Fix estimation of array accesses

2012-10-25 Thread Jan Hubicka
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 try and we will see after re-tunning how well it works.

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 try and we

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: [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 its wrong

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 rguent...@suse.de 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 +

[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 ralf.corsep...@rtems.org * config.gcc

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 the

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,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 Eager

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

2012-10-25 Thread Gunther Nikl
Andreas Schwab wrote: Gunther Nikl gn...@users.sourceforge.net 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

Re: LRA has been merged into trunk.

2012-10-25 Thread Richard Sandiford
David Miller da...@davemloft.net writes: From: David Miller da...@davemloft.net Date: Tue, 23 Oct 2012 22:06:55 -0400 (EDT) From: David Miller da...@davemloft.net 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

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,

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 ja...@redhat.com Date: Mon Oct 15

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

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,

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
On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek ja...@redhat.com 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

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 Diego Novillo
On Thu, Oct 25, 2012 at 12:48 PM, Xinliang David Li davi...@google.com wrote: On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek ja...@redhat.com 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

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 9:52 AM, Diego Novillo dnovi...@google.com wrote: On Thu, Oct 25, 2012 at 12:48 PM, Xinliang David Li davi...@google.com wrote: On Thu, Oct 25, 2012 at 9:39 AM, Jakub Jelinek ja...@redhat.com wrote: librt is a very bad name, that clashes with glibc librt, would only

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

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 libasan

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

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 9:55 AM, Jakub Jelinek ja...@redhat.com 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

[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 de...@google.com * tree-eh.c (do_return_redirection): Set location for jump statement. (do_goto_redirection):

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

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

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Xinliang David Li
On Thu, Oct 25, 2012 at 10:19 AM, Jakub Jelinek ja...@redhat.com 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

Re: [asan] migrate runtime from llvm

2012-10-25 Thread Diego Novillo
On Thu, Oct 25, 2012 at 1:24 PM, Xinliang David Li davi...@google.com 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

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

Re: LRA has been merged into trunk.

2012-10-25 Thread David Miller
From: Richard Sandiford rdsandif...@googlemail.com Date: Thu, 25 Oct 2012 16:34:00 +0100 David Miller da...@davemloft.net 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

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

2012-10-25 Thread David Miller
From: David Miller da...@davemloft.net 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

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 r...@cebitec.uni-bielefeld.de wrote: Ian Lance Taylor i...@google.com 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

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

[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 ccout...@google.com PR debug/55063 * dwarf2out.c (prune_unused_types_prune): Check whether DIE is already a declaration. Index: dwarf2out.c

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 ebotca...@adacore.com 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.

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 tro...@redhat.com wrote: Dehao == Dehao Chen de...@google.com 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

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: 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

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

Re: RFA: displacement handling in equiv_address_substitution

2012-10-25 Thread Richard Sandiford
Vladimir Makarov vmaka...@redhat.com 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

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 vmaka...@redhat.com 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

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread David Miller
From: Richard Sandiford rdsandif...@googlemail.com 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

Re: RFA: Clarify requirements of process_address

2012-10-25 Thread Richard Sandiford
Vladimir Makarov vmaka...@redhat.com 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

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

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 tejohn...@google.com 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

Re: Bootstrap broken with --disable-checking

2012-10-25 Thread Steven Bosscher
On Thu, Oct 25, 2012 at 10:24 PM, Jonathan Wakely jwakely@gmail.com 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

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 hubi...@ucw.cz wrote: Ping. On Wed, Oct 17, 2012 at 1:48 PM, Easwaran Raman era...@google.com wrote: Hi, This patch fixes bugs introduced by my previous patch to propagate profiles during switch expansion. Bootstrap and profiledbootstrap

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 tejohn...@google.com * ree.c (add_removable_extension): Remove unnecessary mode check with other extension. 2012-10-18 Teresa Johnson tejohn...@google.com *

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

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 cr...@googlers.com 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

[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

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

2012-10-25 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com 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

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 w...@google.com 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

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 w...@google.com 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

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 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

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 ja...@redhat.com 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

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);

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 rdsandif...@googlemail.com 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

Re: RFC/A: A generic decompose_address routine

2012-10-25 Thread Richard Sandiford
H.J. Lu hjl.to...@gmail.com writes: On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford rdsandif...@googlemail.com 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

[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

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

2012-10-25 Thread Dodji Seketeli
Jakub Jelinek ja...@redhat.com 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) +

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 rdsandif...@googlemail.com wrote: H.J. Lu hjl.to...@gmail.com writes: On Thu, Oct 25, 2012 at 12:57 PM, Richard Sandiford rdsandif...@googlemail.com wrote: This patch is an attempt at the routine sketched here:

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 byte of

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  w...@google.com * varasm.c (assemble_variable): Set asan_protected even for decls that are already ASAN_RED_ZONE_SIZE or more bytes aligned. Index: varasm.c

[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

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  w...@google.com * varasm.c (assemble_variable): Set asan_protected even for decls that are already ASAN_RED_ZONE_SIZE or more bytes

[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

  1   2   >