Re: [PATCH] Fix PR tree-optimization/51315

2012-01-05 Thread Richard Guenther
On Wed, Jan 4, 2012 at 5:24 PM, Eric Botcazou wrote: >> OK.  But passing small structures by value doesn't seem that rare -- >> especially in C++ -- and it doesn't feel right to disable SRA just because >> the backend likes to increase the alignment of stack vars. > > Agreed. > >> ...something lik

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-05 Thread Richard Guenther
On Wed, Jan 4, 2012 at 7:20 PM, Aldy Hernandez wrote: > I fixed this PR, and then it got reopened because the testcase triggered a > different problem on Alpha, Mips, and other architectures.  The problem is > actually totally different than the previous fix for 51472, and has nothing > to do with

Re: [PATCH] Fix profiledbootstrap with -fexceptions (PR bootstrap/51648)

2012-01-05 Thread Richard Guenther
On Thu, Jan 5, 2012 at 1:13 AM, Jakub Jelinek wrote: > Hi! > > profiledbootstrap with --disable-poststage-build-with-cxx and -fexceptions > currently fails on x86_64-linux.  The problem is that no EDGE_FAKE edge is > added from noreturn fatal_error call to the exit block, eventhough > fatal_error

Re: Fix bootstrap/51072 -- libitm not disabled without c++

2012-01-05 Thread Richard Guenther
On Thu, Jan 5, 2012 at 3:25 AM, Richard Henderson wrote: > On 01/05/2012 12:53 PM, Jakub Jelinek wrote: >> On Thu, Jan 05, 2012 at 12:38:17PM +1100, Richard Henderson wrote: >>> +# Disable libitm if we're not building C++ >>> +case ,${enable_languages}, in >>> +  *,c++) ;; >> >> Shouldn't that be

Re: Unreviewed libffi, libgfortran, libitm patches

2012-01-05 Thread Richard Guenther
On Thu, Jan 5, 2012 at 5:28 AM, Richard Henderson wrote: > On 01/04/2012 11:27 PM, Rainer Orth wrote: >>       [libgfortran, libitm] Link with -shared-libgcc >>       http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01382.html >> >> This will need a fortran resp. libitm maintainer. > > Does the follow

[RFC][patch] improve scev for array element

2012-01-05 Thread Jiangning Liu
This code change intends to improve scev for array element and reduce the common sub-expressions in loop, which may be introduced by multiple reference of expression &a[i]. In the end the register pressure may be reduced in the loop. The test case is simplified from a real benchmark, and only want

Re: [PATCH] Add missed adjustment to label_nuses in reload.

