avx2 branch is created

2011-06-16 Thread H.J. Lu
Hi, I created avx2 branch to implement AVX Programming Reference (June, 2011): http://software.intel.com/en-us/avx/ and checked in the initial implementation: http://gcc.gnu.org/ml/gcc-cvs/2011-06/msg00626.html Jason, can you add it to git mirror? Thanks. -- H.J.

[google/integration] Support arm-grtev2-linux-*eabi (issue4628043)

2011-06-16 Thread Chris Demetriou
Diego and/or Ollie, This patch adds support for the arm-grtev2-linux-gnueabi configuration. This is like the x86 linux config of similar 'vendor': * it plays some spec games to support easier use of static NSS configuration, and * it adds RUNTIME_ROOT_PREFIX support to the dynamic loader path

[PATCH]: Pass -no_pie on SYSTEMSPEC for darwin11

2011-06-16 Thread Jack Howarth
The gcj compiler needs to pass -no_pie for linkage on darwin11 due to the new -pie default of the linker. The attached patch accomplishes this by passing -no_pie on SYSTEMSPEC for *-*-darwin[12]*. Since Darwin10 supports -no_pie in its linker, I included it in the triplet match to simplify the

[testsuite] scan-dump variants to use 'unresolved' for missing dump file

2011-06-16 Thread Janis Johnson
Currently, scan-dump variants treat a missing dump file as a failure and append ": dump file does not exist" to the test message that would be used with pass or fail. This patch treats it as unresolved instead, using the same test message as for pass/fail and reporting the reason in the log file.

Re: RFC: Backport deep-copy assignment for constructors (PR 49324)

2011-06-16 Thread jerry DeLisle
On 06/16/2011 12:22 AM, Tobias Burnus wrote: Hi all, if the RHS is an array constructor, gfortran didn't deep copy allocatable components. That was fixed for the trunk by the patch at http://gcc.gnu.org/ml/fortran/2011-06/msg00095.html The wrong-code issue is not a regression and code leadin

Re: [PATCH, PR 49089] Don't split AVX256 unaligned loads by default on bdver1 and generic

2011-06-16 Thread H.J. Lu
On Thu, Jun 16, 2011 at 4:54 PM, Fang, Changpeng wrote: > Hi, > >  I modify the patch to disable unaligned load splitting only for bdver1 at > this moment. > Unaligned load splitting degrades CFP2006 by 1.3% in geomean for both > -mtune=bdver1 and > -mtune=generic on Bulldozer. However, we agree

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Janis Johnson
On 06/16/2011 04:18 PM, Joseph S. Myers wrote: > On Thu, 16 Jun 2011, Janis Johnson wrote: > >> Currently there are several possible causes for failure in object-size. >> Some are errors in the test itself, like the wrong number of arguments, >> but some others could be UNRESOLVED instead of ERROR

RE: [PATCH, PR 49089] Don't split AVX256 unaligned loads by default on bdver1 and generic

2011-06-16 Thread Fang, Changpeng
Hi, I modify the patch to disable unaligned load splitting only for bdver1 at this moment. Unaligned load splitting degrades CFP2006 by 1.3% in geomean for both -mtune=bdver1 and -mtune=generic on Bulldozer. However, we agree with H.J's suggestion to determine the optimal optimization sets fo

Re: [PATCH] Fix ICEs with -mxop __builtin_ia32_vpermil2p[sd]{,256} and __builtin_ia32_vprot[bwdq]i intrinsics (PR target/49411)

2011-06-16 Thread Jakub Jelinek
On Thu, Jun 16, 2011 at 05:57:12PM -0500, Quentin Neill wrote: > Does it need to also handle the VCVTP[SH]2P[HS] insns like this? > > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index 675888f..584f722 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -255

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Joseph S. Myers
On Thu, 16 Jun 2011, Janis Johnson wrote: > Currently there are several possible causes for failure in object-size. > Some are errors in the test itself, like the wrong number of arguments, > but some others could be UNRESOLVED instead of ERROR, such as the "size" > command failing or producing un

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Tobias Burnus
Hi Daniel, Daniel Carrera wrote: Have you tested the modifications with MPI? I mean: Compiling mpi.c, and then in gcc/testsuite/gfortran.dg/coarray: Ooops. I compiled and ran the test suite but I forgot to test MPI separately. Seemingly, there was also a bug in the single.c version: + loc

Re: [PATCH] Fix ICEs with -mxop __builtin_ia32_vpermil2p[sd]{,256} and __builtin_ia32_vprot[bwdq]i intrinsics (PR target/49411)

