[patch] Reduce over-promotion of vector operations

2011-07-18 Thread Ira Rosen
Hi, This patch tries to reduce over-promotion of vector operations that could be done with narrower elements, e.g., for char a; int b, c; short d; b = (int) a; c = b << 2; d = (short) c; we currently produce six vec_unpack_lo/hi_expr statements for char->int conversion and then two vec_pack_tru

[patch] Fix PR tree-optimization/49771

2011-07-18 Thread Ira Rosen
Hi, The vectorizer performs the following alias checks for data-refs with unknown dependence: ((store_ptr_0 + store_segment_length_0) <= load_ptr_0) || (load_ptr_0 + load_segment_length_0) <= store_ptr_0)) where segment_length is data-ref's step in the loop multiplied by the loop's number of i

PATCH: fix think-o in genrecog.c

2011-07-18 Thread Sandra Loosemore
I've been experimenting with a patch that adds a new define_peephole2 for MIPS. It was blowing up with a segfault in insn-recog.c while building libstdc++, and looking at the generated code for my new pattern there was clearly a bad offset being passed to peep2_next_insn. I tracked it down to

PATCH [8/n] X32: Convert to Pmode if needed

2011-07-18 Thread H.J. Lu
Hi, This patch adds the missing Pmode check and conversion. OK for trunk? Thanks. H.J. --- 2011-07-18 H.J. Lu * config/i386/i386.c (ix86_legitimize_address): Convert to Pmode if needed. (ix86_expand_move): Likewise. (ix86_expand_call): Likewise. (ix8

PATCH [7/n] X32: Handle address output and calls patterns

2011-07-18 Thread H.J. Lu
Hi, Address in x32 is 32bit and x32 doesn't support indirec branch via memory. This patch properly handles address output and calls patterns for x32. OK for trunk? Thanks. H.J. --- 2011-07-18 H.J. Lu * config/i386/i386.c (ix86_output_addr_vec_elt): Check TARGET_LP64 instea

[google] Backport r176293 from gcc-4_6-branch to google/gcc-4_6 (issue4743049)

2011-07-18 Thread Guozhi Wei
Hi This patch back ports r176293 from gcc-4_6-branch to google/gcc-4_6 branch. BB reorder hides the optimization opportunity, so disable it for the test case. Tested with make check-gcc RUNTESTFLAGS="--target_board=arm-sim/thumb/arch=armv7-a arm.exp=pr42093.c" thanks Carrot 2011-07-19 Guozhi

Re: [pph] Output checksum for new unexpected diff (issue4768041)

2011-07-18 Thread Diego Novillo
On Mon, Jul 18, 2011 at 19:36, Gabriel Charette wrote: > 2011-07-18  Gabriel Charette   > >        * lib/dg-pph.exp (dg-pph-pos): Output actualSum on unexpected diff. >        Use native TCL functions instead of exec calls to tr and cut. OK. Diego.

Re: [pph] Fix c1builtin-integral (issue4761045)

2011-07-18 Thread Diego Novillo
On Mon, Jul 18, 2011 at 20:54, Gabriel Charette wrote: > We potentially want to store which flags were on at the pph compile time and > make sure the same flags > are on when doing the real compile (otherwise recompile the pph or some other > soltution...??) That's up to the build system. Dif

[pph] Fix c1builtin-integral (issue4761045)

2011-07-18 Thread Gabriel Charette
The issue was that we were compiling the pph with some flags and weren't doing so in the rest of the compilation (pph and non-pph), resulting in different outputs. The fact that pph would let this happen is potentially a problem and I opened a separate thread "Flags and pph..." to discuss this.

Re: [google] Backport r175894 from gcc-4_6-branch to google/gcc-4_6 (issue4752052)

2011-07-18 Thread dougkwan
LGTM http://codereview.appspot.com/4752052/

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Vladimir Makarov
On 07/18/2011 04:14 PM, Richard Henderson wrote: On 07/18/2011 12:15 PM, Georg-Johann Lay wrote: However, what you've done is try very hard to work around reload doing the Right Thing with constant spilling, namely re-generate the constant rather than spill and restore it. I cannot believe that

Re: Fix PR48542: reload register contents reuse crossing setjmp

2011-07-18 Thread Hans-Peter Nilsson
On Thu, 14 Jul 2011, Ulrich Weigand wrote: > Jeff Law wrote: > > On 06/15/11 21:46, Hans-Peter Nilsson wrote: > > > PR rtl-optimization/48542 > > > * reload.c (find_equiv_reg): Stop looking when finding a > > > setjmp-type call. > > > * reload1.c (reload_as_needed): Invalidate all reload >

Re: [pph] Expect checksums for tests marked with pph asm xdiff (issue4744043)

2011-07-18 Thread Gabriel Charette
On Mon, Jul 18, 2011 at 3:05 PM, Andreas Schwab wrote: > Gabriel Charette writes: > >> On Sat, Jul 16, 2011 at 12:59 AM, Andreas Schwab >> wrote: >>> >>> gch...@google.com (Gabriel Charette) writes: >>> >>> > +         set expectedSum [exec tr -d \} << [exec cut -f 4 -d\  << >>> > $xdiff_entry

[pph] Output checksum for new unexpected diff (issue4768041)

2011-07-18 Thread Gabriel Charette
Output the diff's sum for unexpected diffs as well (used to only output it when it had changed, but outputting it for new diffs will make it easier to generate the comment required to mark this diff as expected when needed). Also switched from using exec calls to tr/cut, now using native TCL fun

Re: [PATCH (3/7)] Widening multiply-and-accumulate pattern matching

2011-07-18 Thread Janis Johnson
On 07/14/2011 07:16 AM, Andrew Stubbs wrote: > { dg-options "-O2 -march=armv7-a" } The tests use "{ dg-options "-O2 -march=armv7-a" }" but -march will be overridden for multilibs that specify -march, and might conflict with other multilib options. If you really need that particular -march value t

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread H.J. Lu
On Mon, Jul 18, 2011 at 1:42 PM, H.J. Lu wrote: > On Mon, Jul 18, 2011 at 1:33 PM, Uros Bizjak wrote: >> On Mon, Jul 18, 2011 at 10:25 PM, H.J. Lu wrote: >> >>> TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address >>> in x32 mode.  OK for trunk? >> >> Do you p

Re: [trans-mem] Beginning of refactoring

2011-07-18 Thread Torvald Riegel
On Tue, 2011-07-19 at 01:19 +0200, Torvald Riegel wrote: > On Sat, 2011-07-09 at 16:30 +0200, Torvald Riegel wrote: > > The attached patch makes flat nesting the default, while still > > supporting closed nesting on demand (for user-controlled aborts via > > __transaction_cancel). > > Previously, a

Re: [trans-mem] Beginning of refactoring

2011-07-18 Thread Torvald Riegel
On Sat, 2011-07-09 at 16:30 +0200, Torvald Riegel wrote: > The attached patch makes flat nesting the default, while still > supporting closed nesting on demand (for user-controlled aborts via > __transaction_cancel). > Previously, a new transaction object was created for each nested > transaction.

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/19/2011 12:33 AM, Sebastian Pop wrote: On Mon, Jul 18, 2011 at 16:40, Tobias Grosser wrote: You are right. In case we want to downcast b we would also need to prove that b itself fits into the smaller type. (This may happen, if the larger type was introduced earlier to remove casts, but i

Re: Fix PR48542: reload register contents reuse crossing setjmp

2011-07-18 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/14/11 10:16, Ulrich Weigand wrote: > Jeff Law wrote: >> On 06/15/11 21:46, Hans-Peter Nilsson wrote: >>> PR rtl-optimization/48542 >>> * reload.c (find_equiv_reg): Stop looking when finding a >>> setjmp-type call. >>> * reload1.c

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Mon, Jul 18, 2011 at 16:40, Tobias Grosser wrote: > You are right. In case we want to downcast b we would also need to prove > that b itself fits into the smaller type. (This may happen, if the larger > type was introduced earlier to remove casts, but is not needed to store the > result). [...

Re: [pph] Expect checksums for tests marked with pph asm xdiff (issue4744043)

2011-07-18 Thread Andreas Schwab
Gabriel Charette writes: > On Sat, Jul 16, 2011 at 12:59 AM, Andreas Schwab > wrote: >> >> gch...@google.com (Gabriel Charette) writes: >> >> > +         set expectedSum [exec tr -d \} << [exec cut -f 4 -d\  << >> > $xdiff_entry]] > > $xdiffentry is set to something like {{pph asm diff 123456}

[PATCH] Attempt to increase RLIMIT_STACK in the driver as well as compiler (PR c++/49756)

2011-07-18 Thread Jakub Jelinek
Hi! Especially the FEs and gimplification are highly recursive on more complex (especially badly generated) testcases, the following patch attempts to increase stack size to 64MB if possible. It is done in the driver (where it can affect the children of the driver early) and also in toplev_main t

Re: [pph] Expect checksums for tests marked with pph asm xdiff (issue4744043)

2011-07-18 Thread Gabriel Charette
On Sat, Jul 16, 2011 at 12:59 AM, Andreas Schwab wrote: > > gch...@google.com (Gabriel Charette) writes: > > > +         set expectedSum [exec tr -d \} << [exec cut -f 4 -d\  << > > $xdiff_entry]] $xdiffentry is set to something like {{pph asm diff 123456}}, so i need tr and cut to extract 12345

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/18/2011 07:07 PM, Sebastian Pop wrote: On Mon, Jul 18, 2011 at 11:11, Tobias Grosser wrote: We introduce casts when we generate code for an expression with a type smaller than the types of its constituents. So the next question is: What is the type of the expression. As far as I underst

bb-reorder maintenance [3/n]

2011-07-18 Thread Richard Henderson
The create_basic_block function will do the right thing with ordering the block label and the block note. No need for us to work hard at that within bb-reorder. r~ * bb-reorder.c (fix_crossing_conditional_branches): Emit all insns before calling create_basic_block. diff --git

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread H.J. Lu
On Mon, Jul 18, 2011 at 1:33 PM, Uros Bizjak wrote: > On Mon, Jul 18, 2011 at 10:25 PM, H.J. Lu wrote: > >> TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address >> in x32 mode.  OK for trunk? > > Do you perhaps have a testcase to help in analyzing the problem?

Re: [PATCH 1/7] Linemap infrastructure for virtual locations

2011-07-18 Thread Jason Merrill
On 07/16/2011 10:37 AM, Dodji Seketeli wrote: + /* This array of location is actually an array of pairs of + locations. The elements inside it thus look like: + + x0,y0, x1,y1, x2,y2, , xn,yn. Pairs of locations still seems limited, given the flexibility of macro expansion;

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread Uros Bizjak
On Mon, Jul 18, 2011 at 10:25 PM, H.J. Lu wrote: > TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address > in x32 mode.  OK for trunk? Do you perhaps have a testcase to help in analyzing the problem? >>> >>> See: >>> >>> http://gcc.gnu.org/bugzilla/show_b

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread H.J. Lu
On Mon, Jul 18, 2011 at 1:05 PM, Uros Bizjak wrote: > On Mon, Jul 18, 2011 at 8:48 PM, H.J. Lu wrote: > TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address in x32 mode.  OK for trunk? >>> >>> Do you perhaps have a testcase to help in analyzing the problem? >>> >> >>

Re: [Patch, Fortran] Add is_coarray() function, use it

2011-07-18 Thread Tobias Burnus
Tobias Burnus wrote: I would be happy if someone could carefully read the function in expr.c - and confirm that the second test case ("dg-error" line) is indeed invalid. I think it is invalid because one has an array element of a coarray, which is a coarray but which is not simply contiguous.

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:15 PM, Georg-Johann Lay wrote: >> However, what you've done is try very hard to work around reload >> doing the Right Thing with constant spilling, namely re-generate >> the constant rather than spill and restore it. I cannot believe >> that's the right way to proceed. > > You me

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread Uros Bizjak
On Mon, Jul 18, 2011 at 8:48 PM, H.J. Lu wrote: >>> TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address >>> in x32 mode.  OK for trunk? >> >> Do you perhaps have a testcase to help in analyzing the problem? >> > > See: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49780 I

Re: bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:09 PM, Steven Bosscher wrote: > On Mon, Jul 18, 2011 at 8:48 PM, Richard Henderson wrote: >> Split out a helper subroutine to insert a barrier, >> after we've modified a basic block to not fallthru. > > Huh, aren't barriers emitted automatically when going out of cfglayout mode??

Re: bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
On 07/18/2011 12:09 PM, Steven Bosscher wrote: > On Mon, Jul 18, 2011 at 8:48 PM, Richard Henderson wrote: >> Split out a helper subroutine to insert a barrier, >> after we've modified a basic block to not fallthru. > > Huh, aren't barriers emitted automatically when going out of cfglayout mode??

[Patch, Fortran] Add is_coarray() function, use it

2011-07-18 Thread Tobias Burnus
For the Fortran standard, quite a lot of objects are coarrays. Essentially every object which as an attr.codimension - including array sections, elements or components of it - unless the components are allocatable or pointer. Note that this excludes coindexed objects. See F2008, "2.4.7 Coarray"

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Georg-Johann Lay
Richard Henderson schrieb: On 07/18/2011 11:05 AM, Georg-Johann Lay wrote: What's bad with pre-reload splits? The only weak point is in target-independent code because there is nothing like split1_completed and other missing information for better pass-awareness. Nothing's wrong with pre-relo

Re: bb-reorder maintenance [2/n]

2011-07-18 Thread Steven Bosscher
On Mon, Jul 18, 2011 at 8:48 PM, Richard Henderson wrote: > Split out a helper subroutine to insert a barrier, > after we've modified a basic block to not fallthru. Huh, aren't barriers emitted automatically when going out of cfglayout mode?? Ciao! Steven

bb-reorder maintenance [2/n]

2011-07-18 Thread Richard Henderson
Split out a helper subroutine to insert a barrier, after we've modified a basic block to not fallthru. Tested on x86_64-linux and committed. r~ * bb-reorder.c (emit_barrier_after_bb): Split out of ... (add_labels_and_missing_jumps): ... here. (fix_up_fall_thru_edges, fix_

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread H.J. Lu
On Mon, Jul 18, 2011 at 11:44 AM, Uros Bizjak wrote: > On Mon, Jul 18, 2011 at 8:39 PM, H.J. Lu wrote: > >> TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address >> in x32 mode.  OK for trunk? > > Do you perhaps have a testcase to help in analyzing the problem? > See: http://

Re: PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread Uros Bizjak
On Mon, Jul 18, 2011 at 8:39 PM, H.J. Lu wrote: > TARGET_MEM_REF only works on ptr_mode.   This patch allows 32bit address > in x32 mode.  OK for trunk? Do you perhaps have a testcase to help in analyzing the problem? Uros.

PATCH [6/n] X32: Supprot 32bit address

2011-07-18 Thread H.J. Lu
Hi, TARGET_MEM_REF only works on ptr_mode. This patch allows 32bit address in x32 mode. OK for trunk? Thanks. H.J. --- 2011-07-18 H.J. Lu * config/i386/i386.c (ix86_legitimate_address_p): Support 32bit address in x32 mode. diff --git a/gcc/config/i386/i386.c b/gcc/config

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 11:05 AM, Georg-Johann Lay wrote: > What's bad with pre-reload splits? > The only weak point is in target-independent code because there > is nothing like split1_completed and other missing information > for better pass-awareness. Nothing's wrong with pre-reload splits. However, wha

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Georg-Johann Lay
Richard Henderson wrote: > On 07/18/2011 08:41 AM, Georg-Johann Lay wrote: >> +(define_insn_and_split "*muluqihi3.uconst" >> + [(set (match_operand:HI 0 "register_operand" "=r") >> +(mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand" >> "r")) >> +

[pph] External symbol references (1/n) (issue4760050)

2011-07-18 Thread Diego Novillo
I have started working on supporting external symbol references from one PPH file into another. I don't yet have anything working, but I will definitely not be using the decl referencing used by LTO, so this patch cleans up the interfaces not to use it. No functional changes since we were not us

[PATCH, i386]: FixPR47744; [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403 [was: Re: PATCH [5/n] X32: Supprot 32bit address]

2011-07-18 Thread Uros Bizjak
Hello! This alternative patch fixes the problem in ix86_decompose_address, uncovered by x32 branch. Since x32 branch generates lots of SImode subreg of DImode values to handle Pmode vs. ptr_mode restrictions, a latent bug in x86_decompose_address allowed addresses in the (invalid, see SImode subre

Re: [PATCH] Canonicalize compares in combine [3/3] ARM backend part

2011-07-18 Thread Richard Earnshaw
On 18/07/11 14:10, Chung-Lin Tang wrote: > On 2011/7/18 04:46 PM, Richard Earnshaw wrote: >> The patch to arm.c is ok, but the change to the test is not as it will cause >> problems with multilib testing. A better fix is to skip the test if the >> target is thumb1. >> >> The other test needs a s

[PATCH] Fix fold_nonarray_ctor_reference (PR tree-optimization/49768)

2011-07-18 Thread Jakub Jelinek
Hi! As the testcase below shows, fold_nonarray_ctor_reference doesn't have a correct check whether a field might overlap with the given offset, size access (in this case a BIT_FIELD_REF). The bitfield ref wants to read 8 bits starting at offset 0, the bitfield defined there goes from bit 1 1 bit

Re: [PATCH] Register 3 builtins needed for -finstrument-functions in generic code (PR middle-end/49675)

2011-07-18 Thread Richard Henderson
On 07/18/2011 10:44 AM, Jakub Jelinek wrote: > PR middle-end/49675 > * tree.c (build_common_builtin_nodes): Register > __builtin_return_address, __cyg_profile_func_enter > and __cyg_profile_func_exit. > > * gfortran.dg/pr49675.f90: New test. Ok. r~

[x32] PATCH: Revert 32bit address changes in x32 mode

2011-07-18 Thread H.J. Lu
Hi, I am checking the following patches to revert 32bit address changes in x32 mode. H.J. commit 2087dd1362a4c2095a03ea92a06a9b67ab516a02 Author: H.J. Lu Date: Sun Jul 17 16:16:16 2011 -0700 Remove ix86_simplify_base_index_disp. diff --git a/gcc/ChangeLog.addr32 b/gcc/ChangeLog.addr32 n

Re: [Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Richard Henderson
On 07/18/2011 08:41 AM, Georg-Johann Lay wrote: > +(define_insn_and_split "*muluqihi3.uconst" > + [(set (match_operand:HI 0 "register_operand" "=r") > +(mult:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r")) > + (match_operand:HI 2 "u8_

[PATCH] Register 3 builtins needed for -finstrument-functions in generic code (PR middle-end/49675)

2011-07-18 Thread Jakub Jelinek
Hi! -finstrument-functions with any function written in Fortran, Go (and presumably also Java and Ada, haven't tried) fails because non-C/C++ FEs don't register __builtin_return_address (), __cyg_profile_func_enter () and __cyg_profile_func_exit () builtins. This worked until 4.5 because gimplific

Re: CFT: Move unwinder to toplevel libgcc

2011-07-18 Thread Steve Ellcey
On Mon, 2011-07-18 at 13:31 +0200, Rainer Orth wrote: > Steve, > I had a fresh look and it seems this isn't as bad as it might have been: > the only SHLIB_ macros used are SHLIB_(DIR|OBJS|SOLINK|SLIBDIR_QUAL), > which are all present in libgcc/config/t-slibgcc and are substituted by > configure.

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Mon, Jul 18, 2011 at 11:11, Tobias Grosser wrote: >> We introduce casts when we generate code for an expression with a type >> smaller than the types of its constituents. > > So the next question is: What is the type of the expression. As far as I > understand we decide ourselves which type the

Re: New automaton_option "collapse-ndfa"

2011-07-18 Thread Vladimir Makarov
On 07/18/2011 11:27 AM, Bernd Schmidt wrote: On 07/18/11 17:09, Vladimir Makarov wrote: On 07/11/2011 05:09 PM, Bernd Schmidt wrote: I came up with the notion of adding a new transition to the NDFA, one which collapses a nondeterministic state (which is composed of multiple possible determinist

[pph] Do not emit the same decl more than once in the symbol table (issue4758052)

2011-07-18 Thread Diego Novillo
A small tweak to avoid inserting the same decl more than once in the symbol table for a pph image. Tested on x86_64. Committed to branch. Diego. * pph-streamer-in.c (pph_in_struct_function): Revert previous change. Do not allow shared struct functions. * pph-streamer-

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-18 Thread Richard Henderson
On 07/15/2011 06:56 AM, Rainer Orth wrote: > 2011-07-14 Rainer Orth > > gcc: > * config.gcc (alpha*-*-linux*): Add crtfastmath.o to extra_parts. > (alpha*-*-freebsd*): Likewise. > (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu, > i[34567]86-*-knetbsd*-gnu, i[3456

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-18 Thread Steve Ellcey
On Mon, 2011-07-18 at 13:16 +0200, Rainer Orth wrote: > Unfortunately, nobody reviewed the patch. There's now also PR > bootstrap/49769 for Linux/SPARC. > Rainer I tested the patch on IA64 Linux and verified that it fixed that bootstrap. I can approve the IA64 part of the patch. Perhap

Re: [v3] add

2011-07-18 Thread Jonathan Wakely
On 9 July 2011 14:46, Jonathan Wakely wrote: > This adds the new header. Currently only > std::vector has the necessary support for C++0x allocators to be > usable with std::scoped_allocator_adaptor. > >        * include/Makefile.am: Add new header. >        * include/Makefile.in: Regenerate. >  

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/18/2011 05:03 PM, Sebastian Pop wrote: On Sun, Jul 17, 2011 at 19:41, Tobias Grosser wrote: Accessing a[100] is undefined in C, so i<100, and so n<= 100. Sure. I am just surprised we already include this information in graphite. Do we add this to the context? Yes, that's added to

[v3] libstdc++/48430

2011-07-18 Thread Paolo Carlini
Hi, committed to mainline. Paolo. // 2011-07-18 Paolo Carlini PR libstdc++/48430 * include/bits/shared_ptr.h (struct hash>): Use __hash_base. * include/bits/unique_ptr.h (struct hash>): Likewise. Index: include/bits/shared_ptr.h ==

[Patch,AVR]: Fix PR36467, PR49687 (better widening mul)

2011-07-18 Thread Georg-Johann Lay
This patch improves 16=8*8 and 16*16*8 multiplication. mulhi3 is extended to care for small, signed 9-bit constants that can be handled more efficiently than loading the constants and performing a 16-bit multiplication. Some combine patterns are added to match if one operand is a small constant w

Re: New automaton_option "collapse-ndfa"

2011-07-18 Thread Bernd Schmidt
On 07/18/11 17:09, Vladimir Makarov wrote: > On 07/11/2011 05:09 PM, Bernd Schmidt wrote: >> I came up with the notion of adding a new transition to the NDFA, one >> which collapses a nondeterministic state (which is composed of multiple >> possible deterministic ones) to just one of its component

Re: New automaton_option "collapse-ndfa"

2011-07-18 Thread Vladimir Makarov
On 07/11/2011 05:09 PM, Bernd Schmidt wrote: On C6X, we want to use the "ndfa" option to give the scheduler maximum freedom when assigning units to instructions. After scheduling is complete, we process the insns again in c6x_reorg, looking at each cycle and assigning a unit specifier to each ins

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Sun, Jul 17, 2011 at 19:41, Tobias Grosser wrote: >> Accessing a[100] is undefined in C, so i<  100, and so n<= 100. > > Sure. I am just surprised we already include this information in graphite. > Do we add this to the context? Yes, that's added to the context as a bound on the loop iteration

Re: [PATCH (8/7)] Fix a bug in multiply-and-accumulate

2011-07-18 Thread Richard Guenther
On Mon, Jul 18, 2011 at 3:14 PM, Andrew Stubbs wrote: > As far as I can tell, the patch series so far works great as long as the > input type of the accumulate value is the same as the output type. > Unfortunately you get an ICE otherwise doh! > > This patch should fix the problem. > > I coul

Re: [RFC] More compact (100x) -g3 .debug_macinfo

2011-07-18 Thread Tom Tromey
> "Jakub" == Jakub Jelinek writes: Tom> I don't think I really understood DW_MACINFO_GNU_define_opcode, so the Tom> implementation here is probably wrong. Jakub> Well, I think you've skipped it correctly and furthermore even patched Jakub> GCC doesn't emit it. The point of it was to allow s

Re: [PLUGIN] compile and install gengtype, install gtype.state

2011-07-18 Thread Basile Starynkevitch
On Mon, Jul 18, 2011 at 04:29:29PM +0200, Romain Geissler wrote: > Hi, > > This patch allows a third party plugin to define new GTY-ed types > by compiling and installing gengtype for host and installing gtype.state > in plugin_includedir. > > Builds and installs fine on a x86_64 red hat. I am

Re: [RFC] More compact (100x) -g3 .debug_macinfo (take 3)

2011-07-18 Thread Tom Tromey
> "Jakub" == Jakub Jelinek writes: Jakub> Ok, so how about this way (as DWARF4 modifications, of course for Jakub> DWARF5 proposal GNU_ would be gone and the ops would have different Jakub> codes): Thanks very much for writing it up this way. I think it is very important that all our DWARF

[build, 4.5] Link libgcjgc with -lrt on Solaris > 8 (PR boehm-gc/49381)

2011-07-18 Thread Rainer Orth
The 4.5 branch lacked the fix from [build] Link libgcjgc with -lrt on Solaris > 8 http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02288.html Since this issue has now been reported as PR boehm-gc/49381, I've backported the fix to the 4.5 branch after reconfiguring and successfully bui

[PATCH] Rewrite TRUTH_NOT_EXPR as BIT_{NOT,XOR}_EXPR

2011-07-18 Thread Richard Guenther
This rewrites TRUTH_NOT_EXPRs during gimplification as BIT_NOT_EXPR respective BIT_XOR_EXPR as RTL expansion does. This completes the series lowering the TRUTH_*_EXPRs to operations that are also available on HW and allows us to unify code handling TRUTH_*_EXPRs and BIT_*_EXPRs. The patch has se

[PLUGIN] compile and install gengtype, install gtype.state

2011-07-18 Thread Romain Geissler
Hi, This patch allows a third party plugin to define new GTY-ed types by compiling and installing gengtype for host and installing gtype.state in plugin_includedir. Builds and installs fine on a x86_64 red hat. Ok for the trunk ? Romain Geissler gcc/ 2011-07-18 Romain Geissler * g

[PATCH] Properly use input_location in gimplify-expr

2011-07-18 Thread Richard Guenther
Recent boolifications have introduced exprs with saved_location, that's bogus. Committed as obvious. Richard. 2011-07-18 Richard Guenther * gimplify.c (gimplify_expr): Use input_location, not saved_location when building new trees. Index: gcc/gimplify.c

Re: [Patch, Fortran] Mark "token" of static coarrays "restrict"

2011-07-18 Thread Mikael Morin
On Thursday 14 July 2011 11:01:29 Tobias Burnus wrote: > As the title says: Mark "token" of static coarrays "restrict" > > Bootstrapped and regtested on x86-64-linux. > OK for the trunk? > > Tobias OK. (and obvious) Mikael

*ping * Re: [Patch, Fortran] Mark "token" of static coarrays "restrict"

2011-07-18 Thread Tobias Burnus
*ping* http://gcc.gnu.org/ml/fortran/2011-07/msg00142.html On 07/14/2011 11:01 AM, Tobias Burnus wrote: As the title says: Mark "token" of static coarrays "restrict" Bootstrapped and regtested on x86-64-linux. OK for the trunk? Tobias

[PATCH (8/7)] Fix a bug in multiply-and-accumulate

2011-07-18 Thread Andrew Stubbs
As far as I can tell, the patch series so far works great as long as the input type of the accumulate value is the same as the output type. Unfortunately you get an ICE otherwise doh! This patch should fix the problem. I could have inserted this fix into the correct spot in the existing

Re: [PATCH] Canonicalize compares in combine [3/3] ARM backend part

2011-07-18 Thread Chung-Lin Tang
On 2011/7/18 04:46 PM, Richard Earnshaw wrote: > The patch to arm.c is ok, but the change to the test is not as it will cause > problems with multilib testing. A better fix is to skip the test if the > target is thumb1. > > The other test needs a similar check as it seems to expect a movs instr

Unreviewed libgcc patches

2011-07-18 Thread Rainer Orth
The following two libgcc patches have seen almost no comments, and certainly neither testing or review in a week: CFT: [build] Move fp-bit support to toplevel libgcc http://gcc.gnu.org/ml/gcc-patches/2011-07/msg00927.html CFT: [build] Move soft-fp support to toplevel libgc

Re: [PR43597, ARM, TESTCASE]

2011-07-18 Thread Richard Earnshaw
On 18/07/11 12:09, Tom de Vries wrote: > Hi, > > PR43597 was fixed by http://gcc.gnu.org/viewcvs?view=revision&revision=172032. > > This patch adds a testcase. > > OK for trunk? > > Thanks, > - Tom > > 2011-07-18 Tom de Vries > > PR target/43597 > * gcc.target/arm/pr43597.c: New te

Re: [testsuite] Don't explicitly link libgomp tests with -lgomp (PR target/49541)

2011-07-18 Thread Rainer Orth
Jakub Jelinek writes: > On Mon, Jul 18, 2011 at 01:53:40PM +0200, Rainer Orth wrote: >> As described in the PR, the fact that the libgomp testsuite always links >> with -lgomp, even with -fno-openmp, causes testsuite failures on targets >> (like Solaris) that need special options when linking lib

[PATCH] Fix BIT_NOT_EXPR expansion with bitfields

2011-07-18 Thread Richard Guenther
on x86_64-unknown-linux-gnu. Richard. 2011-07-18 Richard Guenther * expr.c (expand_expr_real_2): Properly truncate the BIT_NOT_EXPR expansion result to bitfield precision if required. * gcc.dg/torture/20110718-1.c: New testcase. Index: gcc/expr.c

Re: [C++0x] contiguous bitfields race implementation

2011-07-18 Thread Aldy Hernandez
On 05/27/11 14:18, Jason Merrill wrote: On 05/26/2011 02:37 PM, Aldy Hernandez wrote: The narrowest integer mode containing the bit field is still 32, so we access the bitfield with an SI instruction as expected. OK, then: struct A { int i: 4; int j: 4; int k: 8; int l: 8; int m: 8; }; now t

Re: [testsuite] Don't explicitly link libgomp tests with -lgomp (PR target/49541)

2011-07-18 Thread Jakub Jelinek
On Mon, Jul 18, 2011 at 01:53:40PM +0200, Rainer Orth wrote: > As described in the PR, the fact that the libgomp testsuite always links > with -lgomp, even with -fno-openmp, causes testsuite failures on targets > (like Solaris) that need special options when linking libgomp. With > -fgomp, this is

[testsuite] Don't explicitly link libgomp tests with -lgomp (PR target/49541)

2011-07-18 Thread Rainer Orth
As described in the PR, the fact that the libgomp testsuite always links with -lgomp, even with -fno-openmp, causes testsuite failures on targets (like Solaris) that need special options when linking libgomp. With -fgomp, this is taken care of by the relevant specs (like adding -pthread), but not

Re: CFT: Move unwinder to toplevel libgcc

2011-07-18 Thread Rainer Orth
Steve, >> It looks like a prefix is missing somewhere since it is trying to access >> /libunwind.so. This >> may be something messed up in my build area again but I did run autoconf in >> libgcc so I am >> not sure what is going on. I'll dig around some more but I thought I would >> see if th

Re: Three new additional global reviewers

2011-07-18 Thread Jakub Jelinek
On Mon, Jul 18, 2011 at 12:51:34AM +0200, Gerald Pfeifer wrote: > I am happy to announce that the steering committee is appointing our > three release managers Jakub Jelinek, Joseph S. Myers, and Richard > Guenther to the additional roles of global reviewers. Thanks. > PS: I assume you guys know

Re: [PATCH] Move pr49309.C testcase to libmudflap (PR testsuite/49753)

2011-07-18 Thread Rainer Orth
Jakub Jelinek writes: >> There's a far simpler fix, inspired by gcc.dg/dfp/pr35739.c. I think it >> is better since it gives the testcase wider coverage. Tested with the >> appropriate runtest invocation on i386-pc-solaris2.11 and >> alpha-dec-osf5.1b. > > libmudflap testsuite also iterates ove

Re: [build] Move crtfastmath to toplevel libgcc

2011-07-18 Thread Rainer Orth
Rainer Orth writes: > I think the following patch should fix all broken targets. For those > that previously had crtfastmath.o in EXTRA_PARTS, I'm adding it to > config.gcc (extra_parts) explicitly. > > The non-Linux x86 glibc targets were missed before. I move the > extra_parts addition down s

Re: [PATCH] Move pr49309.C testcase to libmudflap (PR testsuite/49753)

2011-07-18 Thread Jakub Jelinek
On Mon, Jul 18, 2011 at 12:22:01PM +0200, Rainer Orth wrote: > >> The problem here is that the type of the POINTER_PLUS_EXPR is > >> incorrect and also the non folded version leaks to the IR. This patch > >> fixes those two problems and fixes the ICE. > >> > >> OK? Bootstrapped and tested on x8

[PR43597, ARM, TESTCASE]

2011-07-18 Thread Tom de Vries
Hi, PR43597 was fixed by http://gcc.gnu.org/viewcvs?view=revision&revision=172032. This patch adds a testcase. OK for trunk? Thanks, - Tom 2011-07-18 Tom de Vries PR target/43597 * gcc.target/arm/pr43597.c: New test. Index: gcc.target/arm/pr43597.c ==

Re: Use of vector instructions in memmov/memset expanding

2011-07-18 Thread Michael Zolotukhin
Here is a summary - probably, it doesn't cover every single piece in the patch, but I tried to describe the major changes. I hope this will help you a bit - and of course I'll answer your further questions if they appear. The changes could be logically divided into two parts (though, these parts h

Re: [patch] Fix gcc.dg/vect/pr49038.c (was Re: [patch] Fix PR tree-optimization/49038)

2011-07-18 Thread Rainer Orth
Ira Rosen writes: >> This test fails on spu-elf, and presumably all other targets that >> don't have mmap (or ) ... >> >> Can the test be restricted to those targets that actually support >> that OS feature? > > I copied the list of targets from gcc.dg/20050826-1.c. Sorry, but this is a bad idea

Re: [PATCH] Move pr49309.C testcase to libmudflap (PR testsuite/49753)

2011-07-18 Thread Rainer Orth
Jakub Jelinek writes: > On Wed, Jul 13, 2011 at 01:37:22PM -0700, Andrew Pinski wrote: >> Hi, >> The problem here is that the type of the POINTER_PLUS_EXPR is >> incorrect and also the non folded version leaks to the IR. This patch >> fixes those two problems and fixes the ICE. >> >> OK? Boot

Re: [5/5] Don't use rtxes in mem_attrs

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 4:34 PM, Richard Sandiford wrote: > This patch replaces the rtxes in mem_attrs with (bool, HOST_WIDE_INT) pairs. > There's already room for the bools in the padding after "addrspace". > (There's room for one more bool after this patch; we could move to > bitfields if more a

Re: [4/5] MEM_OFFSET and MEM_OFFSET_KNOWN_P

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 4:32 PM, Richard Sandiford wrote: > This patch makes the mechanical MEM_OFFSET interface change, > along the same lines as the MEM_SIZE one. Ok if there are no objections from target maintainers. Thanks, Richard. > Richard > > > gcc/ >        * doc/rtl.texi (MEM_OFFSET_K

Re: [3/5] MEM_SIZE and MEM_SIZE_KNOWN_P

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 4:31 PM, Richard Sandiford wrote: > This patch does the mechanical MEM_SIZE interface change.  It also > makes set_mem_size take a HOST_WIDE_INT, and adds clear_mem_size > for resetting the size to "unknown". > > The i386.c part includes an obvious pasto fix for: > >  if (d

Re: [2/5] Add a set_mem_attrs function

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 4:29 PM, Richard Sandiford wrote: > Internally, emit-rtl.c uses the idiom: > >  MEM_ATTRS (mem) = get_mem_attrs (MEM_ALIAS_SET (mem), MEM_EXPR (mem), >                                   MEM_OFFSET (mem), size, MEM_ALIGN (mem), >                                   MEM_ADDR_SP

Re: [1/5] Add a mode_mem_attrs array

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 4:18 PM, Richard Sandiford wrote: > This patch adds an array, mode_mem_attrs, that gives the default attributes > for a given mode.  The defaults depend on STRICT_ALIGNMENT, which on rs6000 > and v850 depends on command-line flags, and which could therefore in > principle b

Re: [patch] Fix gcc.dg/vect/pr49038.c (was Re: [patch] Fix PR tree-optimization/49038)

2011-07-18 Thread Richard Guenther
On Sun, Jul 17, 2011 at 7:57 AM, Ira Rosen wrote: > On 15 July 2011 15:56, Ulrich Weigand wrote: >> Ira Rosen wrote: >> >>>       * gcc.dg/vect/pr49038.c: New test. >> >>> Index: testsuite/gcc.dg/vect/pr49038.c >>> === >>> --- testsu

Re: [PATCH] Canonicalize compares in combine [3/3] ARM backend part

2011-07-18 Thread Richard Earnshaw
On 18 Jul 2011, at 07:15, "Chung-Lin Tang" wrote: > On 2011/6/15 09:12 PM, Richard Earnshaw wrote: >> On 22/04/11 16:21, Chung-Lin Tang wrote: >>> Hi Richard, this part's for you. >>> >>> The ARM backend changes needed are very little after the prior patches, >>> basically just a case in arm_can

  1   2   >