2012-01-05 Thread Marcus Shawcroft
Approved after you fix some minor fomatting nits. Your code has: Thank you. I committed the attached nit adjusted patch. /Marcusdiff --git a/gcc/reload.c b/gcc/reload.c index 53dcd2d..206fb36 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4212,7 +4212,12 @@ find_reloads (rtx insn, int repl

Ping^2: backport fix for PR 48660 (assigning to BLKmode return regs)

2012-01-05 Thread Richard Sandiford
Ping for backporting this expand patch, which fixes an ice-on-valid regression from 4.4 while compiling certain C++ packages on ARM: http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01550.html As I understand it, this bug is the only reason Ubuntu is keeping a GCC 4.4 package: there's no known wor

Re: [patch libstdc++]: Fix PR/51673

2012-01-05 Thread Kai Tietz
Ping! 2012/1/2 Paolo Carlini : > Hi, > >> Hello, >> >> additionally to the suggested patch by Pawel Sikora, I added the >> adjustments for mt-allocator to it too. >> >> ChangeLog >> >> 2012-01-01  Kai Tietz >> >>         PR libstc++/51673 >>       * config/abi/pre/gnu-versioned-namespace.ver: Adju

Ping [Patch]: split libgcc/config/ia64/t-ia64 in two

2012-01-05 Thread Tristan Gingold
Ping for this patch. Tristan. On Dec 21, 2011, at 12:04 PM, Tristan Gingold wrote: > Hi, > > this patch fixes two build libgcc issues on VMS/ia64. > > * Because VMS doesn't define LIBGCC2_HAS_TF_MODE, compatibility thunks > shouldn't be compiled. Otherwise, the shared libgcc library fails to

[PATCH] testcase for PR41576

2012-01-05 Thread Richard Guenther
Which was fixed in 4.6 already. We only warn for type mismatches for symbols in different TUs if they are not structurally compatible. Richard. 2012-01-05 Richard Guenther PR lto/41576 * gfortran.dg/lto/pr41576_0.f90: New testcase. * gfortran.dg/lto/pr41576_1.f90: Li

[PATCH] Fix PR51760

2012-01-05 Thread Richard Guenther
We can't directly drop to VARYING from UNDEFINED in likely_value as an UNDEFINED value can later become CONSTANT which would make us go up the lattice. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2012-01-05 Richard Guenther PR tree-optimization/51760

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-05 Thread Aldy Hernandez
On 01/04/12 17:16, Patrick Marlier wrote: On 01/04/2012 01:20 PM, Aldy Hernandez wrote: I fixed this PR, and then it got reopened because the testcase triggered a different problem on Alpha, Mips, and other architectures. The problem is actually totally different than the previous fix for 51472,

patch ping^2: PR 51516 (TM clone aliases)

2012-01-05 Thread Aldy Hernandez
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01088.html

Re: [libitm] fix reentrant.c testcase

2012-01-05 Thread Aldy Hernandez
On 01/04/12 18:54, Patrick Marlier wrote: In the reentrant.c testcase, the first transaction has no transactional access and thus removed. In order to keep this transaction, I added a shared access inside. Tested on i686. OK to commit? (I don't have an account, so thanks in advance to committer)

Re: [trans-mem] fix problem with TM clone aliases

2012-01-05 Thread Aldy Hernandez
On 01/04/12 20:03, Patrick Marlier wrote: Hi, (Initially from http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00225.html) PR51516 shows up a problem due to the TM IPA rework. Indeed, an alias can get called but tm cg data is in the parent of the alias. The fix consists to set and use information fr

[PATCH] mudflap and LTO interaction

2012-01-05 Thread Richard Guenther
This should improve the situation a bit, avoiding ICEs and irritating "Please submit a full bug report" messages. It restricts the command-line options to the set of supported languages and rejects compiling with -flto -fmudflap (we then silently drop -fmudflap if you choose to only apply it at l

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-05 Thread Aldy Hernandez
You want is_gimple_reg () instead of is_gimple_non_addressable () as you can't simply make something addressable at this point. is_gimple_non_addressable looks like a weird redundant predicate to me - it's only used once and its use should be replaced (and the predicate removed). Ok, thanks.

patch: remove is_gimple_non_addressable

2012-01-05 Thread Aldy Hernandez
As you suggested here: http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00232.html Bootregged on x86-64 Linux. OK? * gimple.c (is_gimple_non_addressable): Remove. * gimple.h: Remove is_gimple_non_addressable. * gimplify.c (gimplify_modify_expr_rhs): Use is_gimple_reg instead

[PATCH] Handle OPTIMIZATION_NODE in LTO

2012-01-05 Thread Richard Guenther
Easy, just mimics what we do for the target attribute. Bootstrap / regtest pending on x86_64-unknown-linux-gnu. Richard. 2012-01-05 Richard Guenther PR lto/50490 * tree-streamer-out.c (write_ts_optimization): New function. (streamer_write_tree_body): Call it.

[committed] Fix ICE with statement expression in C (PR middle-end/51761)

2012-01-05 Thread Jakub Jelinek
Hi! Jason has added var ={v} {CLOBBER}; cleanup generation in the gimplifier, unfortunately it works only for C++/Obj-C++, because other FEs don't add the needed CLEANUP_POINT_EXPRs to the IL (because they don't use cleanups or emit them differently). Fixed by only adding the clobber cleanups if

[PATCH] Attempt to prevent cross-jumping of noreturn calls with different args sizes (PR debug/51762)

2012-01-05 Thread Jakub Jelinek
Hi! The attached testcase on i?86 (32-bit) ICEs, because the csa pass cross-jumps the two noret calls, eventhough they have different args size depths. The following patch attempts to fix that up by forcibly adding REG_ARGS_SIZE notes to all noreturn calls when not accumulating outgoing args, whi

[PATCH] Skip g++.dg/torture/pr49309.C with -flto

2012-01-05 Thread Richard Guenther
Committed. Richard. 2012-01-05 Richard Guenther * g++.dg/torture/pr49309.C: Skip for -flto. Index: gcc/testsuite/g++.dg/torture/pr49309.C === --- gcc/testsuite/g++.dg/torture/pr49309.C (revision 182912) +++ gcc/tes

Re: PR middle-end/51472: handle TM memmove with non-addressable destinations

2012-01-05 Thread Richard Guenther
On Thu, Jan 5, 2012 at 3:32 PM, Aldy Hernandez wrote: > >> You want is_gimple_reg () instead of is_gimple_non_addressable () as you >> can't simply make something addressable at this point. >> is_gimple_non_addressable >> looks like a weird redundant predicate to me - it's only used once and its >

Re: patch: remove is_gimple_non_addressable

2012-01-05 Thread Richard Guenther
On Thu, Jan 5, 2012 at 3:48 PM, Aldy Hernandez wrote: > As you suggested here: > > http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00232.html > > Bootregged on x86-64 Linux. > > OK? No, this pessimizes things too much at gimplification time, please simply inline the predicate instead. Richard.

[PATCH] PR c++/51541 - ICE with invalid identifier in alias-declaration

2012-01-05 Thread Dodji Seketeli
Hello, We crash upon these alias-declarations in which the identifier part is invalid. This is because make_id_declarator is called with an error_mark_node for the identifier. The patch below just avoids calling make_id_declarator in this case. It try to get out as early as possible to avoid the

Re: [google] Dump inline decisions more wisely

2012-01-05 Thread Xinliang David Li
Is there a better way to detect early inline phase and ipa_inline pass? Use always_inline_functions_inlined flag seems hacky. David On Wed, Jan 4, 2012 at 1:12 AM, Dehao Chen wrote: > Hi, > > This patch: > > * dump inline decisions with profile info whenever available. > * disable dump of einlin

[PATCH v2, ia64]: Fix PR 51681, ICE in gcc.dg/torture/vshuf-v2si.c

2012-01-05 Thread Uros Bizjak
On Tue, Jan 3, 2012 at 9:36 PM, Richard Henderson wrote: > On 01/03/2012 09:50 PM, Uros Bizjak wrote: >> I tried to investigate -mbig-endian a bit, but unfortunately almost >> all gcc.dg/torture/vshuf-*.c tests FAIL with -O2 on unpatched gcc. >> Tests pass with -O0, though. > > Tests without -O do

Re: [PATCH] Handle OPTIMIZATION_NODE in LTO

2012-01-05 Thread Steven Bosscher
On Thu, Jan 5, 2012 at 4:01 PM, Richard Guenther wrote: > Index: gcc/tree-streamer-out.c > === > --- gcc/tree-streamer-out.c     (revision 182908) > +++ gcc/tree-streamer-out.c     (working copy) > @@ -767,6 +767,27 @@ write_ts_target

Re: [PATCH] PR c++/51541 - ICE with invalid identifier in alias-declaration

2012-01-05 Thread Jason Merrill
OK. Jason

[SCORE] Hookize PREFERRED_RELOAD_CLASS

2012-01-05 Thread Anatoly Sokolov
Hi. This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the SCORE back end in the GCC and introduces equivalent TARGET_PREFERRED_RELOAD_CLASS target hook. Untested. OK to install? * config/score/score.h (PREFERRED_RELOAD_CLASS): Remove. * config/score/score

[BFIN] Hookize PREFERRED_RELOAD_CLASS

2012-01-05 Thread Anatoly Sokolov
Hi. This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the BFIN back end in the GCC and introduces equivalent TARGET_PREFERRED_RELOAD_CLASS target hook. Compiled. Untested. OK to install? * config/bfin/bfin.h (PREFERRED_RELOAD_CLASS): Remove. * config/bfin

[ARM] Hookize REGISTER_MOVE_COST and MEMORY_MOVE_COST

2012-01-05 Thread Anatoly Sokolov
Hi. This patch removes obsolete PREFERRED_RELOAD_CLASS macro from the ARM back end in the GCC and introduces equivalent TARGET_PREFERRED_RELOAD_CLASS target hook. Bootstrapped and regression tested on arm-unknown-linux-gnueabi. OK to install? * config/arm/arm.h (PREFERRED_RE

PR tree-optimization/51600 (negative function body estimates)

2012-01-05 Thread Jan Hubicka
Hi, the testcase ICE on negative function body size estimates. This is result of code in estimate_edge_devirt_benefit that attempts to benefit inlining of functions with callback whose callee can be devirtualized and become inlinable and the inlining is profitable. The logic here is wrong: the si

[PATCH] Fix asm goto handling in outof_cfglayout (PR rtl-optimization/51767)

2012-01-05 Thread Jakub Jelinek
Hi! On the following testcase we ICE, because one of the asm gotos degenerates (has the same fallthru block as jump label destination) and the target basic block doesn't immediately follow the block ending in the asm goto. During outof_cfglayout force_nonfallthru_and_redirect incorrectly adds an u

[PATCH] Fix up invalid asm goto diagnostics (PR middle-end/51768)

2012-01-05 Thread Jakub Jelinek
Hi! We use the same goto label for duplicate names of outputs/inputs/labels, but unlike outputs/inputs names where the STRING_CSTs are at TREE_PURPOSE (TREE_PURPOSE (i)), the STRING_CSTs for labels are at TREE_PURPOSE (i), thus if we need to report duplicate labels (either duplicate to some input/

Re: [PATCH] Fix up invalid asm goto diagnostics (PR middle-end/51768)

2012-01-05 Thread Richard Henderson
On 01/06/2012 07:05 AM, Jakub Jelinek wrote: > PR middle-end/51768 > * stmt.c (check_unique_operand_names): Don't ICE during error > reporting if i is from labels chain. > > * c-c++-common/pr51768.c: New test. Ok. r~

Re: [PATCH] Fix asm goto handling in outof_cfglayout (PR rtl-optimization/51767)

2012-01-05 Thread Richard Henderson
On 01/06/2012 07:00 AM, Jakub Jelinek wrote: > PR rtl-optimization/51767 > * cfgrtl.c (force_nonfallthru_and_redirect): Force addition > of jump_block and add an extra edge for degenerated asm gotos. > > * gcc.c-torture/compile/pr51767.c: New test. Ok. r~

Re: [PATCH v2, ia64]: Fix PR 51681, ICE in gcc.dg/torture/vshuf-v2si.c

2012-01-05 Thread Richard Henderson
On 01/06/2012 04:46 AM, Uros Bizjak wrote: > 2012-01-05 Uros Bizjak > > PR target/51681 > * config/ia64/ia64.c (expand_vec_perm_shrp): Use correct operands > for shrp pattern. Correctly handle and fixup shift variable. > Return false when shift > nelt for BYTES_BIG_ENDI

Re: [PATCH] Attempt to prevent cross-jumping of noreturn calls with different args sizes (PR debug/51762)

2012-01-05 Thread Richard Henderson
On 01/06/2012 02:17 AM, Jakub Jelinek wrote: > PR debug/51762 > * calls.c (emit_call_1): For noreturn calls force a REG_ARGS_SIZE > note when !ACCUMULATE_OUTGOING_ARGS. > > * gcc.dg/pr51762.c: New test. Ok. r~

couple of cosmetic fixes in tree-vrp.c

2012-01-05 Thread Eric Botcazou
This removes a duplicated if (code == RSHIFT_EXPR) condition in extract_range_from_binary_expr_1 and avoids useless computations in extract_range_from_unary_expr_1. No functional changes. Tested on i586-suse-linux, applied on the mainline as obvious. 2012-01-05 Eric Botcazou *

Re: [Patch, Fortran] Deregister allocatable COARRAYS, fixes to (de)allocate

2012-01-05 Thread Tobias Burnus
*ping* On 30 December 2011, Tobias Burnus wrote: Dear all, first, I want to wish all of you a happy New Year. Attached you find a patch which calls _gfortran_caf_deregister for allocatable coarrays - for -fcoarray=lib. In the caf libraray version, coarrays are allocated/deallocated in the li

Re: Unreviewed libffi, libgfortran, libitm patches

2012-01-05 Thread Richard Henderson
On 01/05/2012 08:30 PM, Richard Guenther wrote: > Do all targets support sth like weak relocs? Nearly. Those that don't probably don't pass the pthreads requirement. r~

Re: patch ping^2: PR 51516 (TM clone aliases)

2012-01-05 Thread Richard Henderson
On 01/06/2012 12:53 AM, Aldy Hernandez wrote: > http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01088.html It looks like it would be cleaner to put the .alias dereferencing directly into get_cg_data. r~

[PATCH][ARM] Fix headmerge testcases

2012-01-05 Thread Andrew Stubbs
This patch fixes a testcase that fails whenever "120" appears in the date. I first noticed the problem at the start of December, and now I expect it to return and continue until the end of September, if it's not fixed. OK? Andrew 2012-01-05 Andrew Stubbs gcc/testsuite/ * gcc.target/arm/

[PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-05 Thread Dodji Seketeli
Hello, In the example of the patch below, the DIE for the definition of the class 'Executor', when put in the type unit section is not put under the DIE for the 'thread' namespace. Rather, it's put under the DIE for the global namespace. One thing to note is that the DIE for the declaration of '

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-05 Thread Jakub Jelinek
On Thu, Jan 05, 2012 at 11:47:49PM +0100, Dodji Seketeli wrote: > --- /dev/null > +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C > @@ -0,0 +1,34 @@ > +// Origin: PR debug/45682 > +// { dg-options "-g -gdwarf-4 -dA -fdebug-types-section" } > + > +namespace thread { > +class Executor {}; > +}

Re: [Patch]: split libgcc/config/ia64/t-ia64 in two

2012-01-05 Thread Richard Henderson
On 12/21/2011 10:04 PM, Tristan Gingold wrote: > * config/ia64/t-ia64 (LIB1ASMFUNCS): Move backward > compatibility thunks... > (CUSTOM_CRTSTUFF, crtbegin.o, crtend.o) > (crtbeginS.o, crtendS.o): ... and these to ... > * config/ia64/t-ia64-elf: ... this new file. >

[testsuite,trans-mem] memcpy-1.c testcase

2012-01-05 Thread Patrick Marlier
On Darwin, the memcpy is a macro to provide secure string operations (FORTIFY_LEVEL > 0). I propose to remove the string.h include and add manually the declaration. Tested on x86_64-apple-darwin and on x86_64-unknown-linux-gnu. This solves PR51655. Patrick Marlier. testsuite/ChangeLog 2012-01

Re: [RFC][patch] trans-mem: mark transaction begins as returns-twice

2012-01-05 Thread Torvald Riegel
On Wed, 2012-01-04 at 09:59 +1100, Richard Henderson wrote: > On 01/03/2012 09:42 PM, Torvald Riegel wrote: > >> Why does the explicit CFG approach not work exactly? cfun->calls_setjmp > >> is > >> thought to be quite a big hammer. > > > > I don't know, actually. When I looked at the miscompil

Re: [PATCH] PR debug/45682 - wrong struct DIE nesting with -fdebug-types-section

2012-01-05 Thread Cary Coutant
> In the example of the patch below, the DIE for the definition of the > class 'Executor', when put in the type unit section is not put under > the DIE for the 'thread' namespace.  Rather, it's put under the DIE > for the global namespace. I don't think this is the problem that PR 45682 is complai

[patch] libitm: Optimize undo log.

2012-01-05 Thread Torvald Riegel
This fixes a known, obvious performance problem in libitm's undo log: Before, each write was put into a separately allocated buffer, which kills performance. With the patch, everything goes into a single buffer: Undo data first, then the length of the data, then the address. We only need this data

Re: adjust installation docs to discourage installing GMP, MPFR and MPC separately

2012-01-05 Thread Jonathan Wakely
Ping. I think this is a useful improvement to the docs and could prevent the most commonly-encountered bootstrap failure for inexpert users building GCC. OK for trunk? On 30 December 2011 13:29, Jonathan Wakely wrote: On 22 December 2011 00:23, Jonathan Wakely wrote: > The most frequently asked

[v3] improve docs on data race hunting

2012-01-05 Thread Jonathan Wakely
2012-01-06 Jonathan Wakely PR libstdc++/51504 * doc/xml/manual/debug.xml: Suggest using symbol interposition to override symbols using annotation macros. committed to trunk Index: doc/xml/manual/debug.xml =

Re: [Patch libitm] [V2] config-based assessment of weakref capability

2012-01-05 Thread Patrick Marlier
Hello Iain, On 11/21/2011 10:17 AM, Iain Sandoe wrote: This checked to DTRT on i686-darwin9 (weak ref doesn't behave like ELF's) and x86-64-darwin10/XCode 3.2.5 (weak ref behaves as per ELF). It is my understanding from some off-list discussion reported with the ld64 engineer - - that Darwin >=

Re: [google] Dump inline decisions more wisely

2012-01-05 Thread Dehao Chen
Or use a new global variable to denote whether it's in early-inline or ipa-inline? Dehao On Fri, Jan 6, 2012 at 1:46 AM, Xinliang David Li wrote: > > Is there a better way to detect early inline phase and ipa_inline > pass? Use always_inline_functions_inlined flag seems hacky. > > David > > On W

Re: [BFIN] Hookize PREFERRED_RELOAD_CLASS

2012-01-05 Thread Jie Zhang
Hi Anatoly, The patch looks OK. But I cannot apply your patch by saving your email as a patch file. If you take a look at this: http://gcc.gnu.org/cgi-bin/get-raw-msg?listname=gcc-patches&date=2012-01&msgid=4F05F12F.607%40post.ru you will find that there is a extra white space before each c

[ARM] Implement vec_perm for NEON

2012-01-05 Thread Richard Henderson
Ping. Reposting the patch as it required updates to HEAD. r~ commit 04fbf0c29c0836c6ac8a1342a9eb664a88b696ee Author: Richard Henderson Date: Thu Dec 8 12:11:08 2011 -0800 arm: Implement vec_perm and vec_perm_const for NEON. diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-p

Re: [google] Dump inline decisions more wisely

2012-01-05 Thread Xinliang David Li
Not ideal but better. Ok with this change. David On Thu, Jan 5, 2012 at 5:47 PM, Dehao Chen wrote: > Or use a new global variable to denote whether it's in early-inline or > ipa-inline? > > Dehao > > On Fri, Jan 6, 2012 at 1:46 AM, Xinliang David Li wrote: >> >> Is there a better way to detect