[patch] Use coretypes types in headers

2012-07-11 Thread Steven Bosscher
Hello, With coretypes included everywhere, there's no need to use the underlying "struct blah *" method anymore in almost all places. Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK? Ciao! Steven * basic-block.h (struct edge_def): Use basic_block instead of basic_block_de

Re: RFA: Revert revision 164552

2012-07-11 Thread H.J. Lu
On Wed, Dec 1, 2010 at 1:32 AM, Bernd Schmidt wrote: > On 11/03/2010 04:02 PM, Diego Novillo wrote: >> On Wed, Nov 3, 2010 at 10:02, Rainer Orth >> wrote: >>> H.J., >>> Revision 164552: http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00849.html which fixes: http://gcc

[patch] A few more header cleanups

2012-07-11 Thread Steven Bosscher
Hello, This is another round of small header include cleanups. Note: I'm not going through this work completely at random, but it's sometimes hard to keep an overview of all the changes which is why I'm sending them in bits. For example, moving the can_move_by_pieces prototype really doesn't impr

Re: [Patch, ARM] Fix PR53859: ICE on armv7e-m

2012-07-11 Thread Ramana Radhakrishnan
On 10 July 2012 13:20, Greta Yorsh wrote: > New RTL patterns generated for epilogues with RETURN (trunk r188742) are not > recognized by the pattern matching code in arm_early_load_addr_dep, which is > used for insn latency calculation when tuning for cortex-m4. It causes an > ICE when tuning for

Re: [PATCH] Fix breakage for m68k-linux introduced by 4a020a8 / r189359

2012-07-11 Thread Andreas Schwab
This is already fixed. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."

Re: [patch] Use coretypes types in headers

2012-07-11 Thread Richard Guenther
On Wed, Jul 11, 2012 at 9:31 AM, Steven Bosscher wrote: > Hello, > > With coretypes included everywhere, there's no need to use the > underlying "struct blah *" method anymore in almost all places. > > Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK? Ok! Thanks, Richard. > Ciao! > Steven

Re: [patch] A few more header cleanups

2012-07-11 Thread Richard Guenther
On Wed, Jul 11, 2012 at 9:36 AM, Steven Bosscher wrote: > Hello, > > This is another round of small header include cleanups. > > Note: I'm not going through this work completely at random, but it's > sometimes hard to keep an overview of all the changes which is why I'm > sending them in bits. For

[patch] Add ATTRIBUTE_MEMALLOC to a few malloc functions in GCC

2012-07-11 Thread Steven Bosscher
Hello, One for under the "eat your own dog food" header. Bootstrapped and tested on powerpc64-unknown-linux-gnu. cc1 is a few bytes smaller. I expect the benefits to be more noticeable with an LTO-enabled bootstrap, but I haven't figured out yet how to do that :-) OK for trunk? Ciao! Steven

[patch] Remove unused java/expr.c:force_evaluation_order

2012-07-11 Thread Steven Bosscher
Hello, Remove force_evaluation_order because the only caller is force_evaluation_order itself. Will commit after a few days, if no-one objects. Ciao! Steven java/ * java-tree.h (force_evaluation_order): Remove prototype. * expr.c (force_evaluation_order): Remove unused function.

Re: [patch] Add ATTRIBUTE_MEMALLOC to a few malloc functions in GCC

2012-07-11 Thread Richard Guenther
On Wed, Jul 11, 2012 at 11:41 AM, Steven Bosscher wrote: > Hello, > > One for under the "eat your own dog food" header. > > Bootstrapped and tested on powerpc64-unknown-linux-gnu. > cc1 is a few bytes smaller. I expect the benefits to be more > noticeable with an LTO-enabled bootstrap, but I haven

Re: [patch] Remove unused java/expr.c:force_evaluation_order

2012-07-11 Thread Andrew Haley
On 07/11/2012 10:44 AM, Steven Bosscher wrote: > Remove force_evaluation_order because the only caller is > force_evaluation_order itself. > Will commit after a few days, if no-one objects. No problem. I presume that its caller was removed because it wasn't needed, but I don't quite know why it w