2011-06-16 Thread Quentin Neill
On Thu, Jun 16, 2011 at 3:34 PM, Quentin Neill wrote: > On Wed, Jun 15, 2011 at 11:40 AM, Quentin Neill > wrote: >> On Wed, Jun 15, 2011 at 4:54 AM, Jakub Jelinek wrote: >>> Hi! >>> >>> All of these _mm{,256}_permute2_p[sd] and _mm_roti_epi{8,16,32,64} >>> intrinsics ICE if the last argument is

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Janis Johnson
On 06/16/2011 10:08 AM, Joseph S. Myers wrote: > On Thu, 16 Jun 2011, Janis Johnson wrote: > >> Currently the dg-final check "object-size" results in ERROR if the >> assemble failed and the object file does not exist. This patch fails >> the test instead. OK for trunk? > > The set of testcase n

Re: Fix PR48542: reload register contents reuse crossing setjmp

2011-06-16 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/15/11 21:46, Hans-Peter Nilsson wrote: > A generic bug found in one of the less common targets. The MMIX > port usually saves the return-address from the special-register rJ to > a general call-saved register (helped by get_hard_reg_initial_val)

C++ PATCH for c++/44160 (__func__ and lambda)

2011-06-16 Thread Jason Merrill
Here since we hadn't called begin_compound_stmt yet for the simple return case, __func__ couldn't find a block scope to push into. So we open-code cp_parser_function_body and share the code between the two cases. Tested x86_64-pc-linux-gnu, applying to trunk. commit c748e82bb981d63bb24926fdd0f

C++ PATCH for c++/45378 (missed narrowing error)

