Re: Fix twolf -funroll-loops -O3 miscompilation (a semi-latent web.c bug)

2012-10-14 Thread Paolo Bonzini
Il 13/10/2012 00:25, Steven Bosscher ha scritto: On Fri, Oct 12, 2012 at 11:16 PM, Jan Hubicka hubi...@ucw.cz wrote: On Fri, Oct 12, 2012 at 10:44 PM, Jan Hubicka hubi...@ucw.cz wrote: 1) computing liveness with REG_EQUAL included prior RD that means a lot of shuffling of REG_DEAD notes

Re: [i386] scalar ops that preserve the high part of a vector

2012-10-14 Thread Uros Bizjak
On Sat, Oct 13, 2012 at 10:52 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this patch provides an alternate pattern to let combine recognize scalar operations that preserve the high part of a vector. If the strategy is all right, I could do the same for more operations (mul, div, ...).

Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling

2012-10-14 Thread Eric Botcazou
Today appears to be RTL loop optimizer patch day, because here's another patch... The problem here is that variable expansion does not update REG_EQUAL notes when it performs replacement of the renamed register. I fixed this by using validate_replace_rtx_group(). There is already code in

Re: [PATCH, gdc] - Merging gdc (GNU D Compiler) into gcc

2012-10-14 Thread Iain Buclaw
On 5 October 2012 11:35, Richard Guenther richard.guent...@gmail.com wrote: On Fri, Oct 5, 2012 at 12:07 PM, Iain Buclaw ibuc...@ubuntu.com wrote: On 5 October 2012 01:06, Joseph S. Myers jos...@codesourcery.com wrote: On Thu, 4 Oct 2012, Iain Buclaw wrote: The only patches to gcc proper are

Re: [PR38711] Use DF_LIVE in IRA if it available (for -O2 and higher)

2012-10-14 Thread Steven Bosscher
On Sat, Oct 13, 2012 at 11:12 PM, Vladimir Makarov vmaka...@redhat.com wrote: Ok for the idea. If we have a problem later, we could fix it. I'll look at the next version of the patch when you send it to give your the final approval. Great, thanks! Here is the updated patch, tested in the

Re: encoding all aliases options in .opt files

2012-10-14 Thread Andreas Schwab
Manuel López-Ibáñez lopeziba...@gmail.com writes: aux-infoFILE /* we could accept this to be compatible with some options like -B */ Concatenated option arguments (without separators like '=' or '-') should only ever be used for single character options. Andreas. -- Andreas Schwab,

Re: [i386] scalar ops that preserve the high part of a vector

2012-10-14 Thread Marc Glisse
On Sun, 14 Oct 2012, Uros Bizjak wrote: On Sat, Oct 13, 2012 at 10:52 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this patch provides an alternate pattern to let combine recognize scalar operations that preserve the high part of a vector. If the strategy is all right, I could do the

Re: encoding all aliases options in .opt files

2012-10-14 Thread Manuel López-Ibáñez
On 14 October 2012 13:38, Andreas Schwab sch...@linux-m68k.org wrote: Manuel López-Ibáñez lopeziba...@gmail.com writes: aux-infoFILE /* we could accept this to be compatible with some options like -B */ Concatenated option arguments (without separators like '=' or '-') should only ever be

[PATCH, alpha]: Remove empty predicates and/or constraints from .md files

2012-10-14 Thread Uros Bizjak
Hello! 2012-10-14 Uros Bizjak ubiz...@gmail.com * config/alpha/alpha.md: Remove empty predicates and/or constraints. * config/alpha/sync.md: Ditto. Tested on alphaev68-pc-linux-gnu, committed to mainline SVN. Uros. a.diff.txt.gz Description: GNU Zip compressed data

[C++ testcase] PR 52643

2012-10-14 Thread Paolo Carlini
Hi, testcase added, issue closed as fixed. Tested x86_64-linux. Thanks, Paolo. 2012-10-14 Paolo Carlini paolo.carl...@oracle.com PR c++/52643 * g++.dg/opt/pr52643.C: New. Index: g++.dg/opt/pr52643.C

Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling

