RFA: Fix PR middle-end/50074

2011-11-25 Thread Joern Rennecke
On load-store architectures, the function address is generally loaded into a register before any outgoing arguments are stored in the stack frame (if any). Thus, generally allowing memory loads before any arguments of the sibcall have been stored in the stack frame is effective to make the sibcal

Re: Memset/memcpy patch

2011-11-25 Thread Jan Hubicka
> On Wed, Nov 23, 2011 at 3:32 PM, Michael Zolotukhin > wrote: > > I found and fixed another problem in the latest memcpy/memest changes > > - with this fix all the failing tests mentioned in #51134 started > > passing. Bootstraps are also ok. > > Though I still see fails in 32-bit make check, so

Re: [Patch, fortran, RFC] PR 40958 Reduce size of module files

2011-11-25 Thread Mikael Morin
On Friday 25 November 2011 11:10:01 Janne Blomqvist wrote: > Based on a brief inspection of the code, most if > not all of these seeks are for a very short distance (typically peek a > few bytes ahead in the stream, then seek back) I'm afraid they aren't. The moves are as follows (-: sequential, x:

[PATCH] Improve EXPAND_SUM handling in expand_expr_addr_expr* (PR middle-end/50074)

2011-11-25 Thread Jakub Jelinek
Hi! While looking at this PR, I was first surprised that on i?86 we got pseudo = argp + 4 and mem_overlap* was called with that pseudo + 4 etc. I don't see why we should force the address into register for EXPAND_SUM modifier, with this mem_overlap* sees argp + 8 etc. directly (on i?86, of course

Re: [PATCH, testsuite]: Enable sync_long_long on 32bit x86 and alpha

2011-11-25 Thread Uros Bizjak
On Fri, Nov 25, 2011 at 8:31 PM, Uros Bizjak wrote: > I didn't check SSE, but it looks that fild/fistpl combo isn't atomic > or does not obey "lock" barriers. Adding -msse to failing test works OK. Uros.

[PATCH, testsuite]: Enable sync_long_long on 32bit x86 and alpha

2011-11-25 Thread Uros Bizjak
Hello! Attached patch enables sync_long_long tests on 32bit x86 and alpha. Enabling the tests for alpha is obvious (it is 64bit-by-default target, after all), but 32bit x86 needs at least -march=pentium passed via dg-options. My previous patch checks bit_CMPXCHG8B cpuid bit before compiling these

Re: Go patch committed: New lock/note implementation

2011-11-25 Thread Rainer Orth
Rainer Orth writes: > This broke bootstrap on Linux/x86_64 (CentOS 5.5), which lacks > O_CLOEXEC. ... and also Solaris 8 and 9 bootstrap which lack sem_timedwait: /vol/gcc/src/hg/trunk/local/libgo/runtime/thread-sema.c: In function 'runtime_semasleep': /vol/gcc/src/hg/trunk/local/libgo/runtime

[PATCH] Make sibcall argument overlap check less pessimistic (PR middle-end/50074)

2011-11-25 Thread Jakub Jelinek
Hi! Kirill's recent change to mem_overlaps_already_clobbered_arg_p resulted in various code quality regressions, many calls that used to be tail call optimized no longer are. Here is an attempt to make the check more complete (e.g. the change wouldn't see overlap if addr was PLUS of two REGs, whe

[PATCH] Ignore EDGE_PRESERVE in flow info verification (PR rtl-optimization/49912)

2011-11-25 Thread Jakub Jelinek
Hi! The following testcase ICEs during flow verification, because there is an unconditional branch with EDGE_PRESERVE set on the edge and because of that bit rtl_verify_flow_info_1 wouldn't count it as n_branch. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2

[PATCH, testsuite]: Introduce sync_int128_runtime and sync_long_long_runtime

2011-11-25 Thread Uros Bizjak
Hello! Attached patch introduces sync_int128_runtime and sync_long_long_runtime runtime check to prevent running atomic runtime tests on targets that don't support them. I also merged runtime check for arm*-*-linux-gnueabi with corresponding arm*-*-* compile-time check. This change has a nice side

Re: Go patch committed: New lock/note implementation

2011-11-25 Thread Rainer Orth
Ian Lance Taylor writes: > This patch updates the implementations of locks and notes used in libgo > to use the current version from the master Go library. This now uses > futexes when running on GNU/Linux, while still using semaphores on other > systems. This implementation should be faster, a

Re: [Patch, Fortran] PR 50408 [4.6/4.7] ICE related to whole-file processing

2011-11-25 Thread Steve Kargl
On Fri, Nov 25, 2011 at 11:46:37AM +0100, Tobias Burnus wrote: > The patch fixes an issue when the backend_decl is reused (-fwhole-file). > The problem is that not always the ts.u.derived->backend_decl was copied > as well. I copied what was done a bit later in the file and extended it > to also

[Patch, Fortran, committed] PR51302 - fix ICE with volatile loop variable

2011-11-25 Thread Tobias Burnus
Fixed the ICE: internal compiler error: in gfc_add_modify_loc, at fortran/trans.c:161 Build, regtested and committed (Rev. 181724 ) on x86-64-linux. Tobias Index: gcc/fortran/ChangeLog === --- gcc/fortran/ChangeLog (revision 181723)

Added myself to MAINTAINERS: write after approval

2011-11-25 Thread Sameera Deshpande
Committed. -- Index: MAINTAINERS === --- MAINTAINERS (revision 181721) +++ MAINTAINERS (working copy) @@ -345,6 +345,7 @@ David Daney david.da...@caviumnetworks.com Bud Davis jmda...@link.com Chris Demetriou c...@google

Re: Keep static VTA locs in cselib tables only

2011-11-25 Thread Jakub Jelinek
On Wed, Nov 23, 2011 at 08:10:00AM -0200, Alexandre Oliva wrote: > - compiling stage2 target libs and stage3 host patched sources (with > both unpatched and patched stage2 compiler) produced cc1plus with 10% > fewer entry value expressions (a welcome surprise!), 1% fewer call site > value expressio

Fix doloop bug with maximum-length loops

2011-11-25 Thread Joseph S. Myers
This patch fixes a bug in the RTL doloop pass that showed as timeouts of gcc.c-torture/execute/961017-1.c execution on slow targets because a 256-iteration loop was replaced with a 2^32-iteration loop (if the test did not time out, it would still pass as it didn't contain any checks on the number o

Re: [PATCH] Remove dead labels to increase superblock scope

2011-11-25 Thread Tom de Vries
On 25/11/11 14:05, Steven Bosscher wrote: > On Fri, Nov 25, 2011 at 2:03 PM, Michael Matz wrote: >> Hi, >> >> On Fri, 25 Nov 2011, Tom de Vries wrote: >> Note that you actually can remove labels also if they are !can_delete_label_p, if you use delete_insn (which you do). It will re

Re: [Patch,AVR]: Clean up SFR offset usage: %i for CONST_INT

2011-11-25 Thread Denis Chertykov
2011/11/25 Georg-Johann Lay > > Georg-Johann Lay wrote: > > Denis Chertykov wrote: > >> 2011/11/20 Georg-Johann Lay <.>: > >>> Subtracting 0x20 to get the SFR address from a RAM address is scattered > >>> all > >>> over the backend.  The patch makes - PRINT_OPERAND_PUNCT_VALID_P and uses > >

Re: [PATCH] Remove dead labels to increase superblock scope

2011-11-25 Thread Steven Bosscher
On Fri, Nov 25, 2011 at 2:03 PM, Michael Matz wrote: > Hi, > > On Fri, 25 Nov 2011, Tom de Vries wrote: > >> > Note that you actually can remove labels also if they are >> > !can_delete_label_p, if you use delete_insn (which you do).  It will >> > replace such undeletable labels by a DELETED_LABEL

Re: [PATCH] Remove dead labels to increase superblock scope

2011-11-25 Thread Michael Matz
Hi, On Fri, 25 Nov 2011, Tom de Vries wrote: > > Note that you actually can remove labels also if they are > > !can_delete_label_p, if you use delete_insn (which you do). It will > > replace such undeletable labels by a DELETED_LABEL note. > > I tried that as well but ran into these errors in

Re: [Patch,AVR]: Clean up SFR offset usage: %i for CONST_INT

2011-11-25 Thread Georg-Johann Lay
Georg-Johann Lay wrote: > Denis Chertykov wrote: >> 2011/11/20 Georg-Johann Lay <.>: >>> Subtracting 0x20 to get the SFR address from a RAM address is scattered all >>> over the backend. The patch makes - PRINT_OPERAND_PUNCT_VALID_P and uses >>> %- to >>> subtract the SFR offset instead of ha

[Patch, Fortran] PR 50408 [4.6/4.7] ICE related to whole-file processing

2011-11-25 Thread Tobias Burnus
The patch fixes an issue when the backend_decl is reused (-fwhole-file). The problem is that not always the ts.u.derived->backend_decl was copied as well. I copied what was done a bit later in the file and extended it to also include BT_CLASS. The trans-type.c change is not needed, but I thought

Re: [PATCH] Remove dead labels to increase superblock scope

2011-11-25 Thread Tom de Vries
On 21/11/11 17:13, Michael Matz wrote: > Hi, > > On Sat, 19 Nov 2011, Tom de Vries wrote: > >> On 11/18/2011 10:29 PM, Eric Botcazou wrote: For the test-case of PR50764, a dead label is introduced by fixup_reorder_chain in cfg_layout_finalize, called from pass_reorder_blocks. >>> >

Re: [PATCH 0/2] Add atomic support to m68k

2011-11-25 Thread Mikael Pettersson
Richard Henderson writes: > On 11/23/2011 06:46 AM, Mikael Pettersson wrote: > > +FAIL: c-c++-common/gomp/atomic-10.c scan-tree-dump-times ompexp > > "__atomic_fetch_add" 4 > > +FAIL: c-c++-common/gomp/atomic-3.c scan-tree-dump-times ompexp "xyzzy, 4" > > 1 > > +FAIL: c-c++-common/gomp/atom

Re: [PATCH SMS 2/2, RFC] Register pressure estimation for the partial schedule

2011-11-25 Thread Richard Sandiford
Hi Revital, Revital Eres writes: > The attached patch adds register pressure estimation of the partial schedule. My main comment is that we shouldn't need to track separate liveness sets for each loop here, since we're only looking at one basic block. I.e., rather than operate on the per-loop LO

[Patch, fortran, RFC] PR 40958 Reduce size of module files

2011-11-25 Thread Janne Blomqvist
Hi, gfortran has a few long-standing bugs wrt module handling. The more fundamental, and also more difficult to fix, issue is that we re-read and re-parse module files every time a USE statement is encountered, instead of once per translation unit. See PR 25708. Another issue, PR 40958, is that mo

Re: Re-merge crtstuff.c from the trans-mem branch

2011-11-25 Thread Rainer Orth
Rainer Orth writes: > While the first patch allows Solaris 8/9 x86 bootstraps to finish > (testsuite still running), I happened to run a Solaris 10/SPARC > bootstrap that broke configuring stage 2 libgomp: even trivial > executables die with a SEGV in _init. > > It turns out (still verifying with

Re: Fix libgomp semaphores

2011-11-25 Thread Alan Modra
On Fri, Nov 25, 2011 at 08:38:39AM +0100, Jakub Jelinek wrote: > My preference would be to avoid the abstraction changes though, both > because it is additional clutter in the changeset and because omp_lock > and nested lock are part of public ABIs, so if struct is layed out > differently on some w