2011-06-16 Thread Jason Merrill
Here, reshape_init throws away the CONSTRUCTOR, so we need to call check_narrowing before we forget about it. Tested x86_64-pc-linux-gnu, applying to trunk. commit 25767f0e366840ff8d1c334830785c2cba9c09cc Author: Jason Merrill Date: Wed Jun 15 15:20:18 2011 -0400 PR c++/45378 * dec

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/16/11 00:39, Tom de Vries wrote: > Hi, > > Consider the following example. > > extern unsigned int foo (int*) __attribute__((pure)); > unsigned int > tr (int array[], int n) > { > unsigned int i; > unsigned int sum = 0; > for (i = 0; i <

libcpp PATCH for c++/45399 (undesired NUL warning in raw strings)

2011-06-16 Thread Jason Merrill
People want to use raw strings for embedding binary data in source files, so we don't want to complain about \0 in the middle. Tested x86_64-pc-linux-gnu, applying to trunk. commit 35ebd948dd567743ed6b31deb063b5ef948304a9 Author: Jason Merrill Date: Wed Jun 15 14:16:43 2011 -0400 PR c++

C++ PATCH for c++/49229 (ICE with substitution failure)

2011-06-16 Thread Jason Merrill
Another missing check for error_mark_node in SFINAE. Tested x86_64-pc-linux-gnu, applying to trunk. commit 2451aadf094bf8e65bf5a5fa28bbe3829c5a399e Author: Jason Merrill Date: Wed Jun 15 13:39:42 2011 -0400 PR c++/49229 * pt.c (tsubst_decl) [FUNCTION_DECL]: Handle substitution fail

[Patch, Fortran, committed] PR 49074: [OOP] Defined assignment w/ CLASS arrays: Incomplete error message

2011-06-16 Thread Janus Weil
Hi all, I just committed an obvious one-line patch for a minor diagnostic problem with type-bound assignments and (yet unsupported) CLASS arrays: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175113 Cheers, Janus

C++ PATCH for c++/49251 (bogus unused warning with empty argument pack)

2011-06-16 Thread Jason Merrill
We normally mark variables as used in finish_id_expression, but we weren't doing that for variables with dependent type. They're still used even if we don't know what type they will have when instantiated. Tested x86_64-pc-linux-gnu, applying to trunk. commit b2f47a386f7f605829f4f1f30d2c1d8e25

C++ PATCH for c++/49420 (ICE printing variadic error context)

2011-06-16 Thread Jason Merrill
With ENABLE_CHECKING we want to make sure that we're tracking the number of non-default template arguments, but that doesn't apply to argument packs. Tested x86_64-pc-linux-gnu, applying to trunk. commit 8ed2e06bbc3925a1c8d86641938f83e9bbd15bda Author: Jason Merrill Date: Wed Jun 15 12:24:17

Re: fix darwin boostrap breakage

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 12:39 PM, Mike Stump wrote: > RIght now darwin doesn't build for me (something for goolge to find): > > Undefined symbols: > "LPR2", referenced from: > ___mulsc3 in _mulsc3_s.o > ___muldc3 in _muldc3_s.o > ___mulxc3 in _mulxc3_s.o Found it, rm -rf `find . -name

Re: C6X port 10/11: The port

2011-06-16 Thread Joseph S. Myers
On Mon, 16 May 2011, Bernd Schmidt wrote: > +#if 0 /* FIXME: Reenable when TI's tools are fixed. */ > + /* ??? Ideally we'd check flag_short_wchar somehow. */ Ideally you'd check wchar_type_node, the front-end tree node instead of the front-end flag used initializing that node. See what ARM

Re: [patch, testsuite] Fix g++.dg/opt/devirt2.C scanning, PR 48727

2011-06-16 Thread Steve Ellcey
On Wed, 2011-06-15 at 12:51 -0400, Hans-Peter Nilsson wrote: > On Fri, 10 Jun 2011, Steve Ellcey wrote: > > > I will check in this testsuite fix as obvious if there are no objections. > > But... :) > JFTR, if you want this to be really right, you should not xfail > this part of the test but rath

Re: [PATCH] Fix ICEs with -mxop __builtin_ia32_vpermil2p[sd]{,256} and __builtin_ia32_vprot[bwdq]i intrinsics (PR target/49411)

2011-06-16 Thread Quentin Neill
On Wed, Jun 15, 2011 at 11:40 AM, Quentin Neill wrote: > On Wed, Jun 15, 2011 at 4:54 AM, Jakub Jelinek wrote: >> Hi! >> >> All of these _mm{,256}_permute2_p[sd] and _mm_roti_epi{8,16,32,64} >> intrinsics ICE if the last argument is constant integer, but not in the >> expected range. >> >> I coul

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 9:31 AM, Janis Johnson wrote: > Currently the dg-final check "object-size" results in ERROR if the > assemble failed and the object file does not exist. This patch fails > the test instead. If you can arrange for call fail on only those things that later would have called pas

Re: fix darwin boostrap breakage

2011-06-16 Thread Jack Howarth
On Thu, Jun 16, 2011 at 12:39:44PM -0700, Mike Stump wrote: > RIght now darwin doesn't build for me (something for goolge to find): > > Undefined symbols: > "LPR2", referenced from: > ___mulsc3 in _mulsc3_s.o > ___muldc3 in _muldc3_s.o > ___mulxc3 in _mulxc3_s.o > > > I think

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 12:17 PM, Denis Chertykov wrote: >> Are you working in public git repository ? >> Can I chekout it ? >> >> If not then may be you can drop a full patch against svn. > > I've pushed it to > >  git://gcc.gnu.org/git/gcc.git rth/avr-addressing Thank you.

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Henderson
On 06/16/2011 12:14 PM, Richard Guenther wrote: > On Thu, Jun 16, 2011 at 7:24 PM, Eric Botcazou wrote: >>> I think this would be clearer with a name like DEPOSIT_EXPR, >>> similar to the ia64 deposit instruction. >> >> ia64's demise wasn't entirely undeserved then. IMO the descriptive power of >

fix darwin boostrap breakage

2011-06-16 Thread Mike Stump
RIght now darwin doesn't build for me (something for goolge to find): Undefined symbols: "LPR2", referenced from: ___mulsc3 in _mulsc3_s.o ___muldc3 in _muldc3_s.o ___mulxc3 in _mulxc3_s.o I think it is due to a updated macports bit that I've not tracked down. :-( I've not

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 12:17 PM, Denis Chertykov wrote: > Are you working in public git repository ? > Can I chekout it ? > > If not then may be you can drop a full patch against svn. I've pushed it to git://gcc.gnu.org/git/gcc.git rth/avr-addressing As I said yesterday, there's still a crash in libg

Re: Turn on -pie on darwin11 and later

2011-06-16 Thread Mike Stump
On Jun 16, 2011, at 5:01 AM, Pedro Alves wrote: > On Thursday 16 June 2011 02:33:50, Mike Stump wrote: >> BOOT_CFLAGS += -mdynamic-no-pic >> + >> +# Ensure we don't try and use -pie, as it is incompatible with pch. >> +BOOT_LDFLAGS=`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; >> esac;

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 11:09 AM, Denis Chertykov wrote: >> Only one question why you removed avr_legitimize_address ? > > It doesn't actually do anything useful. > > All it does is, for a subset of inputs, force the address into > a register.  This is the same as the fallback

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 7:24 PM, Eric Botcazou wrote: >> I think this would be clearer with a name like DEPOSIT_EXPR, >> similar to the ia64 deposit instruction. > > ia64's demise wasn't entirely undeserved then.  IMO the descriptive power of > DEPOSIT_EXPR is almost null.  BIT_FIELD_MODIFY_EXPR o

Re: [Patch, AVR]: PR49313, fix PR29524

2011-06-16 Thread Richard Henderson
On 06/15/2011 02:47 AM, Georg-Johann Lay wrote: > +#if defined (L_loop_ffsqi2) > +;; Helper for ffshi2, ffssi2 > +;; r25:r24 = r26 + zero_extend16 (ffs8(r24)) > +;; r24 must be != 0 > +;; clobbers: r26 > +DEFUN __loop_ffsqi2 Why does this function have "loop" in its name? The actual implementatio

[testsuite] Ignore mips-tfile warning in gcc.dg/debug/pr49032.c

2011-06-16 Thread Rainer Orth
The recent gcc.dg/debug/pr49032.c FAILs on Tru64 UNIX in a couple of cases: FAIL: gcc.dg/debug/pr49032.c -gcoff1 -O (test for excess errors) FAIL: gcc.dg/debug/pr49032.c -gcoff1 -O3 (test for excess errors) FAIL: gcc.dg/debug/pr49032.c -gcoff -O (test for excess errors) FAIL: gcc.dg/debug/pr49032.

[pph] Fix cxx_binding streaming logic (issue4646041)

2011-06-16 Thread Gabriel Charette
We were losing bindings when reassigning prev bindings with the current streaming logic. This doesn't fix any currently exposed bugs, but again helps me as part of fixing the bigger bug I'm on. Tested with bootstrap build and pph regression testing. At the end of pph_out_cxx_binding I could also

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 11:09 AM, Denis Chertykov wrote: > Only one question why you removed avr_legitimize_address ? It doesn't actually do anything useful. All it does is, for a subset of inputs, force the address into a register. This is the same as the fallback action. That is, any non-legitimate add

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 04:34 AM, Denis Chertykov wrote: >> @rth (while you are diving into AVR microworld ;-) >> May be you can give a suggestion to change the AVR abi. >> I have tuned the abi for code size almost 13 years ago. >> The register pressure to r18-r31 are very hig

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/16/2011 04:46 AM, Denis Chertykov wrote: >> I forgot to said that suggestion from Bernd Schmidt about >> HARD_FRAME_POINTER_REGNUM seems very useful: >>> Maybe it would help for your port to define a separate >>> FRAME_POINTER_REGNUM, able to hold an HImode val

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Tom de Vries
On 06/16/2011 05:42 PM, Zdenek Dvorak wrote: diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c (working copy) --- gcc/tree-ssa-loop-niter.c (working copy) +++ gcc/tree-ssa-loop-niter.c (working copy) @@ -2875,6 +2875,16 @@ low = lower_bound

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Eric Botcazou
> I think this would be clearer with a name like DEPOSIT_EXPR, > similar to the ia64 deposit instruction. ia64's demise wasn't entirely undeserved then. IMO the descriptive power of DEPOSIT_EXPR is almost null. BIT_FIELD_MODIFY_EXPR or something like this. -- Eric Botcazou

Re: PATCH [5/n]: Prepare x32: PR middle-end/48016: Inconsistency in non-local goto save area

2011-06-16 Thread H.J. Lu
On Thu, Jun 16, 2011 at 12:56 AM, Richard Guenther wrote: > On Wed, Jun 15, 2011 at 9:55 PM, H.J. Lu wrote: >> On Wed, Jun 15, 2011 at 8:16 AM, Michael Matz wrote: >>> Hi, >>> >>> On Wed, 15 Jun 2011, H.J. Lu wrote: >>> >> +  /* FIXME: update_nonlocal_goto_save_area may pass SA in the wrong

Re: [testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Joseph S. Myers
On Thu, 16 Jun 2011, Janis Johnson wrote: > Currently the dg-final check "object-size" results in ERROR if the > assemble failed and the object file does not exist. This patch fails > the test instead. OK for trunk? The set of testcase names - the things after "PASS: " or "FAIL: " or other sta

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:35 AM, Richard Guenther wrote: > > This is a (possible) pre-requesite for the bitfield lowering patch, > taken from the old mem-ref branch. It introduces BIT_FIELD_EXPR > which can be used to do bitfield composition. > BIT_FIELD_EXPR is equivalent to computing > a & ~((1 << C1 -

Re: [Patch, AVR]: QI builtins for parity, popcount, 1<< n

2011-06-16 Thread Joseph S. Myers
On Thu, 16 Jun 2011, Georg-Johann Lay wrote: > The recent implementation of some asm function in libgcc added > __popcountqi2 and __parityqi2. This patch makes these functions > available as __builtin_avr_popcount8 resp. __builtin_avr_parity8. > > Moreover, just out of a mood, I wrote a builtin f

[testsuite] dg-final object-size: fail if file does not exist

2011-06-16 Thread Janis Johnson
Currently the dg-final check "object-size" results in ERROR if the assemble failed and the object file does not exist. This patch fails the test instead. OK for trunk? Janis 2011-06-16 Janis Johnson * lib/scanasm.exp (object-size): Fail if object file does not exist. Index: lib/scan

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Richard Henderson
On 06/16/2011 05:44 AM, Bernd Schmidt wrote: > +@deftypefn {Built-in Function} int __builtin_clrsb (unsigned int x) > +Returns the number of leading redundant sign bits in @var{x}, starting > +at the most significant bit position. > +@end deftypefn Do we want a signed argument, since we're talking

Re: Add AVG and UAVG rtx codes

2011-06-16 Thread Jakub Jelinek
On Thu, Jun 16, 2011 at 06:08:17PM +0200, Bernd Schmidt wrote: > Another operation that exists on a number of processors is an "average" > operation, which computes "(ext (A) + ext (B) + 1) >> 1" from two input > operands. Some of our backends try to represnt this with complex RTL > expressions, ot

Re: [patch, testsuite] Fix vectorizer testsuite failures on ARM

2011-06-16 Thread Steve Ellcey
On Thu, 2011-06-16 at 08:48 +0300, Ira Rosen wrote: > > I am not sure what we want to do to make this test work on both > platforms. > > Do you have any ideas? > > I don't think it is related to endianess. > Could you please send me the dump files (created with > -fdump-tree-vect-details)? > > T

Add AVG and UAVG rtx codes

2011-06-16 Thread Bernd Schmidt
Another operation that exists on a number of processors is an "average" operation, which computes "(ext (A) + ext (B) + 1) >> 1" from two input operands. Some of our backends try to represnt this with complex RTL expressions, others use unspec. This patch adds two new rtx codes. Bootstrapped and t

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Richard Henderson
On 06/16/2011 08:25 AM, Hans-Peter Nilsson wrote: >> +++ gcc/config/i386/i386.c (working copy) > > (Not a dbr target...) > >> Ok? > > NO! They're still used by reorg.c+resource.c Already handled: rest_of_pass_free_cfg (void) { #ifdef DELAY_SLOTS /* The resource.c machinery uses DF but the

[Patch, AVR]: QI builtins for parity, popcount, 1<< n

2011-06-16 Thread Georg-Johann Lay
The recent implementation of some asm function in libgcc added __popcountqi2 and __parityqi2. This patch makes these functions available as __builtin_avr_popcount8 resp. __builtin_avr_parity8. Moreover, just out of a mood, I wrote a builtin for 1

Re: Fix comdat unsharing

2011-06-16 Thread H.J. Lu
On Tue, Jun 14, 2011 at 7:27 AM, Jan Hubicka wrote: > Hi, > cgraph_address_taken_from_non_vtable_p was written with asumption that all > references to functions > take addresses.  This is not true for aliases. > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > > Index: ChangeLog > ===

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Zdenek Dvorak
> >> diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c > >> (working copy) > >> --- gcc/tree-ssa-loop-niter.c (working copy) > >> +++ gcc/tree-ssa-loop-niter.c (working copy) > >> @@ -2875,6 +2875,16 @@ > >>    low = lower_bound_in_type (type, type); > >>    high = upper_b

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 05:25 PM, Hans-Peter Nilsson wrote: > On Thu, 16 Jun 2011, Bernd Schmidt wrote: >> We're updating REG_DEAD notes in regrename.c, but it seems this is for >> historical reasons only. As far as I can tell, every pass that needs >> such notes recomputes them with df_note_add_problem/df_a

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Richard Guenther
On Thu, Jun 16, 2011 at 5:24 PM, Zdenek Dvorak wrote: > Hi, > >> diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c >> (working copy) >> --- gcc/tree-ssa-loop-niter.c (working copy) >> +++ gcc/tree-ssa-loop-niter.c (working copy) >> @@ -2875,6 +2875,16 @@ >>    low = lower

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Hans-Peter Nilsson
On Thu, 16 Jun 2011, Bernd Schmidt wrote: > We're updating REG_DEAD notes in regrename.c, but it seems this is for > historical reasons only. As far as I can tell, every pass that needs > such notes recomputes them with df_note_add_problem/df_analyze, and the > following patch bootstrapped and test

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Zdenek Dvorak
Hi, > diff -u gcc/tree-ssa-loop-niter.c (working copy) gcc/tree-ssa-loop-niter.c > (working copy) > --- gcc/tree-ssa-loop-niter.c (working copy) > +++ gcc/tree-ssa-loop-niter.c (working copy) > @@ -2875,6 +2875,16 @@ >low = lower_bound_in_type (type, type); >high = upper_bound_in_type (ty

Re: Fail entire blocks less often in regrename.c

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:39 AM, Bernd Schmidt wrote: > * regrename.c (scan_rtx_reg): Handle the case where we write to an > open chain in a smaller mode without failing the entire block. Ok. r~

Re: Fail entire blocks less often in regrename.c

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 04:39 PM, Bernd Schmidt wrote: > + if (subset) > + head->cannot_rename = 1; I confused myself here by having too many trees, and tested & posted an old version the patch. This (and another instance) needs to read (subset && !superset) since these aren't strict super-/su

Re: regrename: don't update REG_DEAD notes

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:33 AM, Bernd Schmidt wrote: > * regrename.c (do_replace): Don't update notes. Ok. r~

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hi Tobias, New patch attached. In addition to the fixes you listed I also had to fix the call to MPI_Allgather. More below: Between "size," and "caf_register_t" is a instead of a simple " ". Fixed. As you mentioned yourself (in a private mail, commenting on my code): There is a "*" mis

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 07:35 AM, Bernd Schmidt wrote: > Did you have a chance to look at the ia64 unwind code? I probably won't > be able to get back to it for a while yet since I'm working on C6X tuning... I was looking at it before I moved house a month ago, and then totally forgot about it until today.

Fail entire blocks less often in regrename.c

2011-06-16 Thread Bernd Schmidt
Regrename tends to fall on its face if multiword registers are accessed both in their full width and in subparts. However, there's one case where it's relatively easy to improve the current situation - when tracking a wide register, and it's written to in a narrower mode, we can just close the chai

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 04:25 PM, Richard Henderson wrote: > That last point probably depends on Bernd Schmidt's work in > dwarf2out for shrink-wrapping... Did you have a chance to look at the ia64 unwind code? I probably won't be able to get back to it for a while yet since I'm working on C6X tuning... B

regrename: don't update REG_DEAD notes

2011-06-16 Thread Bernd Schmidt
We're updating REG_DEAD notes in regrename.c, but it seems this is for historical reasons only. As far as I can tell, every pass that needs such notes recomputes them with df_note_add_problem/df_analyze, and the following patch bootstrapped and tested successfully on i686-linux (some random libmudf

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:34 AM, Denis Chertykov wrote: > @rth (while you are diving into AVR microworld ;-) > May be you can give a suggestion to change the AVR abi. > I have tuned the abi for code size almost 13 years ago. > The register pressure to r18-r31 are very high. As far as I can see, the ABI is

[Patch ARM] Fix PR target/49398

2011-06-16 Thread Ramana Radhakrishnan
Hi, I spent some time trying to fix PR target/49398 but have run out of time to fix it properly beyond the original patch in the bug report. It probably needs the fix from the bug report and maybe some more but since I've not heard in 48 hours after the original bug report (it is thumb2 v7-a and t

Re: [PATCH][RFC] Regularize sizetypes

2011-06-16 Thread Richard Guenther
On Thu, 16 Jun 2011, H.J. Lu wrote: > On Thu, Jun 16, 2011 at 6:09 AM, Richard Guenther wrote: > > > > For some reason I split out sanitizing sizetypes from the > > no-undefined-overflow-branch.  In fact the following patch tries > > to only fix one thing - make unsigned sizetypes no longer sign-

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Richard Henderson
On 06/16/2011 04:46 AM, Denis Chertykov wrote: > I forgot to said that suggestion from Bernd Schmidt about > HARD_FRAME_POINTER_REGNUM seems very useful: >> Maybe it would help for your port to define a separate >> FRAME_POINTER_REGNUM, able to hold an HImode value, which then gets >> eliminated to

Re: [PATCH][RFC] Regularize sizetypes

2011-06-16 Thread H.J. Lu
On Thu, Jun 16, 2011 at 6:09 AM, Richard Guenther wrote: > > For some reason I split out sanitizing sizetypes from the > no-undefined-overflow-branch.  In fact the following patch tries > to only fix one thing - make unsigned sizetypes no longer sign-extended. > > This has (unfortunately) interest

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Bernd Schmidt
On 06/16/2011 03:10 PM, Laurent Desnogues wrote: > On Thu, Jun 16, 2011 at 2:44 PM, Bernd Schmidt > wrote: >> Several processors have a "count redundant sign bits" instruction: >> >> * SIGNBITS on Blackfin >> * NORM on C6X >> * SBC, apparently, on picochip > > picoChip defines __builtin_sbc. Wo

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Laurent Desnogues
On Thu, Jun 16, 2011 at 2:44 PM, Bernd Schmidt wrote: > Several processors have a "count redundant sign bits" instruction: > > * SIGNBITS on Blackfin > * NORM on C6X > * SBC, apparently, on picochip picoChip defines __builtin_sbc. Wouldn't that make it redundant with your __builtin_clrsb? > and

[PATCH][RFC] Regularize sizetypes

2011-06-16 Thread Richard Guenther
For some reason I split out sanitizing sizetypes from the no-undefined-overflow-branch. In fact the following patch tries to only fix one thing - make unsigned sizetypes no longer sign-extended. This has (unfortunately) interesting side-effects, and some of them have been mitigated by already c

Re: Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Georg-Johann Lay
Bernd Schmidt schrieb: > Several processors have a "count redundant sign bits" instruction: > > * SIGNBITS on Blackfin > * NORM on C6X > * SBC, apparently, on picochip > > and probably others. For example, for a value of 0 or -1, it returns 31, > while e.g. an input 0xc000 produces 1. > > Ot

Re: unwinding fallback for mips-irix6 n32

2011-06-16 Thread Olivier Hainque
Hi Rainer, Rainer Orth wrote: > I've finally gotten around to this. Apart from some comment and code > cleanups along the lines of the sol2-unwind.h files, I had to minimally > adapt the N32 multithreaded code sequence for IRIX 6.5.30 that I'm > running here. While I was at it, I added N64 suppo

Add __builtin_clrsb, similar to clz/ctz

2011-06-16 Thread Bernd Schmidt
Several processors have a "count redundant sign bits" instruction: * SIGNBITS on Blackfin * NORM on C6X * SBC, apparently, on picochip and probably others. For example, for a value of 0 or -1, it returns 31, while e.g. an input 0xc000 produces 1. Other compilers tend to define builtin functi

Re: [Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Tobias Burnus
Hi Daniel, Daniel Carrera wrote: > This patch adds a linked list to keep track of the allocated > memory of all static coarrays and ensures that at the end of > the program the memory is freed. +_gfortran_caf_register (ptrdiff_t size,caf_register_t type, void **tok

[libjava] Fix signal handling on IRIX, Tru64 UNIX (PR libgcj/49315)

2011-06-16 Thread Rainer Orth
While looking at the remaining libjava testsuite failures on IRIX 6.5 and Tru64 UNIX V5.1B, I noticed that both ports used default-signal.h and can_unwind_signal is no, although both have implementations of MD_UNWIND_FRAME_STATE_FOR. The following patch corrects this. Instead of introducing yet a

Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic

2011-06-16 Thread Tom de Vries
On 06/16/2011 09:24 AM, Zdenek Dvorak wrote: > Hi, > >> Consider the following example. >> >> extern unsigned int foo (int*) __attribute__((pure)); >> unsigned int >> tr (int array[], int n) >> { >> unsigned int i; >> unsigned int sum = 0; >> for (i = 0; i < n; i++) >> sum += foo (&array

Re: Turn on -pie on darwin11 and later

2011-06-16 Thread Pedro Alves
On Thursday 16 June 2011 02:33:50, Mike Stump wrote: > BOOT_CFLAGS += -mdynamic-no-pic > + > +# Ensure we don't try and use -pie, as it is incompatible with pch. > +BOOT_LDFLAGS=`case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` Shouldn't this use += like BOOT_CFLAGS? -- Pedro Alv

Re: [PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Jay Foad
> BIT_FIELD_EXPR is equivalent to computing > a & ~((1 << C1 - 1) << C2) | ((b << C2) & (1 << C1 = 1)), a & ~(((1 << C1) - 1) << C2) | ((b & ((1 << C1) - 1)) << C2) ? Jay. thus > inserting b of width C1 at the bitfield position C2 in a, returning > the new value.  This allows translating >  B

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Denis Chertykov : > 2011/6/16 Richard Henderson : >> On 06/15/2011 02:58 PM, Richard Henderson wrote: >>> Indeed, I can work around this particular crash by either >>> hacking Z to be call-saved, or hacking the frame pointer to >>> not be required.  The former of course changes the abi, a

Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration

2011-06-16 Thread Janus Weil
>>> here is the fix for an OOP-regression reported today by Andrew Benson >>> >>> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? >> >> The patch is OK - thanks for the quick fix. > > Thanks, will commit soon. The patch has been applied to trunk as r175101. Will commit to the 4.

[PATCH][RFC][2/2] Bitfield lowering

2011-06-16 Thread Richard Guenther
This implements lowering a subset of COMPONENT_REFs with DECL_BIT_FIELD FIELD_DECLs and BIT_FIELD_REFs - thus bitfield operations in general. It lowers those to memory loads/stores that the (non-strict-align) target is able to carry out, adjusting for the bit-field-ness by inserting proper shiftin

Re: [Patch, AVR]: Hack around PR34734

2011-06-16 Thread Georg-Johann Lay
Richard Guenther schrieb: > On Wed, Jun 15, 2011 at 3:54 PM, Georg-Johann Lay wrote: Is it possible not to quote my email address? Thanks. >> Weddington, Eric schrieb: >>> Hi Johann, >>> >>> I understand your reasoning, but I'm not particularly fond of this hack. >> Yes, ACK. It's a hack to get

[PATCH][RFC][1/2] Bitfield lowering, add BIT_FIELD_EXPR

2011-06-16 Thread Richard Guenther
This is a (possible) pre-requesite for the bitfield lowering patch, taken from the old mem-ref branch. It introduces BIT_FIELD_EXPR which can be used to do bitfield composition. BIT_FIELD_EXPR is equivalent to computing a & ~((1 << C1 - 1) << C2) | ((b << C2) & (1 << C1 = 1)), thus inserting b o

Re: [Patch, AVR]: Fix PR46779

2011-06-16 Thread Denis Chertykov
2011/6/16 Richard Henderson : > On 06/15/2011 02:58 PM, Richard Henderson wrote: >> Indeed, I can work around this particular crash by either >> hacking Z to be call-saved, or hacking the frame pointer to >> not be required.  The former of course changes the abi, and >> the second produces awful co

Re: [patch] Another enhancement of widen-mult in the vectorizer

2011-06-16 Thread Ira Rosen
>> >> +         && TREE_CODE (half_type1) == INTEGER_TYPE) >> +       { >> +         if (int_fits_type_p (oprnd0, half_type1)) >> >> I believe you need to check that oprnd0 is a INTEGER_CST before calling >> int_fits_type_p. >> >> +            { >> +             /* OPRND0 is a constant of HALF_TYPE

Re: PATCH: PR rtl-optimization/49088: Combine fails to properly handle zero-extension and signed int constant

2011-06-16 Thread Eric Botcazou
> force_to_mode has > > /* If X is a CONST_INT, return a new one. Do this here since the > test below will fail. */ > if (CONST_INT_P (x)) > { > if (SCALAR_INT_MODE_P (mode)) > return gen_int_mode (INTVAL (x) & mask, mode); > else > { > x = GEN_I

Re: Updated^3: RFA: Fix middle-end/46500 (void * encapsulated)

2011-06-16 Thread Bernd Schmidt
Ok, much better. + cumulative_args_t dummy; + + return m32r_pass_by_reference (dummy, TYPE_MODE (type), type, false); Please initialize the variable. Otherwise I think it's OK. Thanks! Bernd

Re: [patch] Don't insert pattern statements into the code (was Fix PR tree-optimization/49318)

2011-06-16 Thread Ira Rosen
(I am resending this, since it's been already 4 hours since I sent it first time, and I don't see it on the list. I apologize for possible duplication.) > > On 14 June 2011 14:27, Richard Guenther wrote: > > > >   /* Mark the stmts that are involved in the pattern. */ > -  gsi_ins

Re: [Patch, AVR]: PR49313, fix PR29524

2011-06-16 Thread Georg-Johann Lay
Denis Chertykov schrieb: > 2011/6/15 Georg-Johann Lay : >> This is a patch that implements some libgcc functions in assembler. >> The functions are used only very seldom but if, they lead to an >> unpleasant waste of resource. For example, some SF functions >> eventually lead to __clz_tab being dra

Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration

2011-06-16 Thread Janus Weil
2011/6/16 Tobias Burnus : > Janus Weil wrote: >> here is the fix for an OOP-regression reported today by Andrew Benson >> >> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? > > The patch is OK - thanks for the quick fix. Thanks, will commit soon. > Do you plan to also backport

[Patch, Fortra, Coarray] Free allocated memory for static coarrays.

2011-06-16 Thread Daniel Carrera
Hello, This is my second patch for GFortran. This patch adds a linked list to keep track of the allocated memory of all static coarrays and ensures that at the end of the program the memory is freed. Additionally, I use MPI_Allgather in mpi.c to ensure that all images know the address of the

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

2011-06-16 Thread Stubbs, Andrew
On 02/06/11 11:36, Ramana Radhakrishnan wrote: > On 2 June 2011 10:03, Andrew Stubbs wrote: >> On 02/06/11 09:23, Ramana Radhakrishnan wrote: >>> >>> Please remove the alternatives in the subsi3 pattern since that is just >>> unnecessary. Please make the constraints internal only. >> >> Is this be

Re: [Patch, AVR]: PR49313, fix PR29524

2011-06-16 Thread Ian Lance Taylor
Georg-Johann Lay writes: > gcc/ > PR target/49313 > PR target/29524 > > * longlong.h: Add AVR support: > (count_leading_zeros): New macro. > (count_trailing_zeros): New macro. > (COUNT_LEADING_ZEROS_0): New macro. > > * config/avr/t-avr (LIB

Re: Remove separate tarballs

2011-06-16 Thread Andrew Haley
On 16/06/11 01:43, Gerald Pfeifer wrote: > On Tue, 7 Jun 2011, Andrew Haley wrote: >>> The vast majority of users does not need the former and the latter is >>> on the verge of becoming practically irrelevant. As one datapoint, the >>> entire FreeBSD Ports Collection has a single(!) port relying o

  1   2   >