2012-10-14 Thread Jan Hubicka
Hello, Today appears to be RTL loop optimizer patch day, because here's another patch... The problem here is that variable expansion does not update REG_EQUAL notes when it performs replacement of the renamed register. Hehe. or rather REG_EQUAL patch day :) It makes me wonder how much of

Re: Propagate profile counts during switch expansion

2012-10-14 Thread Jan Hubicka
Hi, Index: optabs.c === --- optabs.c(revision 191879) +++ optabs.c(working copy) @@ -4249,7 +4249,7 @@ prepare_operand (enum insn_code icode, rtx x, int we can do the branch. */ static void -emit_cmp_and_jump_insn_1

Re: Use conditional casting with symtab_node

2012-10-14 Thread Diego Novillo
On Fri, Oct 12, 2012 at 4:22 AM, Richard Biener richard.guent...@gmail.com wrote: I also think that instead of if (cgraph_node *q = p-cast_to cgraph_node * ()) we want if ((q = cast_to cgraph_node * (p)) I see absolutely no good reason to make cast_to a member, given that the

Fix estimated number of iterations for loops with multiple exits

2012-10-14 Thread Jan Hubicka
Hi, the update of RTL optimizers to use SCEV's loop bounds make them to be inexpectedly active. One of reasons is invalid. For loop int *a; int t() { int i; for (i=0;i100;i++) if (a[i]) return 1; return 0; } We get realistic number of iteration estimate to be 999. This

LangEnabledBy with arguments

2012-10-14 Thread Manuel López-Ibáñez
Bootstrapped and regression tested on x86_64-linux-gnu. The additional testcase was not failing before, but tests for something that the current testsuite does not. OK? 2012-10-14 Manuel López-Ibáñez m...@gcc.gnu.org PR c/53063 PR c/40989 gcc/ * optc-gen.awk: Handle

Re: [PR38711] Use DF_LIVE in IRA if it available (for -O2 and higher)

2012-10-14 Thread Vladimir Makarov
On 12-10-14 6:16 AM, Steven Bosscher wrote: On Sat, Oct 13, 2012 at 11:12 PM, Vladimir Makarov vmaka...@redhat.com wrote: Ok for the idea. If we have a problem later, we could fix it. I'll look at the next version of the patch when you send it to give your the final approval. Great, thanks!

Re: [lra] patch from Richard Sandiford's review of lra-assigns.c

2012-10-14 Thread Vladimir Makarov
On 12-10-12 11:00 AM, Richard Sandiford wrote: Vladimir Makarov vmaka...@redhat.com writes: The following patch implements most Richard's proposals for LRA lra-spills.c and lra-coalesce.c files. The patch was successfully bootstrapped on x86/x86-64. Committed as rev. 192389.

[lra] new hint * interpreitation.

2012-10-14 Thread Vladimir Makarov
The following patch adds a new interpretation of hint * for LRA. 2012-10-14 Vladimir Makarov vmaka...@redhat.com * doc/tm.texi: Add new interpretation of hint * for LRA. Committed as rev. 192436. Index: doc/md.texi ===

Re: [lra] patch to fix GCC crash on a SPEC2006 test

2012-10-14 Thread Vladimir Makarov
On 12-10-13 11:37 AM, Peter Bergner wrote: On Thu, 2012-10-11 at 23:53 -0400, Vladimir Makarov wrote: Is the following comment better? Presence of any pseudo in CALL_INSN_FUNCTION_USAGE does not affect value of insn_bitmap of the corresponding lra_reg_info. That is because we don't need to

Re: [SH] PR 34777 - Add test case

2012-10-14 Thread Oleg Endo
On Wed, 2012-10-10 at 07:46 +0900, Kaz Kojima wrote: Oleg Endo oleg.e...@t-online.de wrote: Uhm, yes, I forgot to add the -fschedule-insns and -mprefergot options. Regarding the -Os option, I think it's better to test this one at multiple optimization levels, just in case. I've looked

[C++ testcase] PR 53581

2012-10-14 Thread Paolo Carlini
Hi, testcase added, issue closed as fixed. Tested x86_64-linux. Thanks, Paolo. / 2012-10-14 Paolo Carlini paolo.carl...@oracle.com PR c++/53581 * g++.dg/template/crash113.C: New. Index: g++.dg/template/crash113.C

Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling

2012-10-14 Thread Steven Bosscher
On Sun, Oct 14, 2012 at 4:18 PM, Jan Hubicka wrote: Tested with a bootstrapped compiler. Test coverage isn't great, because variable expansion is not enabled by default. Are there particular reasons to not enable it? It seems like usefull optimization. I don't know of any reason not to

Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling

2012-10-14 Thread Steven Bosscher
On Sun, Oct 14, 2012 at 11:11 AM, Eric Botcazou wrote: OK, thanks (if you also add the testcase to gcc.dg with the special options). Thanks, committed as trunk r192439. Ciao! Steven

Re: [PR38711] Use DF_LIVE in IRA if it available (for -O2 and higher)

2012-10-14 Thread Steven Bosscher
On Sun, Oct 14, 2012 at 7:19 PM, Vladimir Makarov wrote: Thanks, Steven. IRA part is ok for me to commit. Thanks, I've committed this as trunk r192440. I'm aware I'm on the hook for fixing any fall-out :-) Ciao! Steven

Tidy store_bit_field_1 co.

2012-10-14 Thread Richard Sandiford
insv, extv and extzv have an unusual interface: the structure operand is supposed to have word_mode if stored in registers or byte_mode if stored in memory. Andrew's patch to try different insv modes: http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00126.html prompted me to try making the

Re: Make try_unroll_loop_completely to use loop bounds recorded

2012-10-14 Thread Jan Hubicka
Hi, here is an updated patch. The idea of splitting loopback edge did not fly. We then remove the edge in cfgcleanup prior demolyshing the loop and we loose track on what basic blocks needs updating because we no longer can get the loop body. As a good news however I do not need the changed

Tidy extract_bit_field_1 co.

2012-10-14 Thread Richard Sandiford
Partnering the store_bit_field_1 patch that I just posted, this patch tidies up the extract_bit_field code in the same way. There is one deliberate behavioural change here. The old code had a single check for cases where the extraction could be done as a simple move. It started: if

[patch] Back-port ifcvt.c changes from PR54146

2012-10-14 Thread Steven Bosscher
Hello, This patch is a back-port of one of the scalability improvements I made to perform, well, maybe not well but at least not so poorly on the test case of PR54146, which has an extremely large function. The problem in ifcvt.c has two parts. The first is that clearing several arrays of

[SH] Document function attributes

2012-10-14 Thread Oleg Endo
Hello, The attached patch adds documentation for SH specific function attributes which haven't been documented yet. Tested with 'make info dvi pdf'. OK? Cheers, Oleg gcc/ChangeLog: * config/sh/sh.c: Update function attribute comments. * doc/extend.texi (function_vector):

[patch] Fix PR rtl-optimization/54870

2012-10-14 Thread Eric Botcazou
Hi, This is the execution failure of gfortran.dg/array_constructor_4.f90 in 64-bit mode on SPARC/Solaris at -O3. The dse2 dump for the reduced testcase reads: dse: local deletions = 0, global deletions = 1, spill deletions = 0 starting the processing of deferred insns deleting insn with uid =

Re: Fix twolf -funroll-loops -O3 miscompilation (a semi-latent web.c bug)

2012-10-14 Thread Steven Bosscher
On Sun, Oct 14, 2012 at 9:02 AM, Paolo Bonzini wrote: Can we just simulate liveness for web, and drop REG_EQUAL/REG_EQUIV notes that refer to a dead pseudo? I don't think we want to do that. A REG_EQUAL/REG_EQUIV note can use a pseudo that isn't live and still be valid. Consider a simple

Committed, MMIX: fix INCOMING_REGNO / OUTGOING_REGNO for return-value

2012-10-14 Thread Hans-Peter Nilsson
Back then, I must've missed that INCOMING_REGNO / OUTGOING_REGNO are used to map return-value-register/s too. Fixes: FAIL: gcc.dg/builtin-apply4.c execution test ... FAIL: gcc.dg/builtin-return-1.c execution test ... FAIL: gcc.dg/torture/stackalign/builtin-apply-4.c -O0 execution test FAIL:

Re: Fix twolf -funroll-loops -O3 miscompilation (a semi-latent web.c bug)

2012-10-14 Thread Eric Botcazou
I don't think we want to do that. A REG_EQUAL/REG_EQUIV note can use a pseudo that isn't live and still be valid. Consider a simple example like this: a = b + 3 // b dies here c = a {REG_EQUAL b+3} The REG_EQUAL note is valid and may help optimization. Removing it just because b is

Re: Fix twolf -funroll-loops -O3 miscompilation (a semi-latent web.c bug)

2012-10-14 Thread Steven Bosscher
On Sun, Oct 14, 2012 at 11:25 PM, Eric Botcazou wrote: I don't think we want to do that. A REG_EQUAL/REG_EQUIV note can use a pseudo that isn't live and still be valid. Consider a simple example like this: a = b + 3 // b dies here c = a {REG_EQUAL b+3} The REG_EQUAL note is valid and may

Re: PR fortran/51727: make module files reproducible, question on C++ in gcc

2012-10-14 Thread Janne Blomqvist
On Sat, Oct 13, 2012 at 4:26 PM, Tobias Schlüter tobias.schlue...@physik.uni-muenchen.de wrote: Hi, first a question also to non-gfortraners: if I want to use std::map, where do I #include map? In system.h? Now to the patch-specific part: in this PR, module files are produced with random

Re: PR fortran/51727: make module files reproducible, question on C++ in gcc

2012-10-14 Thread Jakub Jelinek
On Mon, Oct 15, 2012 at 12:35:27AM +0300, Janne Blomqvist wrote: On Sat, Oct 13, 2012 at 4:26 PM, Tobias Schlüter I'm putting forward two patches. One uses a C++ map to very concisely build up and handle the ordered list of symbols. This has three problems: 1) gfortran maintainers may not

Re: [testsuite] gcc.target/arm/div64-unwinding.c: xfail for linux

2012-10-14 Thread Michael Hope
On 10 October 2012 22:57, Richard Earnshaw rearn...@arm.com wrote: On 10/10/12 03:11, Janis Johnson wrote: On 10/09/2012 07:39 AM, Richard Earnshaw wrote: On 27/09/12 01:02, Janis Johnson wrote: Test gcc.target/arm/div64-unwinding.c is known to fail for GNU/Linux targets, as described in

[lra] merged with trunk @192442

2012-10-14 Thread Vladimir Makarov
LRA branch was merged with trunk @192442. Committed as rev. 192446.

Re: [PATCH] Fix gcov handling directories with periods

2012-10-14 Thread Ian Lance Taylor
On Sat, Oct 13, 2012 at 1:11 PM, Andreas Schwab sch...@linux-m68k.org wrote: Ian Lance Taylor i...@google.com writes: Suppose you drop this into include/libiberty.h: #ifdef __cplusplus inline char *lbasename(char *s) { return const_castchar*(lbasename (s)); } #endif That doesn't work:

Ping^2: RFA: Process '*' in '@'-output-template alternatives

2012-10-14 Thread Joern Rennecke
The following patch is still awaiting review: 2011-09-19 Jorn Rennecke joern.renne...@arc.com * genoutput.c (process_template): Process '*' in '@' alternatives. * doc/md.texi (node Output Statement): Provide example for the above.

Ping: RFA: Improve doloop_begin support

2012-10-14 Thread Joern Rennecke
2012-09-26 Jorn Rennecke joern.renne...@arc.com * loop-doloop.c (doloop_modify): Pass doloop_end pattern to gen_doloop_begin. * loop-doloop.c (doloop_optimize): Pass flag to indicate if loop is entered at top to gen_doloop_end. * config/arm/thumb2.md

Ping: RFA: Fix OP_INOUT handling of web.c:union_match_dups

2012-10-14 Thread Joern Rennecke
2012-10-02 Joern Rennecke joern.renne...@embecosm.com * web.c (union_match_dups): Properly handle OP_INOUT match_dups. http://gcc.gnu.org/ml/gcc-patches/2012-10/msg00189.html

Ping: RFA: add lock_length attribute to break branch-shortening cycles

2012-10-14 Thread Joern Rennecke
2012-10-04 Joern Rennecke joern.renne...@embecosm.com * final.c (get_attr_length_1): Use direct recursion rather than calling get_attr_length. (get_attr_lock_length): New function. (INSN_VARIABLE_LENGTH_P): Define. (shorten_branches): Take