Re: C6X port 8/11: A new FUNCTION_ARG macro

2011-05-17 Thread Paolo Bonzini
On 05/12/2011 05:40 PM, Bernd Schmidt wrote: + if (targetm.calls.function_arg_round_to_arg_boundary (passed_mode, type)) +round_boundary = boundary; + else +round_boundary = PARM_BOUNDARY; Why add an if, instead of making the new target hook function_arg_round_boundary? The default

Re: Prefixes for libgcc symbols (C6X 9.5/11)

2011-05-17 Thread Paolo Bonzini
On 05/13/2011 03:40 PM, Bernd Schmidt wrote: gcc/ * libgcc2.h (__NW, __NDW): Define using a __gnu_ prefix if LIBGCC2_GNU_PREFIX is defined. (__N): New macro. (__powisf2, __powidf2, __powitf2, __powixf2, __bswapsi2, __bswapdi2, __mulsc3, __muldc3,

[PATCH] Optimize __sync_fetch_and_add (x, -N) == N and __sync_add_and_fetch (x, N) == 0 (PR target/48986)

2011-05-17 Thread Jakub Jelinek
Hi! This patch optimizes using peephole2 __sync_fetch_and_add (x, -N) == N and __sync_add_and_fetch (x, N) == 0 by just doing lock {add,sub,inc,dec} and testing flags, instead of lock xadd plus comparison. The sync_old_addmode predicate change makes it possible to optimize __sync_add_and_fetch

Re: [patch, ARM] Fix PR42017, LR not used in leaf functions

2011-05-17 Thread Chung-Lin Tang
On 2011/5/13 04:26 PM, Richard Sandiford wrote: Richard Sandiford richard.sandif...@linaro.org writes: Chung-Lin Tang clt...@codesourcery.com writes: My fix here simply adds 'reload_completed' as an additional condition for EPILOGUE_USES to return true for LR_REGNUM. I think this should be

[PATCH, PR45098]

2011-05-17 Thread Tom de Vries
Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch 07_pr45098-nowrap-limits-iterations.patch

[PATCH, PR45098, 3/10]

2011-05-17 Thread Tom de Vries
On 05/17/2011 09:10 AM, Tom de Vries wrote: Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch

[PATCH, PR45098, 4/10]

2011-05-17 Thread Tom de Vries
On 05/17/2011 09:10 AM, Tom de Vries wrote: Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch

[PATCH, PR45098, 7/10]

2011-05-17 Thread Tom de Vries
On 05/17/2011 09:10 AM, Tom de Vries wrote: Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch

[PATCH, PR45098, 8/10]

2011-05-17 Thread Tom de Vries
On 05/17/2011 09:10 AM, Tom de Vries wrote: Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch

[PATCH, PR45098, 10/10]

2011-05-17 Thread Tom de Vries
On 05/17/2011 09:10 AM, Tom de Vries wrote: Hi Zdenek, I have a patch set for for PR45098. 01_object-size-target.patch 02_pr45098-rtx-cost-set.patch 03_pr45098-computation-cost.patch 04_pr45098-iv-init-cost.patch 05_pr45098-bound-cost.patch 06_pr45098-bound-cost.test.patch

Re: [PATCH] Optimize __sync_fetch_and_add (x, -N) == N and __sync_add_and_fetch (x, N) == 0 (PR target/48986)

2011-05-17 Thread Uros Bizjak
On Tue, May 17, 2011 at 9:02 AM, Jakub Jelinek ja...@redhat.com wrote: Hi! This patch optimizes using peephole2 __sync_fetch_and_add (x, -N) == N and __sync_add_and_fetch (x, N) == 0 by just doing lock {add,sub,inc,dec} and testing flags, instead of lock xadd plus comparison. The

Re: Don't let search bots look at buglist.cgi

2011-05-17 Thread Axel Freyn
On Mon, May 16, 2011 at 10:27:44PM -0700, Ian Lance Taylor wrote: On Mon, May 16, 2011 at 6:42 AM, Richard Guenther richard.guent...@gmail.com wrote: httpd being in the top-10 always, fiddling with bugzilla URLs? (Note, I don't have access to gcc.gnu.org, I'm relaying info from multiple

Commit: RX: Add peepholes for move followed by compare

2011-05-17 Thread Nick Clifton
Hi Guys, I am applying the patch below to add a peephole optimization to the RX backend. It was suggested by Kazuhio Inaoka at Renesas Japan, and adapted by me to use peephole2 system. It finds a register move followed by a comparison of the moved register against zero and replaces

Commit: RX: Add peepholes to remove redundant extensions

2011-05-17 Thread Nick Clifton
Hi Guys, I am applying the patch below to add a couple of peephole optimizations to the RX backend. It seems that GCC does not cope very well with the RX's ability to perform either sign-extending loads or zero-extending loads and so sometimes it can generate an extending load followed

Commit: RX: Fix predicates for restricted memory patterns

2011-05-17 Thread Nick Clifton
Hi Guys, I am applying the patch below to fix a minor discrepancy in the rx.md file. Several patterns can only use restricted memory addresses. They have the correct Q constraint, but they were using the more permissive memory_operand predicate. The patch fixes these patterns by

Commit: RX: Include cost of register moving in the cost of register loading.

2011-05-17 Thread Nick Clifton
Hi Guys, I am applying the patch below to fix a bug with the rx_memory_move_cost function. The problem was that the costs are meant to be relative to the cost of moving a value between registers, but the existing definition was making stores cheaper than moves, and loads the same cost

Re: [PATCH] Fix PR46728 (move pow/powi folds to tree phases)

2011-05-17 Thread Richard Guenther
On Mon, May 16, 2011 at 7:30 PM, William J. Schmidt wschm...@linux.vnet.ibm.com wrote: Richi, thank you for the detailed review! I'll plan to move the power-series expansion into the existing IL walk during pass_cse_sincos.  As part of this, I'll move tree_expand_builtin_powi and its

[PATCH][?/n] LTO type merging cleanup

2011-05-17 Thread Richard Guenther
This avoids the odd cases where gimple_register_canonical_type could end up running in cycles. I was able to reproduce this issue with an intermediate tree and LTO bootstrap. While the following patch is not the real fix (that one runs into a known cache-preloading issue again ...) it certainly

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread Richard Guenther
On Mon, 16 May 2011, H.J. Lu wrote: On Mon, May 16, 2011 at 7:17 AM, Richard Guenther rguent...@suse.de wrote: The following patch improves hashing types by re-instantiating the patch that makes us visit aggregate target types of pointers and function return and argument types.  This

Re: Reintroduce -mflat option on SPARC

2011-05-17 Thread Eric Botcazou
Right, -mflat option should only be for 32-bit SPARC target. OK, let's keep it that way for now. Another question: why does the model hijack %i7 to use it as frame pointer, instead of just using %fp? AFAICS both are kept as fixed registers by the code so the model seems to be wasting 1

Re: Don't let search bots look at buglist.cgi

2011-05-17 Thread Michael Matz
Hi, On Mon, 16 May 2011, Ian Lance Taylor wrote: httpd being in the top-10 always, fiddling with bugzilla URLs? (Note, I don't have access to gcc.gnu.org, I'm relaying info from multiple instances of discussion on #gcc and richi poking on it; that said, it still might not be web

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread Jan Hubicka
On Mon, 16 May 2011, Jan Hubicka wrote: I've seen us merge different named structs which happen to reside on the same variant list. That's bogus, not only because we are adjusting TYPE_MAIN_VARIANT during incremental type-merging and fixup, so computing a persistent hash by

Re: [PATCH] Fix PR46728 (move pow/powi folds to tree phases)

2011-05-17 Thread William J. Schmidt
On Tue, 2011-05-17 at 11:03 +0200, Richard Guenther wrote: On Mon, May 16, 2011 at 7:30 PM, William J. Schmidt wschm...@linux.vnet.ibm.com wrote: Richi, thank you for the detailed review! I'll plan to move the power-series expansion into the existing IL walk during pass_cse_sincos. As

Re: [patch ada]: Fix boolean_type_node setup and some cleanup for boolean use

2011-05-17 Thread Eric Botcazou
2011-05-16 Kai Tietz PR middle-end/48989 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use boolean_false_node instead of integer_zero_node. (convert_with_check): Likewise. * gcc-interface/decl.c (choices_to_gnu): Likewise. OK for this part.

[PATCH][?/n] LTO type merging cleanup

2011-05-17 Thread Richard Guenther
This fixes an oversight in the new SCC hash mixing code - we of course need to return the adjusted hash of our type, not the purely local one. There's still something weird going on, hash values somehow depend on the order we feed it types ... Bootstrapped on x86_64-unknown-linux-gnu, testing

Re: [patch ada]: Fix boolean_type_node setup and some cleanup for boolean use

2011-05-17 Thread Kai Tietz
2011/5/17 Eric Botcazou ebotca...@adacore.com: 2011-05-16  Kai Tietz       PR middle-end/48989       * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use       boolean_false_node instead of integer_zero_node.       (convert_with_check): Likewise.       * gcc-interface/decl.c

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread H.J. Lu
On Tue, May 17, 2011 at 3:29 AM, Richard Guenther rguent...@suse.de wrote: On Mon, 16 May 2011, H.J. Lu wrote: On Mon, May 16, 2011 at 7:17 AM, Richard Guenther rguent...@suse.de wrote: The following patch improves hashing types by re-instantiating the patch that makes us visit aggregate

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread H.J. Lu
On Tue, May 17, 2011 at 5:59 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, May 17, 2011 at 3:29 AM, Richard Guenther rguent...@suse.de wrote: On Mon, 16 May 2011, H.J. Lu wrote: On Mon, May 16, 2011 at 7:17 AM, Richard Guenther rguent...@suse.de wrote: The following patch improves hashing

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread Richard Guenther
On Tue, May 17, 2011 at 3:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, May 17, 2011 at 5:59 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, May 17, 2011 at 3:29 AM, Richard Guenther rguent...@suse.de wrote: On Mon, 16 May 2011, H.J. Lu wrote: On Mon, May 16, 2011 at 7:17 AM, Richard

Re: [PATCH][?/n] Cleanup LTO type merging

2011-05-17 Thread H.J. Lu
On Tue, May 17, 2011 at 6:03 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, May 17, 2011 at 3:01 PM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, May 17, 2011 at 5:59 AM, H.J. Lu hjl.to...@gmail.com wrote: On Tue, May 17, 2011 at 3:29 AM, Richard Guenther rguent...@suse.de wrote:

Re: FDO patch -- make ic related vars TLS if target allows

2011-05-17 Thread H.J. Lu
On Wed, Apr 27, 2011 at 10:54 AM, Xinliang David Li davi...@google.com wrote: Hi please review the trivial patch below. It reduces race conditions in value profiling. Another trivial change (to initialize function_list struct) is also included. Bootstrapped and regression tested on

Re: [patch ada]: Fix boolean_type_node setup and some cleanup for boolean use

2011-05-17 Thread Eric Botcazou
Hmm, sad. As the a check in tree-cfg for truth-expressions about having type-precision of 1 would be a good way. What is actual the cause for not setting type-precision here? But we are setting it: /* In Ada, we use an unsigned 8-bit type for the default boolean type. */

Re: [PATCH] comment precising need to use free_dominance_info

2011-05-17 Thread Pierre Vittet
So maybe this patch adding a comment on calculate_dominance_info is more adapted. ChangeLog: 2011-05-17 Pierre Vittetpier...@pvittet.com * dominance.c (calculate_dominance_info): Add comment precising when to free with free_dominance_info contributor number: 634276 Index:

RFA: MN10300: Add TLS support

2011-05-17 Thread Nick Clifton
Hi Richard, Hi Jeff, Hi Alex, Here is another MN10300 patch. This ones adds support for TLS. I must confess that I did not actually write this code - DJ did - but I have been asked to submit it upstream, so here goes: OK to apply ? Cheers Nick gcc/ChangeLog 2011-05-17 DJ Delorie

[PATCH] Fixup LTO SCC hash comparison fn

2011-05-17 Thread Richard Guenther
Quite obvious if you look at it for the 100th time... Richard. 2011-05-17 Richard Guenther rguent...@suse.de * gimple.c (type_hash_pair_compare): Fix comparison. Index: gcc/gimple.c === --- gcc/gimple.c(revision

[PING][PATCH 13/18] move TS_EXP to be a substructure of TS_TYPED

2011-05-17 Thread Nathan Froyd
On 05/10/2011 04:18 PM, Nathan Froyd wrote: On 03/10/2011 11:23 PM, Nathan Froyd wrote: After all that, we can finally make tree_exp inherit from typed_tree. Quite anticlimatic. Ping. http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00559.html Ping^2. -Nathan

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread Richard Earnshaw
On Thu, 2011-05-05 at 09:30 +0200, Corinna Vinschen wrote: [Please keep me CCed, I'm not subscribed to gcc-patches. Thank you] Hi, the definition of psignal in libiberty is void psignal (int, char *); The correct definition per POSIX is void psignal (int, const char *);

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread DJ Delorie
* strsignal.c (psignal): Change second parameter to const char *. Fix comment accordingly. OK. I had argued against this patch: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00439.html The newlib change broke ALL released versions of gcc, and the above patch does NOT fix the

Re: [patch ada]: Fix boolean_type_node setup and some cleanup for boolean use

2011-05-17 Thread Kai Tietz
2011/5/17 Eric Botcazou ebotca...@adacore.com: Hmm, sad. As the a check in tree-cfg for truth-expressions about having type-precision of 1 would be a good way.  What is actual the cause for not setting type-precision here? But we are setting it:  /* In Ada, we use an unsigned 8-bit type for

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread Richard Earnshaw
On Tue, 2011-05-17 at 11:52 -0400, DJ Delorie wrote: * strsignal.c (psignal): Change second parameter to const char *. Fix comment accordingly. OK. I had argued against this patch: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00439.html The newlib change broke ALL

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread Corinna Vinschen
On May 17 16:33, Richard Earnshaw wrote: On Thu, 2011-05-05 at 09:30 +0200, Corinna Vinschen wrote: [Please keep me CCed, I'm not subscribed to gcc-patches. Thank you] Hi, the definition of psignal in libiberty is void psignal (int, char *); The correct definition per

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread Corinna Vinschen
On May 17 17:07, Richard Earnshaw wrote: On Tue, 2011-05-17 at 11:52 -0400, DJ Delorie wrote: * strsignal.c (psignal): Change second parameter to const char *. Fix comment accordingly. OK. I had argued against this patch:

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread DJ Delorie
So regardless of whether the changes to newlib are a good idea or not, I think the fix to libiberty is still right. Irrelevent. I said I'd accept that change *after* the real problem is fixed. The real problem hasn't been fixed. The real problem is that libibery should NOT INCLUDE PSIGNAL

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread DJ Delorie
Thanks. I just have no check in rights to the gcc repository. I applied the change to the sourceware CVS repository but for gcc I need a proxy. Please, never apply libiberty patches only to src. They're likely to get deleted by the robomerge. The rule is: gcc only, or both at the same

Re: Libiberty: POSIXify psignal definition

2011-05-17 Thread DJ Delorie
What I don't understand is why the newlib change broke older compilers. Older compilers have the older libiberty. At the moment, libiberty cannot be built by *any* released gcc, because you cannot *build* any released gcc, because it cannot build its target libiberty. The function has been

Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler

2011-05-17 Thread Toon Moene
On 05/14/2011 09:40 PM, Janne Blomqvist wrote: Hi, the current version of showing the backtrace is not async-signal-safe as it uses backtrace_symbols() which, in turn, uses malloc(). The attached patch changes the backtrace printing functionality to instead use backtrace_symbols_fd() and

[PATCH, i386]: Trivial, use bool some more.

2011-05-17 Thread Uros Bizjak
Hello! 2011-05-16 Uros Bizjak ubiz...@gmail.com * config/i386/i386-protos.h (output_fix_trunc): Change arg 3 to bool. (output_fp_compare): Change args 3 and 4 to bool. (ix86_expand_call): Change arg 6 to bool. (ix86_attr_length_immediate_default): Change arg 2

[PATCH]: Restore bootstrap with --enable-build-with-cxx

2011-05-17 Thread Uros Bizjak
Hello! 2011-05-17 Uros Bizjak ubiz...@gmail.com * ipa-inline-analysis.c (inline_node_duplication_hook): Initialize info-entry with 0 * tree-inline.c (maybe_inline_call_in_expr): Initialize id.transform_lang_insert_block with NULL. Tested on x86_64-pc-linux-gnu

[PATCH, MELT] correcting path error in the Makefile.in

2011-05-17 Thread Pierre Vittet
This patch correct a bug in the current revision of MELT, which was preventing MELT to run correctly. This was a path problem in gcc/Makefile.in (melt-modules/ and melt-modules.mk) were not found. My contributor number is 634276. changelog : 2011-05-17 Pierre Vittet pier...@pvittet.com

Re: [Patch, libfortran] PR 48931 Async-signal-safety of backtrace signal handler

2011-05-17 Thread Toon Moene
On 05/17/2011 07:50 PM, Toon Moene wrote: On 05/14/2011 09:40 PM, Janne Blomqvist wrote: Hi, the current version of showing the backtrace is not async-signal-safe as it uses backtrace_symbols() which, in turn, uses malloc(). The attached patch changes the backtrace printing functionality to

Re: [PATCH, MELT] correcting path error in the Makefile.in

2011-05-17 Thread Basile Starynkevitch
On Tue, 17 May 2011 21:30:44 +0200 Pierre Vittet pier...@pvittet.com wrote: This patch correct a bug in the current revision of MELT, which was preventing MELT to run correctly. This was a path problem in gcc/Makefile.in (melt-modules/ and melt-modules.mk) were not found. My

Re: [PATCH]: Restore bootstrap with --enable-build-with-cxx

2011-05-17 Thread Toon Moene
On 05/17/2011 08:32 PM, Uros Bizjak wrote: Tested on x86_64-pc-linux-gnu {, m32} with --enable-build-with-cxx. Committed to mainline SVN as obvious. Does that mean that I can now remove the --disable-werror from my daily C++ bootstrap run ? It's great that some people understand the

Restore MIPS builds

2011-05-17 Thread Richard Sandiford
I've applied the patch below to restore -Werror MIPS builds. Tested on mips64-linux-gnu. Richard gcc/ * config/mips/mips.c (mips_handle_option): Remove unused variable. Index: gcc/config/mips/mips.c === ---

[PATCH] fix vfmsubaddpd/vfmaddsubpd generation

2011-05-17 Thread Quentin Neill
This patch fixes an obvious problem: the fma4_fmsubadd/fma4_fmaddsub instruction templates don't generate vfmsubaddpd/vfmaddsubpd because they don't use ssemodesuffix This passes bootstrap on x86_64 on trunk. Okay to commit? BTW, I'm testing on gcc-4_6-branch. Should I post a different patch

[v3] tuple vs noexcept

2011-05-17 Thread Paolo Carlini
Hi, this time too, took the occasion to add the get(tuple) bits. Tested x86_64-linux, committed. Paolo. /// 2011-05-17 Paolo Carlini paolo.carl...@oracle.com * include/std/tuple: Use noexcept where appropriate. (tuple::swap): Rework implementation.

Fix PR 49026 (-mfpmath= attribute bug)

2011-05-17 Thread Joseph S. Myers
PR 49026 identified testsuite regressions when mfpmath= is set by target attributes, that for some reason appear on x86_64-darwin but not x86_64-linux. This patch fixes one place where I failed to preserve the logic of this attribute handling, and restores the code generated for the testcase to

Re: [PATCH]: Restore bootstrap with --enable-build-with-cxx

2011-05-17 Thread Gabriel Dos Reis
On Tue, May 17, 2011 at 2:46 PM, Toon Moene t...@moene.org wrote: On 05/17/2011 08:32 PM, Uros Bizjak wrote: Tested on x86_64-pc-linux-gnu {, m32} with --enable-build-with-cxx. Committed to mainline SVN as obvious. Does that mean that I can now remove the --disable-werror from my daily C++

Re: [google] Parameterize function overhead estimate for inlining

2011-05-17 Thread Xinliang David Li
You will have a followup patch to override arm defaults, right? Ok for google/main. Thanks, David On Tue, May 17, 2011 at 9:29 PM, Mark Heffernan meh...@google.com wrote: This tiny change improves the size estimation for inlining and results in an average 1% size reduction and a small (maybe

[google] Increase inlining limits with FDO/LIPO

2011-05-17 Thread Mark Heffernan
This small patch greatly expands the function size limits for inlining with FDO/LIPO. With profile information, the inliner is much more selective and precise and so the limits can be increased with less worry that functions and total code size will blow up. This speeds up x86-64 internal