Re: [patch] Add ATTRIBUTE_MEMALLOC to a few malloc functions in GCC

2012-07-11 Thread Steven Bosscher
On Wed, Jul 11, 2012 at 12:06 PM, Richard Guenther wrote: > On Wed, Jul 11, 2012 at 11:41 AM, Steven Bosscher > wrote: >> Hello, >> >> One for under the "eat your own dog food" header. >> >> Bootstrapped and tested on powerpc64-unknown-linux-gnu. >> cc1 is a few bytes smaller. I expect the benef

Re: [patch] Add ATTRIBUTE_MEMALLOC to a few malloc functions in GCC

2012-07-11 Thread Richard Guenther
On Wed, Jul 11, 2012 at 12:11 PM, Steven Bosscher wrote: > On Wed, Jul 11, 2012 at 12:06 PM, Richard Guenther > wrote: >> On Wed, Jul 11, 2012 at 11:41 AM, Steven Bosscher >> wrote: >>> Hello, >>> >>> One for under the "eat your own dog food" header. >>> >>> Bootstrapped and tested on powerpc64

Re: new sign/zero extension elimination pass

2012-07-11 Thread Tom de Vries
On 13/11/10 10:50, Eric Botcazou wrote: >> I profiled the pass on spec2000: >> >> -mabi=32 -mabi=64 >> ee-pass (usr time): 0.70 1.16 >> total (usr time): 919.30 879.26 >> ee-pass(%): 0.08 0.13 >> >> The pass takes 0.13% or less of th

Re: [PATCH] Fix breakage for m68k-linux introduced by 4a020a8 / r189359

