Re: [google] remove redundant push {lr} for -mthumb (issue4441050)

2011-04-20 Thread Carrot Wei
On Tue, Apr 19, 2011 at 8:55 PM, Richard Earnshaw wrote: > > On Tue, 2011-04-19 at 17:41 +0800, Guozhi Wei wrote: >> Reload pass tries to determine the stack frame, so it needs to check the >> push/pop lr optimization opportunity. One of the criteria is if there is any >> far jump inside the funct

Re: [PATCH] make LABEL_DECL has its own rtx field for its associated CODE_LABEL

2011-04-20 Thread Richard Guenther
On Wed, Apr 20, 2011 at 12:00 AM, Nathan Froyd wrote: > On Tue, Apr 05, 2011 at 05:55:33PM +0200, Michael Matz wrote: >> I have a preference in having just one DECL_RTL field for conceptual >> reasons: >> >> Most DECLs are actually objects (there are some prominent exceptions, but >> those always

Re: [google] remove redundant push {lr} for -mthumb (issue4441050)

2011-04-20 Thread Richard Earnshaw
On Wed, 2011-04-20 at 16:26 +0800, Carrot Wei wrote: > On Tue, Apr 19, 2011 at 8:55 PM, Richard Earnshaw wrote: > > > > On Tue, 2011-04-19 at 17:41 +0800, Guozhi Wei wrote: > >> Reload pass tries to determine the stack frame, so it needs to check the > >> push/pop lr optimization opportunity. One

Re: Allow union variables to share stack slots wwith -fno-strict-aliasing (issue4444051)

2011-04-20 Thread Richard Guenther
On Wed, Apr 20, 2011 at 2:42 AM, Easwaran Raman wrote: > Hi, >  This patch allows variables whose type  transitively contains a union to > share stack slots if -fno-strict-aliasing is used. > >  Bootstraps on x86_64 with no test regressions. Also tested by changing > flag_strict_aliasing to 0 by

Re: [google] remove redundant push {lr} for -mthumb (issue4441050)

2011-04-20 Thread Carrot Wei
I will try this method for trunk later. thanks Carrot On Wed, Apr 20, 2011 at 4:48 PM, Richard Earnshaw wrote: > > On Wed, 2011-04-20 at 16:26 +0800, Carrot Wei wrote: >> On Tue, Apr 19, 2011 at 8:55 PM, Richard Earnshaw wrote: >> > >> > On Tue, 2011-04-19 at 17:41 +0800, Guozhi Wei wrote: >> >

Re: Allow union variables to share stack slots wwith -fno-strict-aliasing (issue4444051)

2011-04-20 Thread Eric Botcazou
> 2011-04-19 Easwaran Raman > > * gcc/testsuite/gcc.dg/stack-layout-1.c: New > * gcc/cfgexpand.c (add_alias_set_conflicts): Add conflicts > with a variable containing union type only with > -fstrict-aliasing. You need an entry for each relevant ChangeLog, without prefixe

Remove obsolete requirement

2011-04-20 Thread Eric Botcazou
LTO is a boot language these days. LTO bootstrapped on x86_64-suse-linux, applied on the mainline and 4.6 branch as obvious. 2011-04-20 Eric Botcazou * bootstrap-lto.mk: Remove obsolete requirement. -- Eric Botcazou Index: bootstrap-lto.mk

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/17 Denis Chertykov : >> 2011/4/15 Georg-Johann Lay : >>> Finally, I exposed alternative #3 of the insns to the register >>> allocator, because it is not possible to distinguish between >>> overlapping or non-overlapping regs, and #3 does not need a scratch. >>> >>>

[libgo] Improve IRIX 6.5 support (PR go/47515)

2011-04-20 Thread Rainer Orth
There are still a couple of open issues with libgo on IRIX 6.5. This patch fixes some of them. * As documented in the autoconf manual, some versions of sed and grep cannot handle \? and/or \(, \). The Solaris 8 tools are among them, so this patch avoids those constructs. * test $mips_abi !=

Re: [patch, committed] PR48602 Fix optimization issue

2011-04-20 Thread Janne Blomqvist
On Wed, Apr 20, 2011 at 07:31, Jerry DeLisle wrote: >    Use asm volatile to mark temp variable, avoiding optimization errors. I wonder, would it make sense to compile the entire IO library with -fexcess-precision=standard in order to avoid further similar issues? This would keep the code free fr

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Denis Chertykov
2011/4/20 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/4/17 Denis Chertykov : >>> 2011/4/15 Georg-Johann Lay : Finally, I exposed alternative #3 of the insns to the register allocator, because it is not possible to distinguish between overlapping or non-overlapping regs, and

[RFT][patch] Fix PR testsuite/48498

2011-04-20 Thread Ira Rosen
Hi, In gcc.dg/vect/slp-3.c and gcc.dg/vect/no-vfa-pr29145.c vectorization is expected to fail on targets vect_no_align. But no realignment is necessary here except for having the array bases aligned. This patch removes xfail for vect_no_align (and increases a loop bound in slp-3.c to prevent comp

Re: [patch testsuite committed] Skip gcc.dg/torture/pr37868.c on sh

2011-04-20 Thread Kaz Kojima
Mike Stump wrote: > I'd pre-approve hoisting these up into the lib/.exp files and checking a > generic target requirement... :-) > >> -/* { dg-skip-if "unaligned access" { sparc*-*-* } "*" "" } */ >> +/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* } "*" "" } */ I've thought the same t

[PATCH][ARM] Remove redundant code in arm.c

2011-04-20 Thread Andrew Stubbs
This patch removes some redundant code that caused me some confusion. It's not possible to construct a constant from multiple ORN instructions, just as it's not possible to do it with multiple AND instructions. OK? Andrew 2011-04-20 Andrew Stubbs gcc/ * config/arm/arm.c (arm_gen_consta

[PATCH] Fix PR48695

2011-04-20 Thread Richard Guenther
This fixes PR48965, not handling mem-refs properly within aliasing_component_refs_p. We disregarded the offset for the decl base. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2011-04-20 Richard Guenther PR middle-end/48695 * tree-ssa-alias

Re: better wpa [1/n]: merge types during read-in

2011-04-20 Thread Michael Matz
Hi, On Wed, 20 Apr 2011, Richard Guenther wrote: > > + /* A hashtable of trees that potentially refer to variables or functions > > +    that must be replaced with their prevailing variant.  */ > > + static GTY((if_marked ("ggc_marked_p"), param_is (union tree_node))) > > htab_t > > +   tree_wit

Re: Remove vtable_method field in cgraph_node

2011-04-20 Thread Martin Jambor
Hi, On Sun, Apr 17, 2011 at 06:34:59PM +0200, Jan Hubicka wrote: > Hi, > > this patch drops vtable_method filed. I never understood what it is > about but reading PR20991 I am convinced that we hit the same > problem with work on new devirutalization code. I implemented what > Mark describe as "i

[PATCH][RFC] Fix PR48694

2011-04-20 Thread Richard Guenther
This makes us treat &a == &a in operand_equal_p in case the addresses have TREE_CONSTANT set, even in the case if a has TREE_SIDE_EFFECTS set (such as for volatile vars). Simply special-casing DECLs in the ADDR_EXPR case wouldn't handle &a.b == &a.b. I think it's important that operand_equal_p (

Re: [patch, ARM] PR48250, rehaul arm_legitimize_reload_address()

2011-04-20 Thread Richard Sandiford
Hi Chung-Lin, I'm seeing an ICE with this patch, specifically; Chung-Lin Tang writes: > + if (coproc_p) > + low = SIGN_MAG_LOW_ADDR_BITS (val, 10); We generate: Reload 1: reload_out (V4SI) = (mem/c:V4SI (plus:SI (plus:SI (reg/f:SI 11 fp)

Re: better wpa [1/n]: merge types during read-in

2011-04-20 Thread Richard Guenther
On Wed, Apr 20, 2011 at 3:17 PM, Michael Matz wrote: > Hi, > > On Wed, 20 Apr 2011, Richard Guenther wrote: > >> > + /* A hashtable of trees that potentially refer to variables or functions >> > +    that must be replaced with their prevailing variant.  */ >> > + static GTY((if_marked ("ggc_marked

Re: [Patch,AVR]: PR18145: do_copy_data & do_clear_bss only if needed

2011-04-20 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/4/19 Anatoly Sokolov : >> Please use ASM_OUTPUT_ALIGNED_DECL_COMMON and ASM_OUTPUT_ALIGNED_DECL_LOCAL macros here. >>> Confused. These macros are used. >>> >>> Johann >>> >> Sorry... Im look on function name not on macro definition. >> >> I agree with

Re: Improve stack layout heuristic.

2011-04-20 Thread Michael Matz
Hi, On Tue, 19 Apr 2011, Easwaran Raman wrote: > > That is correct but is also what the use of stack_vars[u].representative > > achieves alone, ... > > > >> I am adding a check to that effect. > > > > ... without any check. > > > > @@ -596,7 +581,8 @@ > >   if (vb->conflicts) > >     { > >      

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Martin Jambor
Hi, On Tue, Apr 19, 2011 at 09:07:35AM +0200, Jakub Jelinek wrote: > On Mon, Apr 18, 2011 at 03:33:18PM -0700, Jason Merrill wrote: > > On 04/18/2011 02:40 PM, Jakub Jelinek wrote: > > >If TREE_BINFO has BV_VCALL_INDEX set, this needs to be dynamically > > >adjusted, but none of the callers are pr

[RFA] MIPS 24K Errata Support

2011-04-20 Thread Catherine Moore
Hi Richard, This is the gcc patch for the 24K errata. Does this look okay to commit? Thanks, Catherine 2011-04-20 Catherine Moore * config/mips/mips.opt (mfix-24k): New. * config/mips/mips.h (ASM_SPEC): Handle -mfix-24k. * config/mips/mips.md (length): Increase by 4

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Martin Jambor
Hi, On Tue, Apr 19, 2011 at 02:15:18AM +0200, Jan Hubicka wrote: > Actually what happens here is that CCP devirtualize by propagating the > constructors and due to Richard's new code to drop OBJ_TYPE_REF we finally get > a direct call. This is all good and desirable. > > I think good solution wo

[PATCH][ARM] Clean up movw support

2011-04-20 Thread Andrew Stubbs
This patch doesn't change the compiler behaviour; it merely moves the support for MOVW's 16-bit immediate constant to const_ok_for_op. This patch is broken out of my previous (rejected) Thumb2-constants patch. I'll be posting v2 of that patch soon, and this clean up will be required then. OK

[committed/vms]: do not use vms-dwarf2.o for gnu-ld

2011-04-20 Thread Tristan Gingold
Hi, when gnu-ld is used, we do not need the extra vms-dwarf2.o file - which is needed only for the native vms linker. Committed on trunk. Tristan. 2011-04-20 Tristan Gingold * config/alpha/vms.h (LINK_SPEC): Do not use vms-dwarf2.o for gnu-ld.

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Jan Hubicka
> Hi, > > On Tue, Apr 19, 2011 at 02:15:18AM +0200, Jan Hubicka wrote: > > Actually what happens here is that CCP devirtualize by propagating the > > constructors and due to Richard's new code to drop OBJ_TYPE_REF we finally > > get > > a direct call. This is all good and desirable. > > > > I t

Re: [RFA] MIPS 24K Errata Support

2011-04-20 Thread Richard Sandiford
Catherine Moore writes: > +Work around the 24K E48 Lost Data on Stores during Refill errata. I think this should either be: Work around the 24K E48 (@cite{Lost Data on Stores During Refill}) errata. or: Work around the 24K E48 (lost data on stores during refill) errata. Maybe the second i

Re: [google]Pass --save-temps to the assembler (issue4436049)

2011-04-20 Thread Diego Novillo
On Tue, Apr 19, 2011 at 20:32, Easwaran Raman wrote: > The revised patch has a comment that this should be used with an > assembler wrapper that can recognize --save-temps. Thanks. Will commit after testing finishes. Diego.

[vms/committed]: fix ICE on alpha-vms

2011-04-20 Thread Tristan Gingold
Hi, This patch fixes a compiler crash for alpha-vms. Back-ends should not lie to the middle-end by defining macros to plain abort since the middle-end is entitled to infer properties from their existence. The correct thing to do is not to define the macros in the first place. Committed on trunk

Re: [patch, ARM] PR48250, rehaul arm_legitimize_reload_address()

2011-04-20 Thread Chung-Lin Tang
On 2011/4/20 09:24 PM, Richard Sandiford wrote: > Hi Chung-Lin, > > I'm seeing an ICE with this patch, specifically; > > Chung-Lin Tang writes: >> + if (coproc_p) >> +low = SIGN_MAG_LOW_ADDR_BITS (val, 10); > > We generate: > > Reload 1: reload_out (V4SI) = (mem/c:V4SI (plus:SI (plus:

Re: [pph] Namespaces, step 1. Trace formatting. (issue4433054)

2011-04-20 Thread dnovillo
http://codereview.appspot.com/4433054/diff/1/gcc/cp/pph-streamer.c File gcc/cp/pph-streamer.c (right): http://codereview.appspot.com/4433054/diff/1/gcc/cp/pph-streamer.c#newcode144 gcc/cp/pph-streamer.c:144: return; + if ((type == PPH_TRACE_TREE || type == PPH_TRACE_CHAIN) + && !data && fl

Re: [patch, ARM] PR48250, rehaul arm_legitimize_reload_address()

2011-04-20 Thread Richard Earnshaw
On Wed, 2011-04-20 at 23:06 +0800, Chung-Lin Tang wrote: > On 2011/4/20 09:24 PM, Richard Sandiford wrote: > > Hi Chung-Lin, > > > > I'm seeing an ICE with this patch, specifically; > > > > Chung-Lin Tang writes: > >> + if (coproc_p) > >> + low = SIGN_MAG_LOW_ADDR_BITS (val, 10); > > > >

Re: better wpa [1/n]: merge types during read-in

2011-04-20 Thread Michael Matz
Hi, On Wed, 20 Apr 2011, Richard Guenther wrote: > >> If t is a type, why fix up its field if it may not be the canonical > >> variant? > > > > Because type merging to work sometimes requires already canonicalized > > fields, at least that's what I found in investigating why some types > > weren

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Richard Guenther
On Wed, 20 Apr 2011, Jan Hubicka wrote: > > Hi, > > > > On Tue, Apr 19, 2011 at 02:15:18AM +0200, Jan Hubicka wrote: > > > Actually what happens here is that CCP devirtualize by propagating the > > > constructors and due to Richard's new code to drop OBJ_TYPE_REF we > > > finally get > > > a dir

[patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Kai Tietz
Hello, well the bonus points might gain somebody else ... But this adds a missing optimization for tree level implemented in fold-const. ChangeLog gcc/ 2011-04-20 Kai Tietz * fold-const.c (fold_binary_loc): Add handling for (X & ~Y) | (~X & Y) and (X && !Y) | (!X && Y) optimiza

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Martin Jambor
Hi, On Wed, Apr 20, 2011 at 04:38:25PM +0200, Jan Hubicka wrote: > > Hi, > > > > On Tue, Apr 19, 2011 at 02:15:18AM +0200, Jan Hubicka wrote: > > > Actually what happens here is that CCP devirtualize by propagating the > > > constructors and due to Richard's new code to drop OBJ_TYPE_REF we > >

Re: [PATCH] Fix incorrect devirtualization (PR middle-end/48661)

2011-04-20 Thread Jan Hubicka
> On Wed, 20 Apr 2011, Jan Hubicka wrote: > > > > Hi, > > > > > > On Tue, Apr 19, 2011 at 02:15:18AM +0200, Jan Hubicka wrote: > > > > Actually what happens here is that CCP devirtualize by propagating the > > > > constructors and due to Richard's new code to drop OBJ_TYPE_REF we > > > > finally

libgo patch committed: Remove empty directory

2011-04-20 Thread Ian Lance Taylor
I committed a patch to remove the now-empty directory libgo/go/crypto/block. Ian

[PATCH][ARM] Add support for ADDW and SUBW instructions

2011-04-20 Thread Andrew Stubbs
This patch adds basic support for the Thumb ADDW and SUBW instructions. The patch permits the compiler to use the new instructions for constants that can be loaded with a single instruction (i.e. 16-bit unshifted), but does not support use of addw with split-constants; I have a patch for that

Re: [patch, ARM] PR48250, rehaul arm_legitimize_reload_address()

2011-04-20 Thread Chung-Lin Tang
On 2011/4/20 11:12 PM, Richard Earnshaw wrote: > > On Wed, 2011-04-20 at 23:06 +0800, Chung-Lin Tang wrote: >> On 2011/4/20 09:24 PM, Richard Sandiford wrote: >>> Hi Chung-Lin, >>> >>> I'm seeing an ICE with this patch, specifically; >>> >>> Chung-Lin Tang writes: + if (coproc_p) +

Re: [PATCH][ARM] Remove redundant code in arm.c

2011-04-20 Thread Richard Earnshaw
On Wed, 2011-04-20 at 13:55 +0100, Andrew Stubbs wrote: > This patch removes some redundant code that caused me some confusion. > > It's not possible to construct a constant from multiple ORN > instructions, just as it's not possible to do it with multiple AND > instructions. > > OK? > > Andr

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Richard Henderson
On 04/20/2011 08:22 AM, Kai Tietz wrote: > + if (TREE_CODE (arg0) == BIT_AND_EXPR > + && TREE_CODE (arg1) == BIT_AND_EXPR) > +{ > + tree a0, a1, l0, l1, n0, n1; > + > + a0 = fold_convert_loc (loc, type, TREE_OPERAND (arg1, 0)); > + a1 = fold_convert_loc (loc, ty

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Jakub Jelinek
On Wed, Apr 20, 2011 at 05:22:31PM +0200, Kai Tietz wrote: > --- gcc.orig/gcc/fold-const.c 2011-04-20 17:10:39.478091900 +0200 > +++ gcc/gcc/fold-const.c 2011-04-20 17:11:22.901039400 +0200 > @@ -10660,6 +10660,28 @@ fold_binary_loc (location_t loc, > && reorder_operands_p (arg0, TREE_

Re: [PATCH][ARM] Add support for ADDW and SUBW instructions

2011-04-20 Thread Andrew Stubbs
On 20/04/11 16:27, Andrew Stubbs wrote: (*arm_subsi3_insn): Add subw support. Oh, I should probably say that I've added subw support to arm_subsi3 even though it's not obvious that anything will ever use this. The existing implementation of arm_subsi3 (sans 'w') supports immediates,

Re: [PATCH][ARM] Clean up movw support

2011-04-20 Thread Richard Earnshaw
On Wed, 2011-04-20 at 15:20 +0100, Andrew Stubbs wrote: > This patch doesn't change the compiler behaviour; it merely moves the > support for MOVW's 16-bit immediate constant to const_ok_for_op. > > This patch is broken out of my previous (rejected) Thumb2-constants > patch. I'll be posting v2 o

[PATCH] Fix PR47892

2011-04-20 Thread Richard Guenther
This fixes PR47892, we are failing to if-convert function calls, even those we can vectorize. This includes pow() which we canonicalize x*x to with -ffast-math (yeah, I know ...). No reason to not if-convert at least const builtins. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Kai Tietz
2011/4/20 Richard Henderson : > On 04/20/2011 08:22 AM, Kai Tietz wrote: >> +      if (TREE_CODE (arg0) == BIT_AND_EXPR >> +       && TREE_CODE (arg1) == BIT_AND_EXPR) >> +        { >> +       tree a0, a1, l0, l1, n0, n1; >> + >> +       a0 = fold_convert_loc (loc, type, TREE_OPERAND (arg1, 0)); >>

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Richard Henderson
On 04/20/2011 08:50 AM, Kai Tietz wrote: > + if (TREE_CODE (arg0) == TREE_CODE (arg1) > + && TREE_CODE (arg1) == TRUTH_AND_EXPR) Ok with these both explicitly testing TRUTH_AND_EXPR now. r~

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Kai Tietz
2011/4/20 Jakub Jelinek : > On Wed, Apr 20, 2011 at 05:22:31PM +0200, Kai Tietz wrote: >> --- gcc.orig/gcc/fold-const.c 2011-04-20 17:10:39.478091900 +0200 >> +++ gcc/gcc/fold-const.c      2011-04-20 17:11:22.901039400 +0200 >> @@ -10660,6 +10660,28 @@ fold_binary_loc (location_t loc, >>         &&

Fix PR48703: segfault in mangler due to -g

2011-04-20 Thread Michael Matz
Hi, as noted in the bug trail the fix for PR48207 broke compilation of C++ programs with -g. This variant fixes the bug too without breaking -g. Basically we have to set assembler names early also for TYPE_DECLs, we can't rely on the frontends langhook to do that after free_lang_data. Okay fo

[PATCH] Optimize (x * 8) | 5 and (x << 3) ^ 3 to use lea (PR target/48688)

2011-04-20 Thread Jakub Jelinek
Hi! This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in that case, when the low bits are known to be all 0, is like plus). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2011-04-20 Jaku

Re: [PATCH][ARM] Remove redundant code in arm.c

2011-04-20 Thread Andrew Stubbs
On 20/04/11 16:34, Richard Earnshaw wrote: On Wed, 2011-04-20 at 13:55 +0100, Andrew Stubbs wrote: This patch removes some redundant code that caused me some confusion. It's not possible to construct a constant from multiple ORN instructions, just as it's not possible to do it with multiple AND

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Kai Tietz
2011/4/20 Richard Henderson : > On 04/20/2011 08:50 AM, Kai Tietz wrote: >> +      if (TREE_CODE (arg0) == TREE_CODE (arg1) >> +       && TREE_CODE (arg1) == TRUTH_AND_EXPR) > > Ok with these both explicitly testing TRUTH_AND_EXPR now. > > > r~ > Committed at revision 172776 with explicit testing

Re: FDO usage: -Wcoverage-mismatch should not ignore -Wno-error

2011-04-20 Thread Xinliang David Li
This would work if there is a way to set Werror=coverage-mismatch without having to explicitly set the option classification as DK_ERROR. Does this mechanism exist? Thanks, David On Tue, Apr 19, 2011 at 12:52 AM, Richard Guenther wrote: > On Tue, Apr 19, 2011 at 9:13 AM, Xinliang David Li wr

Re: [PATCH][ARM] Clean up movw support

2011-04-20 Thread Andrew Stubbs
On 20/04/11 16:46, Richard Earnshaw wrote: 2011-04-20 Andrew Stubbs gcc/ * config/arm/arm.c (arm_gen_constant): Move mowv support (const_ok_for_op): ... to here. it's movw (not mowv :) Otherwise OK. Committed, thanks. Andrew

Re: [PATCH][ARM] New testcases for NEON

2011-04-20 Thread Andrew Stubbs
On 19/04/11 15:58, Richard Earnshaw wrote: OK. 2008-12-03 Daniel Jacobowitz gcc/testsuite/ * gcc.dg/vect/vect-shift-3.c, gcc.dg/vect/vect-shift-4.c: New. * lib/target-supports.exp (check_effective_target_vect_shift_char): New function. Committed, thanks.

[PATCH] make Ada runtime function building use build_function_type_list

2011-04-20 Thread Nathan Froyd
This patch changes most of the uses of build_function_type in the Ada to use build_function_type_list. There are a handful of build_function_type calls left; replacing those will have to wait until we get a build_function_type_{n,vec} interface. Tested on x86_64-unknown-linux-gnu. OK to commit?

Re: [Patch,AVR]: FIX ICE in optabs due to bad rotate expander.

2011-04-20 Thread Richard Henderson
On 04/19/2011 02:52 AM, Denis Chertykov wrote: > 2011/4/19 Georg-Johann Lay : >> How can add, sub etc. be split? This would need an explicit >> representation of carry. > > Yes. > > Look at http://gcc.gnu.org/ml/gcc/2005-03/msg00871.html Well, sort-of, but not really. It gets a tad ugly, but ha

[PATCH] use build_function_type_list a few places in the ObjC frontend

2011-04-20 Thread Nathan Froyd
Just as $SUBJECT suggests. All the other uses of build_function_type_list are tied up with get_arg_type_list and will therefore have to wait for a better FUNCTION_TYPE builder. Tested on x86_64-unknown-linux-gnu. IIUC the changes to objc-next-runtime-abi-02.c would not be tested on that platform

Re: [PATCH] Optimize (x * 8) | 5 and (x << 3) ^ 3 to use lea (PR target/48688)

2011-04-20 Thread Richard Henderson
On 04/20/2011 09:09 AM, Jakub Jelinek wrote: > Hi! > > This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y > for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in > that case, when the low bits are known to be all 0, is like plus). > > Bootstrapped/regtested on x

Re: [pph] Namespaces, step 1. Trace formatting. (issue4433054)

2011-04-20 Thread Lawrence Crowl
On 4/20/11, dnovi...@google.com wrote: > http://codereview.appspot.com/4433054/diff/1/gcc/cp/pph-streamer.c > File gcc/cp/pph-streamer.c (right): > > http://codereview.appspot.com/4433054/diff/1/gcc/cp/pph-streamer.c#newcode144 > gcc/cp/pph-streamer.c:144: return; > + if ((type == PPH_TRACE_TREE

Re: [patch middle-end]: Missed optimization for (x & ~y) | (~x & y)

2011-04-20 Thread Kai Tietz
2011/4/20 Kai Tietz : > 2011/4/20 Richard Henderson : >> On 04/20/2011 08:50 AM, Kai Tietz wrote: >>> +      if (TREE_CODE (arg0) == TREE_CODE (arg1) >>> +       && TREE_CODE (arg1) == TRUTH_AND_EXPR) >> >> Ok with these both explicitly testing TRUTH_AND_EXPR now. >> >> >> r~ >> > > Committed at re

[Patch,AVR]: Solve PR42210

2011-04-20 Thread Georg-Johann Lay
This solves some missed optimization that can be seen when moving around bits. There are 4 combiner patterns that operate on regs and one that uses them as intermediate patterns and works on I/O. Even if just an intermediate pattern matches it's still an improvement because avoid of shift. Tested

Re: [patch] Do not generate discriminator directive in strict mode

2011-04-20 Thread Richard Henderson
On 04/19/2011 06:40 AM, Eric Botcazou wrote: > - if (SUPPORTS_DISCRIMINATOR && discriminator != 0) > + if (SUPPORTS_DISCRIMINATOR > + && discriminator != 0 > + && (dwarf_version >= 4 || !dwarf_strict)) > fprintf (asm_out_file, " discriminator %d", discriminator); How is

Re: Improve stack layout heuristic.

2011-04-20 Thread Easwaran Raman
On Wed, Apr 20, 2011 at 6:53 AM, Michael Matz wrote: > Hi, > > On Tue, 19 Apr 2011, Easwaran Raman wrote: > >> > That is correct but is also what the use of stack_vars[u].representative >> > achieves alone, ... >> > >> >> I am adding a check to that effect. >> > >> > ... without any check. >> > >>

Re: [PATCH] Stop in note_eh_region_may_contain_throw after ERT_MUST_NOT_THROW (PR tree-optimization/48611)

2011-04-20 Thread Richard Henderson
On 04/18/2011 02:35 PM, Jakub Jelinek wrote: > PR tree-optimization/48611 > * tree-eh.c (note_eh_region_may_contain_throw): Don't propagate > beyond ERT_MUST_NOT_THROW region. Ok. r~

[Patch, Fortran, committed] PR 48692 - Fix gfortran.dg/module_write_1.f90 failure

2011-04-20 Thread Tobias Burnus
The committal of the patch for PR 48588 caused that gfortran.dg/module_write_1.f90 was now failing (ICE). After some debugging (cf. PR 48692) it turned out that it only worked by chance before. The attached patch fixes the issue more properly. (The ICE occurred as a check whether all symbols w

Re: FDO usability: pid handling

2011-04-20 Thread Xinliang David Li
Here is the revised patch. Basic FDO testing went fine. I still saw the ipa-inline assertion in SPEC FDO. Will run it when the regression is fixed. Thanks, David On Tue, Apr 19, 2011 at 5:33 PM, Jan Hubicka wrote: >> On Tue, Apr 19, 2011 at 4:49 PM, Jan Hubicka wrote: >> >> Actually, among all

Added myself to MAINTAINERS (write after approval)

2011-04-20 Thread Easwaran Raman
Changelog: 2011-04-20 Easwaran Raman * MAINTAINERS (Write After Approval): Add myself. Index: MAINTAINERS === --- MAINTAINERS (revision 172782) +++ MAINTAINERS (working copy) @@ -455,6 +455,7 @@ Yao Qi

unnecessary test before free changes committed

2011-04-20 Thread Jim Meyering
FYI, I've just pushed the following two change sets. I verified that "make check" on x86_64 produced the same set of 92 failures without as with my changes. However, when I ran "make check MALLOC_PERTURB_=0 MALLOC_CHECK_=0", I saw only 91 failures. (normally those MALLOC_*_ variables are set to no

Re: FDO usability: pid handling

2011-04-20 Thread Xinliang David Li
Discard this version of the patch. I have not updated source properly and the build/test was invalid. David On Wed, Apr 20, 2011 at 11:22 AM, Xinliang David Li wrote: > Here is the revised patch. Basic FDO testing went fine. I still saw > the ipa-inline assertion in SPEC FDO. Will run it when th

Re: Allow union variables to share stack slots wwith -fno-strict-aliasing (issue4444051)

2011-04-20 Thread Easwaran Raman
On Wed, Apr 20, 2011 at 2:12 AM, Eric Botcazou wrote: >> 2011-04-19  Easwaran Raman   >> >>       * gcc/testsuite/gcc.dg/stack-layout-1.c: New >>       * gcc/cfgexpand.c (add_alias_set_conflicts): Add conflicts >>       with a variable containing union type only with >>       -fstrict-aliasing. >

Re: [patch] Do not generate discriminator directive in strict mode

2011-04-20 Thread Eric Botcazou
> How is this not redundant with the existing > > /* The discriminator column was added in dwarf4. Simplify the below > by simply removing it if we're not supposed to output it. */ > if (dwarf_version < 4 && dwarf_strict) > discriminator = 0; > > check near the top of the function?

Re: FDO usability: pid handling

2011-04-20 Thread Xinliang David Li
Please review the latest patch. SPEC2k FDO testing pass. Thanks, David On Wed, Apr 20, 2011 at 11:22 AM, Xinliang David Li wrote: > Here is the revised patch. Basic FDO testing went fine. I still saw > the ipa-inline assertion in SPEC FDO. Will run it when the regression > is fixed. > > Thanks,

[PATCH] use build_function_type_list in the alpha backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to alpha-elf. OK to commit? -Nathan * config/alpha/alpha.c (alpha_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 5e85e2b..237e9b3 100644

[PATCH] use build_function_type_list in the bfin backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to bfin-elf. OK to commit? -Nathan * config/bfin/bfin.c (bfin_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 5d08437..03a833d 100644 --- a/g

[PATCH] use build_function_type_list in the frv backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to frv-elf. OK to commit? -Nathan * config/frv/frv.c (frv_init_builtins): Delete `endlink' variable. Call builtin_function_type_list instead of builtin_function_type. (UNARY, BINARY, TRINARY, QUAD): Likewise. diff --git a/gcc/conf

[PATCH] use build_function_type_list in the i386 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. There's still one use of build_function_type; replacing that type will have to wait for an improved FUNCTION_TYPE-building interface. Tested on x86_64-unknown-linux-gnu. OK to commit? -Nathan * config/i386/i386.c (ix86_code_end): Call build_function_type_list

[PATCH] use build_function_type_list in the ia64 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to ia64-linux-gnu. OK to commit? -Nathan * config/ia64/ia64.c (ia64_init_builtins): Call build_function_type_list instead of builtin_function_type. diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 5f22b17..166ec43 100644

[PATCH] use build_function_type_list in the iq2000 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to iq2000-elf. OK to commit? -Nathan * config/iq2000/i2000.c (iq2000_init_builtins): Call build_function_type_list instead of build_function_type. Delete `endlink' variable. diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2

[PATCH] use build_function_type_list in the mep backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to mep-elf. OK to commit? -Nathan * config/mep/mep.c (mep_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c index 02c825a..b8ef440 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the mips backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to mips-elf. OK to commit? -Nathan * config/mips/mips.c (mips16_build_function_stub): Call build_function_type_list instead of build_function_type. (mips16_build_call_stub): Likewise. diff --git a/gcc/config/mips/mips.c b/gcc/conf

Re: [PATCH] use build_function_type_list in the mep backend

2011-04-20 Thread DJ Delorie
> * config/mep/mep.c (mep_init_builtins): Call build_function_type_list > instead of build_function_type. Ok.

C++ PATCH for c++/48657 (rejects-valid with local variable used as non-type template argument)

2011-04-20 Thread Jason Merrill
The problem in this testcase was that we were recognizing a local const variable with a constant initializer as a constant expression, but we weren't doing the necessary adjustments to convert the initializer to the type of the variable. But some of the other bits of cp_finish_decl caused prob

[PATCH] use build_function_type_list in the s390 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to s390-linux-gnu. OK to commit? -Nathan * config/s390/s390.c (s390_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index caee077..adacfa3 100644 -

[PATCH] use build_function_type_list in the sparc backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to sparc-elf. OK to commit? -Nathan * config/sparc/sparc.c (sparc_file_end): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 03b5e66..e7dd75b 100644 ---

[PATCH] use build_function_type_list in the xtensa backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to xtensa-elf. OK to commit? -Nathan * config/xtensa/xtensa.c (xtensa_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index fe70270..574e08

Re: [PATCH] use build_function_type_list in the mips backend

2011-04-20 Thread Richard Sandiford
Nathan Froyd writes: > * config/mips/mips.c (mips16_build_function_stub): Call > build_function_type_list instead of build_function_type. > (mips16_build_call_stub): Likewise. OK, thanks, but: > - build_function_type (void_type_node, NULL_TREE)); > +

[PATCH] use build_function_type_list in the rs6000 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. The only tricky part is in builtin_function_type, where we fill in unused args with NULL_TREE so that passing extra arguments to build_function_type_list doesn't matter. Tested with cross to powerpc-eabi. OK to commit? -Nathan * config/rs6000/rs6000.c (spe_init_bu

[PATCH] use build_function_type_list in the picochip backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to picochip-elf. OK to commit? -Nathan * config/picochip/picochip.c (picochip_init_builtins): Call build_function_type_list instead of build_function_type. Delete `endlink' variable. diff --git a/gcc/config/picochip/picochip.c b/g

[PATCH, i386]: Expand insv pattern to pinsr{q,w,d,q} insn

2011-04-20 Thread Uros Bizjak
Hello! Attached patch enhances the fix for PR target/48678 to generate pinsr{q,w,d,q} insn when value is inserted into vector register. 2011-04-20 Uros Bizjak PR target/48678 * config/i386/i386.md (insv): Change operand 0 constraint to "register_operand". Change opera

[PATCH] use build_function_type_list in the avr backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to avr-elf. OK to commit? -Nathan * config/avr/avr.c (avr_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 500a5b2..6dbf8b4 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the pa backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. Tested with cross to hppa-linux-gnu. OK to commit? -Nathan * config/pa/pa.c (pa_init_builtins): Call build_function_type_list instead of build_function_type. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index e05cf19..aeb8061 100644 --- a/gcc/confi

[PATCH] use build_function_type_list in the arm backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. There's one remaining use of build_function_type, but replace that will have to wait until we have a better FUNCTION_TYPE-building interface. Tested with cross to arm-eabi. OK to commit? -Nathan * config/arm/arm.c (arm_init_iwmmxt_builtins): Call build_fun

Re: [PATCH] use build_function_type_list in the ia64 backend

2011-04-20 Thread Nathan Froyd
On Wed, Apr 20, 2011 at 03:29:19PM -0400, Nathan Froyd wrote: > As $SUBJECT suggests. Tested with cross to ia64-linux-gnu. OK to > commit? > > - ftype = build_function_type (float128_type, void_list_node); > - decl = add_builtin_function ("__builtin_infq", ftype, > -

Re: [PATCH] use build_function_type_list in the pa backend

2011-04-20 Thread John David Anglin
> * config/pa/pa.c (pa_init_builtins): Call build_function_type_list > instead of build_function_type. Ok. Dave -- J. David Anglin dave.ang...@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602)

[PATCH] use build_function_type_list in the spu backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. The only tricky bit is initializing all the args to NULL_TREE so that we can safely pass all the args to build_function_type_list. Tested with cross to spu-elf; I couldn't build all of libgcc, but that appears to be a pre-existing problem. OK to commit? -Nathan *

[PATCH] use build_function_type_list in the stormy16 backend

2011-04-20 Thread Nathan Froyd
As $SUBJECT suggests. For safety's sake, we initialize all the arguments to NULL before passing them to build_function_type_list. This is not necessary currently, as we always completely fill in the args array, but it might save some future coder from quite some grief... Tested with cross to xst

  1   2   >