2012-07-11 Thread Jan-Benedict Glaw
On Wed, 2012-07-11 08:44:33 +0200, Steven Bosscher wrote: > On Wed, Jul 11, 2012 at 7:49 AM, Jan-Benedict Glaw wrote: > > Hi! > > > > Git revision 4a020a8 [aka. SVN 189359], the large header reordering patch, > > broke m68k-linux (.../configure --target=m68k-linux --prefix=... > > --enable-langu

Fix PR53908

2012-07-11 Thread Bernd Schmidt
We're moving a load across a call since we don't recognize calls as memory-clobbering. Bootstrapping and testing now on 4.7 x86_64-linux, ok everywhere? Bernd PR rtl-optimization/53908 * df-problems.c (can_move_insns_across): Calls can clobber memory. Index: gcc/df-problems.c

Re: new sign/zero extension elimination pass

2012-07-11 Thread Jakub Jelinek
On Wed, Jul 11, 2012 at 12:30:12PM +0200, Tom de Vries wrote: > I've done the following: > - refactored the pass such that it now scans at most twice over all > instructions. > - updated the patch to be applicable to current trunk > - updated the motivating example to a more applicable one (as di

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

2012-07-11 Thread Jason Merrill
On 07/10/2012 02:04 AM, Jason Merrill wrote: Apparently we need to implement DR 1402 in 4.7 in order to fix the std::pair ABI breakage properly. So here it is: if overload resolution chooses a non-trivial copy constructor, instead of causing the move constructor to be deleted, we just don't impl

Re: new sign/zero extension elimination pass

2012-07-11 Thread Tom de Vries
On 11/07/12 13:41, Jakub Jelinek wrote: > On Wed, Jul 11, 2012 at 12:30:12PM +0200, Tom de Vries wrote: >> I've done the following: >> - refactored the pass such that it now scans at most twice over all >> instructions. >> - updated the patch to be applicable to current trunk >> - updated the mot

[testsuite] Allow for / comments in g++.dg/debug/dwarf2/pubnames-2.C

2012-07-11 Thread Rainer Orth
g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since comments start with /, not # for both Sun as and gas. The following patch fixes this by allowing the alternate comment character. Tested with the appropriate runtest invocation on i386-pc-solaris2.11 and x86_64-unknown-linux-gn

Re: [testsuite] Allow for / comments in g++.dg/debug/dwarf2/pubnames-2.C

2012-07-11 Thread Andreas Schwab
Rainer Orth writes: > g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since > comments start with /, not # for both Sun as and gas. The following > patch fixes this by allowing the alternate comment character. Do we have to repeat this for every new test that scans the assembler

Re: [testsuite] Allow for / comments in g++.dg/debug/dwarf2/pubnames-2.C

2012-07-11 Thread Mike Stump
On Jul 11, 2012, at 9:30 AM, Andreas Schwab wrote: > Rainer Orth writes: > >> g++.dg/debug/dwarf2/pubnames-2.C currently FAILs on Solaris/x86 since >> comments start with /, not # for both Sun as and gas. The following >> patch fixes this by allowing the alternate comment character. > > Do we

[PATCH] New fdo summary-based icache sensitive unrolling (issue6351086)

2012-07-11 Thread Teresa Johnson
Ports some patches related to improving FDO program summary information and using it to guide loop unrolling from google branches to mainline. The patch is enhanced to add additional summary information to aid in determining hot/cold decisions. The original patch description is at: http://gcc.gn

Re: Fix PR53908

2012-07-11 Thread Steven Bosscher
On Wed, Jul 11, 2012 at 1:24 PM, Bernd Schmidt wrote: > We're moving a load across a call since we don't recognize calls as > memory-clobbering. > > Bootstrapping and testing now on 4.7 x86_64-linux, ok everywhere? Maybe: + if (CALL_P (insn) + && ! RTL_CONST_OR_PURE_CALL_P (insn)) ?

[patch] Call free_after_parsing earlier

2012-07-11 Thread Steven Bosscher
Hello, GCC calls free_after_parsing in rest_of_clean_state. That's way too late, it can be done in free_lang_data_in_cgraph instead. While there, I noticed a silly loop in final.c, and cleaned that up too. Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for trunk? Ciao! Steven * fi

[patch] Make make_debug_insn_raw and make_jump_insn_raw static

2012-07-11 Thread Steven Bosscher
Hello, They're defined and only used in emit-rtl.c so they can be static (like make_call_insn_raw). Bootstrapped&tested on x86_64-unknown-linux-gnu. Will commit as obvious later this week if no-one objects. Ciao! Steven * emit-rtl.c (make_debug_insn_raw, make_jump_insn_raw): Make static

Re: regrename creates invalid insn

2012-07-11 Thread Bernd Schmidt
On 03/26/2012 06:03 PM, Andreas Schwab wrote: > Bernd Schmidt writes: > >> Does 4.7 still have the failure at all? > > Yes, see PR52573. Well, I still think having both REG_DEAD and REG_UNUSED for the same reg is bogus, but fixing that causes trouble in reg-stack. It seems the path of least res

Re: regrename creates invalid insn

2012-07-11 Thread Steven Bosscher
On Wed, Jul 11, 2012 at 11:31 PM, Bernd Schmidt wrote: > On 03/26/2012 06:03 PM, Andreas Schwab wrote: >> Bernd Schmidt writes: >> >>> Does 4.7 still have the failure at all? >> >> Yes, see PR52573. > > Well, I still think having both REG_DEAD and REG_UNUSED for the same reg > is bogus, but fixin

Re: regrename creates invalid insn

2012-07-11 Thread Bernd Schmidt
On 07/12/2012 12:10 AM, Steven Bosscher wrote: > On Wed, Jul 11, 2012 at 11:31 PM, Bernd Schmidt > wrote: >> On 03/26/2012 06:03 PM, Andreas Schwab wrote: >>> Bernd Schmidt writes: >>> Does 4.7 still have the failure at all? >>> >>> Yes, see PR52573. >> >> Well, I still think having both RE

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-11 Thread Hans-Peter Nilsson
On Mon, 9 Jul 2012, Dimitrios Apostolou wrote: > Since output_addr_const() shows pretty hot in the compiler, I reinstated the > fprint_w() call in place of fprintf(). > > This patch relies on two things: 2's complement representation for negative > int and that HOST_WIDE_INT is at least as large ty

Re: PR 51094 - fprint_w() in output_addr_const() reinstated

2012-07-11 Thread Mike Stump
On Jul 9, 2012, at 12:54 PM, Dimitrios Apostolou wrote: > Since output_addr_const() shows pretty hot in the compiler, I reinstated the > fprint_w() call in place of fprintf(). My review bits... First there is no guarantee that HOST_WIDE_INT_BITSIZE is 64 or less, so [20] is unsafe longer term.

Re: new sign/zero extension elimination pass

2012-07-11 Thread Kenneth Zadeck
Tom, I have a problem with the approach that you have taken here. I believe that this could be a very useful addition to gcc so I am in general very supportive, but i think you are missing an important case. My problem is that it the pass does not actually look at the target and make any d

Re: [PATCH] [LM32] Fix lm32-elf-gcc build error by remove unnecessary constant legitimate check.

2012-07-11 Thread Hans-Peter Nilsson
On Tue, 10 Jul 2012, Jia Liu wrote: > Hi all, > > When I build lm32-elf-gcc, it failed at libgcc configure due to > lm32-elf-cc1 segment fault when compile conftest.c: > > void bar (); > void clean (int *); > void foo () > { > int i __attribute__ ((cleanup (clean))); > bar(); > } > > Then I fin

[PATCH 0/6] Thread pointer built-in functions

2012-07-11 Thread Chung-Lin Tang
Hi, following discussion here: http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00229.html (and a few other mails in the thread between Richard Sandiford) A number of targets implement the same name __builtin_thread_pointer(), __builtin_set_thread_pointer() TLS builtins. This set of patches changes th

[PATCH 1/6] Thread pointer built-in functions, core parts

2012-07-11 Thread Chung-Lin Tang
Core parts adding the new hooks. BUILT_IN_THREAD_POINTER and BUILT_IN_SET_THREAD_POINTER are different hooks, as some targets only implement one of them (thread pointer read). Thanks, Chung-Lin * targhooks.c (default_expand_builtin_thread_pointer): New. (default_expand_builtin_set

[PATCH 2/6] Thread pointer built-in functions, alpha

2012-07-11 Thread Chung-Lin Tang
Alpha parts. Note that now the machine-independent __builtin_thread_pointer() is now marked as const/readonly, slightly different from the original alpha backend code. Thanks, Chung-Lin * config/alpha/alpha.c (alpha_builtin): Remove ALPHA_BUILTIN_THREAD_POINTER, ALPHA_BUILTIN_SET_

[PATCH 3/6] Thread pointer built-in functions, arm

2012-07-11 Thread Chung-Lin Tang
ARM parts, no further notes. Thanks, Chung-Lin * config/arm/arm.c (arm_builtins): Remove ARM_BUILTIN_THREAD_POINTER. (arm_init_tls_builtins): Remove function. (arm_init_builtins): Remove call to arm_init_tls_builtins(). (arm_expand_builtin): Remove ARM_BUIL

[PATCH 4/6] Thread pointer built-in functions, s390

2012-07-11 Thread Chung-Lin Tang
S390 parts. In this patch, because the thread-pointer builtins were the only machine-dependent builtins in the s390 backend, I have removed basically all the init/expand builtin hook code. If the s390 maintainers want to keep the code for possible future backend builtins, this patch might need to b

[PATCH 5/6] Thread pointer built-in functions, xtensa

2012-07-11 Thread Chung-Lin Tang
xtensa parts. No other notes. Thanks, Chung-Lin * config/xtensa/xtensa.c (xtensa_expand_builtin_thread_pointer): Add hook function for TARGET_EXPAND_BUILTIN_THREAD_POINTER. (xtensa_expand_builtin_set_thread_pointer): Add hook function for TARGET_EXPAND_BUIL

[PATCH 6/6] Thread pointer built-in functions, mips

2012-07-11 Thread Chung-Lin Tang
Finally, what I personally need, the MIPS parts. Thanks, Chung-Lin * config/mips/mips.c (mips_get_tp): Add 'target' parameter for generating to specific reg. (mips_legitimize_tls_address): Update calls to mips_get_tp(). (mips_expand_builtin_thread_pointer): Add hoo