Re: [PATCH 2/2] allow certain kinds of inputs to top level asm()-s

2011-10-13 Thread Jan Beulich
On 05.10.11 at 10:54, Jan Hubicka j...@suse.de wrote: we have, like specifying the set of symbols _defined_ by a toplevel asm, right? I might misremember but sth like extern void foo (void); asm( foo); was supposed to do the trick. Or should we treat those as outputs (given you

Re: int_cst_hash_table mapping persistence and the garbage collector

2011-10-13 Thread Gary Funck
On 10/13/11 06:15:31, Laurynas Biveinis wrote: [...] In your case (correct me if I misunderstood something) you have one hash table, marking of which will mark more objects which are required for the correct marking of the second hash table. GC might be simply walking the second one first.

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 01:38:44AM +0200, Michael Matz wrote: IMO reading the standard to allow an access to be based on s.p _as well as_ t-p and that this should result in any sensible behaviour regarding restrict is interpreting too much into it. No. Because s.p and t-p designates (if

[PATCH] Fix PR50698

2011-10-13 Thread Richard Guenther
This fixes PR50698, a failure to disambiguate MEM[mem + 10] from MEM[mem] in data-reference analysis. Fixed by also looking at offsets for non-subsetted references. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2011-10-13 Richard Guenther rguent...@suse.de

Re: New warning for expanded vector operations

2011-10-13 Thread Mike Stump
On Oct 12, 2011, at 2:37 PM, Artem Shinkarov wrote: This patch fixed PR50704. gcc/testsuite: * gcc.target/i386/warn-vect-op-3.c: Exclude ia32 target. * gcc.target/i386/warn-vect-op-1.c: Ditto. * gcc.target/i386/warn-vect-op-2.c: Ditto. Ok for trunk? Ok. Is this x32

Re: [PATCH] Fix number of arguments in call to alloca_with_align

2011-10-13 Thread Richard Guenther
On Wed, Oct 12, 2011 at 9:24 PM, Tom de Vries tom_devr...@mentor.com wrote: Richard, This patch fixes a trivial problem in gimplify_parameters, introduced by the patch that introduced BUILT_IN_ALLOCA_WITH_ALIGN. BUILT_IN_ALLOCA_WITH_ALIGN has 2 parameters, so the number of arguments in the

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Richard Guenther
On Thu, Oct 13, 2011 at 10:41 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Oct 13, 2011 at 01:38:44AM +0200, Michael Matz wrote: IMO reading the standard to allow an access to be based on s.p _as well as_ t-p and that this should result in any sensible behaviour regarding restrict is

Re: New warning for expanded vector operations

2011-10-13 Thread Richard Guenther
On Thu, Oct 13, 2011 at 10:59 AM, Mike Stump mikest...@comcast.net wrote: On Oct 12, 2011, at 2:37 PM, Artem Shinkarov wrote: This patch fixed PR50704. gcc/testsuite:        * gcc.target/i386/warn-vect-op-3.c: Exclude ia32 target.        * gcc.target/i386/warn-vect-op-1.c: Ditto.        *

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 11:21:58AM +0200, Richard Guenther wrote: I suggested that for a final patch we only add ADD_RESTRICT in the gimplifier for restrict qualified parameters, to make the inlining case work again. ADD_RESTRICTs for casts to restrict qualified pointers I would add at

Re: New warning for expanded vector operations

2011-10-13 Thread Artem Shinkarov
On Thu, Oct 13, 2011 at 10:23 AM, Richard Guenther richard.guent...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:59 AM, Mike Stump mikest...@comcast.net wrote: On Oct 12, 2011, at 2:37 PM, Artem Shinkarov wrote: This patch fixed PR50704. gcc/testsuite:        *

Re: [PATCH] Mark static const strings as read-only.

2011-10-13 Thread Tom de Vries
On 10/12/2011 10:13 AM, Tom de Vries wrote: On 10/10/2011 05:50 PM, Eric Botcazou wrote: So, the patch for build_constant_desc does not have the desired effect. OK, too bad that we need to play this back-and-forth game with MEMs. So the original patch is OK (with TREE_READONLY (base) on the

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 01:04 AM, Richard Kenner wrote: I still don't like the patch, but I'm no longer as familiar with the code as I used to be so can't suggest a replacement. Let's see what others think about it. Same here, I don't like it but I hardly see any alternative. The only possibility

[Ada] Correct error handling in Initialize

2011-10-13 Thread Arnaud Charlet
This change fixes the error handling circuitry in the initialization routine for suspension objects so that Storage_Error is propagated as intended if the allocation of the underlying OS entities fails. No test (requires system resource allocation failure). Tested on x86_64-pc-linux-gnu,

[Ada] Fix runtime assertion failure in timed selective wait

2011-10-13 Thread Arnaud Charlet
This change ensures fixes an improper usage of Defer_Abort where Defer_Abort_Nestable is meant, that would cause a failed assrtion if a timed selective accept statement occurs when there already is a pending call to the accepted entry. The following program must compile and execute quietly: with

[Ada] Factoring duplicated code

2011-10-13 Thread Arnaud Charlet
This change factors a chunk of code that was duplicated between Par.Ch2.P_Identifier and Par.Ch3.P_Defining_Identifier. No behaviour change, no test. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-10-13 Thomas Quinot qui...@adacore.com * par-ch2.adb, par.adb, par-util.adb,

[Ada] Checks on intrinsic operators

2011-10-13 Thread Arnaud Charlet
An operator can be declared Import (Intrinsic) only if the current view of the operand type (s) is a numeric type. With this patch the compiler properly rejects the pragma if the operand type is private or incomplete. Compiling mysystem.ads must yield: mysystem.ads:3:13: intrinsic operator

[Ada] Box associations in record aggregates

2011-10-13 Thread Arnaud Charlet
a component association for component X has a boc, then X is covered in the aggregate even if there is not default value for X in the type declaration, and X has to be default-initialized. If the aggregate also has an others clause, X is not covered by it. The following must compile quietly in

[Ada] Referenced enumeration literals in attributes.

2011-10-13 Thread Arnaud Charlet
When an enumeration type appears in an attribute reference, all literals of the type are marked as referenced. This must only be done if the attribute reference appears in the current source. Else the information on references may differ between a normal compilation and one that performs inlining.

[Ada] Unchecked union types can be limited

2011-10-13 Thread Arnaud Charlet
This patch removes an improper check on type to which the pragma Unchecked_Union applies. Such a type can be limitied. The following must compile quietly: package UU is type Val is (One, Two); type T (X : Val := One) is limited record case X is when One = A :

[Ada] Conditional and case expressions are legal return values

2011-10-13 Thread Arnaud Charlet
In Ada 2005, several constructs of a limited type can be built in place, and as such can be returned by function calls. In Ada 2012, the new expression forms conditional expressions and case expressions can also be built in place if each of their dependent expressions can be built in place. The

[Ada] Qualified expressions and Code statements in Ada 2012

2011-10-13 Thread Arnaud Charlet
In Ada 2012 a qualified expression is a valid name, and for example a function call that is disambiguated by means of a qualification can appear in the place of a constant object. On the other hand A qualified expression that appears as a statement denotes a machine code insertion. With the new

[Ada] Box associations for components without defaults in aggregates

2011-10-13 Thread Arnaud Charlet
Box associations are used to initialize aggregate components through the default value of the corresponding components, or through calls to initialization procedures. In general aggregates with such initializations cannot be built statically. With this patch the following must compile quietly:

[Ada] Unknown attribute in project member of aggregate project

2011-10-13 Thread Arnaud Charlet
If there was an unknown attribute (such as IDE'Gnat) in any member project of an aggregate project, then gprbuild fails if it is invoked on the aggregate project. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-10-13 Vincent Celier cel...@adacore.com * prj-conf.adb

[Ada] Support for user-defined storage pools in limited function returns

2011-10-13 Thread Arnaud Charlet
This patch fixes a bug in which the global heap was used, even when a user-defined storage pool had been specified. The bug occurred when the function result type is immutably limited (so build-in-place is used), and the result subtype is unconstrained or tagged (so has caller-unknown-size), and

[Ada] Entity list of for loop for enumeration with rep gets truncated

2011-10-13 Thread Arnaud Charlet
When a for loop for an enumeration type with an enumeration representation clause is expanded, it's rewritten as a loop over an integer loop parameter and the original loop parameter is moved into a new nested block. When the block is analyzed, the moved entity gets appended to the block scope's

Re: [Ada] Entity list of for loop for enumeration with rep gets truncated

2011-10-13 Thread Duncan Sands
Hi Arnaud, --- exp_ch5.adb (revision 179894) +++ exp_ch5.adb (working copy) @@ -3458,6 +3458,20 @@ Statements = Statements (N, End_Label = End_Label (N))); + + -- The loop parameter's entity must be removed from the loop +

[Ada] Modify L2_Norm implementation to be more suitable for Complex_Vector

2011-10-13 Thread Arnaud Charlet
Using the existing definition, we'd have to first convert a complex vector to a real one by computing the modulus (abs) of each element. Constructing an extra temporary vector is inefficient and may use an unexpected amount of extra storage. No change in behavior for the real case though, this

[Ada] Make local Sqrt implementation generic

2011-10-13 Thread Arnaud Charlet
This prepares for reusing the Sqrt implementation in Generic_Complex_Arrays. The local implementation avoids having to instantiate entire new copies of Generic_Elementary_Functions just to get square root. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-10-13 Geert Bosch

[Ada] Fix Forward_Eliminate routine to allow use with complex matrices

2011-10-13 Thread Arnaud Charlet
Use proper abs function returning a real for comparing magnitude of elements. The previous local implementation using - only was correct for real values. This prepares for the pure Ada reimplementation of Generic_Complex_Arrays. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-10-13 Geert

[Ada] Fix PR ada/50589

2011-10-13 Thread Eric Botcazou
Some left-overs from an earlier patch. Applied on the mainline. 2011-10-13 Eric Botcazou ebotca...@adacore.com PR ada/50589 * s-linux-alpha.ads: Do not with Interfaces.C. * s-linux-sparc.ads: Likewise. -- Eric Botcazou Index: s-linux-sparc.ads

[Ada] Reimplement Generic_Complex_Arrays in pure Ada

2011-10-13 Thread Arnaud Charlet
This completes the removal of dependencies on BLAS and LAPACK for these packages. The main reason for this is limited availability of these libraries on some platforms and for some types, in particular types wider than 64 bits. Furthermore, some BLAS implementations may use sub-cubic

[C++ Patch] PR 17212

2011-10-13 Thread Paolo Carlini
Hi, in this simple PR, submitter remarks that there isn't a real reason not to have -W(no-)format-zero-length working in C++ exactly like in C. In fact, the status quo is that the warning *is* active in C++ too, part of -Wformat, but it cannot be *disabled*, because -Wno-format-zero-length

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
Hello, this new version addresses the comments from Michael and additional fixes an latent issue shown up by this rewrite in fold-const. On gimplify.c's gimple_boolify we didn't handled the case that operands for TRUTH-expressions need to have same operand-size for transformation to bitwise

Re: [pph] More DECL merging. (issue5268042)

2011-10-13 Thread Diego Novillo
On Wed, Oct 12, 2011 at 23:36, Lawrence Crowl cr...@google.com wrote: Use the mangled name for merging, as this should enable us to handle function overloads.  We use the regular identifier for other declarations, as that should be sufficient and avoids the problem of different typedefs

Re: [pph] Remove old tracing. (issue5271041)

2011-10-13 Thread Diego Novillo
On Thu, Oct 13, 2011 at 01:01, Lawrence Crowl cr...@google.com wrote:  /* Read and return a location_t from STREAM. -   FIXME pph: If pph_trace didn't depend on STREAM, we could avoid having to -   call this function, only for it to call lto_input_location, which calls the -   streamer hook

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Richard Guenther
On Thu, Oct 13, 2011 at 1:25 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this new version addresses the comments from Michael and additional fixes an latent issue shown up by this rewrite in fold-const. On gimplify.c's gimple_boolify we didn't handled the case that operands for

[PATCH] Fix PR50712

2011-10-13 Thread Richard Guenther
This fixes PR50712, an issue with IPA split uncovered by adding verifier calls after it ... we need to also gimplify reads of register typed memory when passing it as argument. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2011-10-13 Richard Guenther

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
2011/10/13 Richard Guenther richard.guent...@gmail.com: On Thu, Oct 13, 2011 at 1:25 PM, Kai Tietz ktiet...@googlemail.com wrote: Hello, this new version addresses the comments from Michael and additional fixes an latent issue shown up by this rewrite in fold-const. On gimplify.c's

Re: [Ada] Checks on intrinsic operators

2011-10-13 Thread Iain Sandoe
On 13 Oct 2011, at 11:22, Arnaud Charlet wrote: An operator can be declared Import (Intrinsic) only if the current view of the operand type (s) is a numeric type. With this patch the compiler properly rejects the pragma if the operand type is private or incomplete. Compiling mysystem.ads

Ping shrink wrap patches

2011-10-13 Thread Alan Modra
Ping http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01002.html http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01003.html and http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01596.html The last one needs a tweak. s/FUNCTION_VALUE_REGNO_P/targetm.calls.function_value_regno_p/, or wrap the whole patch in

Fix gcc.dg/builtins-67.c on Solaris 8/9

2011-10-13 Thread Eric Botcazou
[To the right list this time] The test fails with a link error, as 'round' and 'rint' are only C99. Fixed thusly, tested on SPARC/Solaris 8, applied on the mainline as obvious. 2011-10-13 Eric Botcazou ebotca...@adacore.com * gcc.dg/builtins-67.c: Guard iround and irint with

Re: int_cst_hash_table mapping persistence and the garbage collector

2011-10-13 Thread Laurynas Biveinis
2011/10/13 Gary Funck g...@intrepid.com: On 10/13/11 06:15:31, Laurynas Biveinis wrote: [...] In your case (correct me if I misunderstood something) you have one hash table, marking of which will mark more objects which are required for the correct marking of the second hash table. GC might

[patch optimization]: Improve tree-ssa-ifcombine pass

2011-10-13 Thread Kai Tietz
Hello, This patch adds further optimization to gimple's ifcombine pass for single-bit andif operations. New patterns recognized are: * if ((a 4) == 0) if ((a 8) == 0) - if ((a 12) == 0) * if ((a 4) != 0) if ((a 8) == 0) - if ((a 12) == 4) * if ((a 4) == 0) if ((a 8) != 0) - if ((a 12)

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Richard Kenner
Same here, I don't like it but I hardly see any alternative. The only possibility could be to prevent calling expand_compound_operation completely for addresses. Richard, what do you think? Don't worry, combine hasn't changed much since your days. :) The problem wasn't potential changes

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Michael Matz
Hi, On Thu, 13 Oct 2011, Jakub Jelinek wrote: I'd sum up my previous mail as noting that restricted pointers are objects, so restrict is not property of expressions. So e.g. I don't think we should add ADD_RESTRICT (or, at least, not an ADD_RESTRICT with different tag) on every assignment

Re: [C++ Patch] PR 17212

2011-10-13 Thread Jason Merrill
Why not support it in Obj-C++, too? Jason

Re: [testsuite] require arm_little_endian in two tests

2011-10-13 Thread Richard Earnshaw
On 13/10/11 00:21, Janis Johnson wrote: Tests gcc.target/arm/pr48252.c and gcc.target/arm/neon-vset_lanes8.c expect little-endian code and fail when compiled with -mbig-endian. This patch skips the test if the current multilib does not generate little-endian code. I'm not able to run

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 02:51 PM, Richard Kenner wrote: case MEM: /* Ensure that our address has any ASHIFTs converted to MULT in case address-recognizing predicates are called later. */ temp = make_compound_operation (XEXP (x, 0), MEM); SUBST (XEXP (x, 0), temp);

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-13 Thread JonY
On 10/8/2011 23:50, Kai Tietz wrote: 2011/10/8 Paolo Carlini: Hi, Ok, fixed it, I made a very dumb mistake in configure.host, new patch attached. Patch is still ok with me, if Kai is ok with it (remember for next time: regenerated files are not posted, are just a distraction) Paolo

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Kai Tietz
Hello, this new version addresses the comments from you. On gimplify.c's gimplify_expr we didn't handled the case that operands for TRUTH-AND/OR/XOR expressions need to have same operand-size in case of transformation to bitwise-binary operation. This shows up for Fortran, as there are more

[PATCH] Handle COND_EXPR/VEC_COND_EXPR in walk_stmt_load_store_addr_ops and ssa verification

2011-10-13 Thread Jakub Jelinek
Hi! Andrew mentioned on IRC he found walk_stmt_load_store_addr_ops doesn't handle COND_EXPR weirdo first argument well, the following patch is an attempt to handle that. I've noticed similar spot in verify_ssa, though in that case I'm not sure about whether the change is so desirable, as it

Re: [patch tree-optimization]: Improve handling of conditional-branches on targets with high branch costs

2011-10-13 Thread Michael Matz
Hi, On Thu, 13 Oct 2011, Kai Tietz wrote: this new version addresses the comments from Michael and additional fixes an latent issue shown up by this rewrite in fold-const. On gimplify.c's gimple_boolify we didn't handled the case that operands for TRUTH-expressions need to have same

[PATCH] Optimize V8HImode UMIN reduction using PHMINPOSUW insn and some cleanup

2011-10-13 Thread Jakub Jelinek
Hi! This patch is partly taken from my part of the PR50374 patch, though that patch will need some further work in the vectorizer etc. SSE4.1 has the phminposuw insn which can be used for reduction instead of 3 shuffles and 3 min insns: ... - vpsrldq $8, %xmm0, %xmm1 - vpminuw %xmm1,

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-13 Thread Paolo Carlini
Ping, did this go in trunk already? I would be surprised to see this happening if nobody like you or Kai actually does the commit ;) P

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-13 Thread NightStrike
On Thu, Oct 13, 2011 at 9:47 AM, Paolo Carlini pcarl...@gmail.com wrote: Ping, did this go in trunk already? I would be surprised to see this happening if nobody like you or Kai actually does the commit ;) P Does Jon have commit access?

[C/C++] Fix PR c++/50608

2011-10-13 Thread Eric Botcazou
Hi, this is a regression present on the mainline and 4.6 branch, introduced by the offsetof folding change. The compiler now rejects: int fails = __builtin_offsetof (C, b.offset); error: cannot apply 'offsetof' to a non constant address whereas it still accepts: int works =

Re: [C++ Patch] PR 17212

2011-10-13 Thread Paolo Carlini
Hi, Why not support it in Obj-C++, too? Yes I briefly wondered that but I know *so* little about that front end... Do you think we can just add it? Probably yes ;) Paolo

Re: [patch] --enable-dynamic-string default for mingw-w64 v2

2011-10-13 Thread Kai Tietz
2011/10/13 Paolo Carlini pcarl...@gmail.com: Ping, did this go in trunk already? I would be surprised to see this happening if nobody like you or Kai actually does the commit ;) P I will take care to apply it. Kai

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 02:57:56PM +0200, Michael Matz wrote: struct S {int * restrict p;}; void foo (struct S *s, struct S *t) { s-p[0] = 0; t-p[0] = 1; // undefined if s-p == t-p; the caller was responsible // to not do that This is undefined only if s-p == t-p s-p

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Richard Kenner
Or being fooled by the 0xfffc masking, perhaps. No, I'm pretty sure that's NOT the case. The *whole point* of the routine is to deal with that masking.

Re: [C++ Patch] PR 17212

2011-10-13 Thread Jason Merrill
On 10/13/2011 09:53 AM, Paolo Carlini wrote: Yes I briefly wondered that but I know *so* little about that front end... Do you think we can just add it? Probably yes ;) Definitely. Anything supported in C++ should also be in Obj-C++ by default. Jason

Re: [PATCH][ARM] -m{cpu,tune,arch}=native

2011-10-13 Thread Andrew Stubbs
Ping. On 20/09/11 11:51, Andrew Stubbs wrote: On 09/09/11 12:55, Richard Earnshaw wrote: The part number field is meaningless outside of the context of a a specific vendor -- only taken as a pair can they refer to a specific part. So why is the vendor field hard-coded rather than factored into

[Patch,AVR] Fix PR46278, Take #3

2011-10-13 Thread Georg-Johann Lay
This is yet another attempt to fix PR46278 (fake X addressing). After the previous clean-ups it is just a small change. caller-saves.c tries to eliminate call-clobbered hard-regs allocated to pseudos around function calls and that leads to situations that reload is no more capable to perform all

Re: [PATCH] Optimize V8HImode UMIN reduction using PHMINPOSUW insn and some cleanup

2011-10-13 Thread Richard Henderson
On 10/13/2011 06:44 AM, Jakub Jelinek wrote: * config/i386/sse.md (reduc_umin_v8hi): New pattern. * config/i386/i386.c (ix86_build_const_vector): Handle also V32QI, V16QI, V16HI and V8HI modes. (emit_reduc_half): New function. (ix86_expand_reduc): Use phminposuw

Re: [testsuite] require arm_little_endian in two tests

2011-10-13 Thread Joseph S. Myers
On Thu, 13 Oct 2011, Richard Earnshaw wrote: 2) Change the compiler to make initializers of vectors assign elements of initializers to consecutive lanes in a vector, rather than the current behaviour of 'casting' an array of elements to a vector. While the second would be my preferred

Re: [Patch, Fortran, committed] PR 50659: [4.4/4.5/4.6/4.7 Regression] ICE with PROCEDURE statement

2011-10-13 Thread Janus Weil
Committed to the 4.6 branch as r179864: ... and to 4.5 as r179923. Cheers, Janus 2011/10/9 Janus Weil ja...@gcc.gnu.org: Hi all, I have just committed as obvious a patch for an ICE-on-valid problem with PROCEDURE statements: http://gcc.gnu.org/viewcvs?root=gccview=revrev=179723 The

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Michael Matz
Hi, On Thu, 13 Oct 2011, Jakub Jelinek wrote: On Thu, Oct 13, 2011 at 02:57:56PM +0200, Michael Matz wrote: struct S {int * restrict p;}; void foo (struct S *s, struct S *t) { s-p[0] = 0; t-p[0] = 1; // undefined if s-p == t-p; the caller was responsible // to

[Patch]: fix typo in rs6000.c (AIX bootstrap broken)

2011-10-13 Thread Tristan Gingold
Hi, looks like an obvious typo. Ok for trunk ? Tristan. 2011-10-13 Tristan Gingold ging...@adacore.com * config/rs6000/rs6000.c (rs6000_init_builtins): Fix typo. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 4fd2192..3bfe33e 100644 ---

Re: [testsuite] require arm_little_endian in two tests

2011-10-13 Thread Richard Earnshaw
On 13/10/11 15:56, Joseph S. Myers wrote: On Thu, 13 Oct 2011, Richard Earnshaw wrote: 2) Change the compiler to make initializers of vectors assign elements of initializers to consecutive lanes in a vector, rather than the current behaviour of 'casting' an array of elements to a vector.

Re: [pph] More DECL merging. (issue5268042)

2011-10-13 Thread Diego Novillo
I'm seeing an infinite loop in g++.dg/pph/c1limits-externalid.cc. The while() loop in pph_search_in_chain is not ending. Or maybe it's falling into the N^2 trap you mention in that routine? I've added a short timeout to this test and XFAIL'd it so you can debug it. Diego.

Re: RFC: Add ADD_RESTRICT tree code

2011-10-13 Thread Joseph S. Myers
On Thu, 13 Oct 2011, Michael Matz wrote: Yeah. But I continue to think that this reading is against the intent (or should be). All the examples in the standard and rationale never say anything about pointers to restricted objects and the problematic cases one can construct with them,

[Patch, Darwin] fix PR50699.

2011-10-13 Thread Iain Sandoe
.. this looks like an (almost) obvious fix for the bootstrap breakage... OK for trunk? Iain Index: gcc/config/darwin.c === --- gcc/config/darwin.c (revision 179865) +++ gcc/config/darwin.c (working copy) @@ -2957,10 +2957,11 @@

Re: [PATCH] Fix PR50712

2011-10-13 Thread H.J. Lu
On Thu, Oct 13, 2011 at 4:55 AM, Richard Guenther rguent...@suse.de wrote: This fixes PR50712, an issue with IPA split uncovered by adding verifier calls after it ... we need to also gimplify reads of register typed memory when passing it as argument. Bootstrapped on

Vector alignment tracking

2011-10-13 Thread Artem Shinkarov
Hi I would like to share some plans about improving the situation with vector alignment tracking. First of all, I would like to start with a well-known bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50716. There are several aspects of the problem: 1) We would like to avoid the quiet

[pph] shorten timeout on c1limits-externalid.cc and XFAIL (issue5278042)

2011-10-13 Thread Diego Novillo
I think this may be an infinite loop, but it may also just be taking a long time to do the merge operations. Teste on x86_64. Committed to branch. Diego. * g++.dg/pph/c1limits-externalid.cc: Add shorter timeout. Document failure mode. diff --git

[pph] Make streamer hooks internal (issue5278043)

2011-10-13 Thread Diego Novillo
To avoid confusion, I moved the callbacks into pph-streamer.c so they can be internal to that file. They don't need to be called directly ever. Tested on x86_64. Committed to branch. Diego. * pph-streamer-in.c (pph_in_mergeable_tree): Fix comment. (pph_read_tree): Move to

Re: [PATCH, rs6000] Preserve link stack for 476 cpus

2011-10-13 Thread Peter Bergner
On Mon, 2011-09-12 at 15:29 -0400, David Edelsohn wrote: First, please choose a more informative option name. -mpreserve-link-stack seems like something generally useful for all processors and someone may randomly add the option. It always is useful to preserve the link stack -- that's why

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
Artem Shinkarov artyom.shinkar...@gmail.com writes: 1) Currently in C we cannot provide information that an array is aligned to a certain number. The problem is hidden in the fact, that Have you considered doing it the other way round: when an optimization needs something to be aligned, make

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread H.J. Lu
On Thu, Oct 13, 2011 at 7:14 AM, Richard Kenner ken...@vlsi1.ultra.nyu.edu wrote: Or being fooled by the 0xfffc masking, perhaps. No, I'm pretty sure that's NOT the case.  The *whole point* of the routine is to deal with that masking. I got (gdb) step make_compound_operation

Re: [PATCH (6/7)] More widening multiply-and-accumulate pattern matching

2011-10-13 Thread Matthew Gretton-Dann
This patch seems to have caused PR50717: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50717 Thanks, Matt On 19/08/11 15:49, Andrew Stubbs wrote: On 14/07/11 15:35, Richard Guenther wrote: Ok. I've just committed this updated patch. I found bugs with VOIDmode constants that have caused me

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Richard Kenner
at the end. make_compound_operation doesn't know how to restore ZERO_EXTEND. It does in general. See make_extraction, which it calls. The question is why it doesn't in this case. That's the bug.

[committed] Drop TREE_ADDRESSABLE from BIT_FIELD_REF on lhs accessed vectors/complex

2011-10-13 Thread Jakub Jelinek
Hi! I've noticed that #define vector(elcount, type) \ __attribute__((vector_size((elcount)*sizeof(type type vector (4, int) f1 (vector (4, int) a, int b) { ((int *)a)[0] = b; return a; } as well as vector (4, int) f2 (vector (4, int) a, int b) { a[0] = b; return a; } don't result

[PATCH] vec_setmode for 32-byte vectors

2011-10-13 Thread Jakub Jelinek
Hi! As noted by Kirill Yukhin (and what lead to the previous tree-ssa.c patch), vec_setmode wasn't wired for 32-byte vectors. Although ix86_expand_vector_set handles 32-byte vectors just fine (even for AVX and integer vectors), without the expander we'd force things into memory etc. Fixed

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread H.J. Lu
On Thu, Oct 13, 2011 at 9:11 AM, Richard Kenner ken...@vlsi1.ultra.nyu.edu wrote: at the end.  make_compound_operation doesn't know how to restore ZERO_EXTEND. It does in general.  See make_extraction, which it calls.  The question is why it doesn't in this case.  That's the bug. It never

Re: Ping shrink wrap patches

2011-10-13 Thread Richard Henderson
On 10/13/2011 05:27 AM, Alan Modra wrote: Ping http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01002.html http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01003.html Ok. http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01596.html The last one needs a tweak.

Re: Ping shrink wrap patches

2011-10-13 Thread Bernd Schmidt
On 10/13/11 14:27, Alan Modra wrote: Without the ifcvt optimization for a function int foo (int x) we might have something like r29 = r3; // save r3 in callee saved reg if (some test) goto exit_label // main body of foo, calling other functions r3 = 0; return; exit_label: r3 = 1;

Re: Vector alignment tracking

2011-10-13 Thread Andi Kleen
Or I am missing someting? I often see the x86 vectorizer with -mtune=generic generate a lot of complicated code just to adjust for potential misalignment. My thought was just if the alias oracle knows what the original declaration is, and it's available for changes (e.g. LTO), it would be

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Paolo Bonzini
On 10/13/2011 06:35 PM, Richard Kenner wrote: It never calls make_extraction. There are several cases handled for AND operation. But (and:DI (plus:DI (subreg:DI (mult:SI (reg/v:SI 85 [ i ]) (const_int 4 [0x4])) 0) (subreg:DI (reg:SI 106) 0)) (const_int 4294967292

Re: [PATCH, rs6000] Preserve link stack for 476 cpus

2011-10-13 Thread Richard Henderson
On 10/13/2011 08:49 AM, Peter Bergner wrote: + if (TARGET_LINK_STACK) + asm_fprintf (file, \tbl 1f\n\tb 2f\n1:\n\tblr\n2:\n); + else + asm_fprintf (file, \tbcl 20,31,1f\n1:\n); Wouldn't it be better to set up an out-of-line blr insn that could be shared by all

Re: Vector alignment tracking

2011-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2011 at 06:57:47PM +0200, Andi Kleen wrote: Or I am missing someting? I often see the x86 vectorizer with -mtune=generic generate a lot of complicated code just to adjust for potential misalignment. My thought was just if the alias oracle knows what the original

Re: Ping shrink wrap patches

2011-10-13 Thread Bernd Schmidt
On 10/13/11 18:50, Bernd Schmidt wrote: On 10/13/11 14:27, Alan Modra wrote: Without the ifcvt optimization for a function int foo (int x) we might have something like r29 = r3; // save r3 in callee saved reg if (some test) goto exit_label // main body of foo, calling other functions

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Richard Kenner
An and:DI is cheaper than a zero_extend:DI of an and:SI. That depends strongly on the constants and whether the machine is 32-bit or 64-bit. But that's irrelevant in this case since the and:SI will be removed (it reflects what already been done).

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread H.J. Lu
On Thu, Oct 13, 2011 at 10:01 AM, Paolo Bonzini bonz...@gnu.org wrote: On 10/13/2011 06:35 PM, Richard Kenner wrote: It never calls make_extraction.  There are several cases handled for AND operation. But (and:DI (plus:DI (subreg:DI (mult:SI (reg/v:SI 85 [ i ])                (const_int 4

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Paolo Bonzini
On Thu, Oct 13, 2011 at 19:19, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:01 AM, Paolo Bonzini bonz...@gnu.org wrote: On 10/13/2011 06:35 PM, Richard Kenner wrote: It never calls make_extraction.  There are several cases handled for AND operation. But (and:DI (plus:DI

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread H.J. Lu
On Thu, Oct 13, 2011 at 10:21 AM, Paolo Bonzini bonz...@gnu.org wrote: On Thu, Oct 13, 2011 at 19:19, H.J. Lu hjl.to...@gmail.com wrote: On Thu, Oct 13, 2011 at 10:01 AM, Paolo Bonzini bonz...@gnu.org wrote: On 10/13/2011 06:35 PM, Richard Kenner wrote: It never calls make_extraction.  There

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

2011-10-13 Thread Paolo Bonzini
On Thu, Oct 13, 2011 at 19:06, Richard Kenner ken...@vlsi1.ultra.nyu.edu wrote: An and:DI is cheaper than a zero_extend:DI of an and:SI. That depends strongly on the constants and whether the machine is 32-bit or 64-bit. Yes, the rtx_costs take care of that. But that's irrelevant in this

Re: [RFA/ARM][Patch 02/05]: LDRD generation instead of POP in A15 Thumb2 epilogue.

2011-10-13 Thread Richard Henderson
On 10/11/2011 02:21 AM, Sameera Deshpande wrote: +/* When saved-register index (i) is odd, RTXs for both the registers + to be loaded are generated in above given LDRD pattern, and the + pattern can be emitted now. */ +par = emit_insn

RE: Intrinsics for N2965: Type traits and base classes

2011-10-13 Thread Michael Spertus
Addressing Jason's comments: Index: libstdc++-v3/include/tr2/type_traits === --- libstdc++-v3/include/tr2/type_traits(revision 0) +++ libstdc++-v3/include/tr2/type_traits(revision 0) @@ -0,0 +1,96 @@ +// TR2

Re: [PATCH, ARM] Unaligned accesses for builtin memcpy [2/2]

2011-10-13 Thread Julian Brown
On Wed, 28 Sep 2011 14:33:17 +0100 Ramana Radhakrishnan ramana.radhakrish...@linaro.org wrote: On 6 May 2011 14:13, Julian Brown jul...@codesourcery.com wrote: Hi, This is the second of two patches to add unaligned-access support to the ARM backend. It builds on the first patch to

[Patch,AVR] Print no-return functions as JMP

2011-10-13 Thread Georg-Johann Lay
This patch saves some ticks and bytes on stack by JUMPing to no-return functions instead of CALLing them. Passes without regression. Ok for trunk? Johann * config/avr/avr-protos.h (avr_out_call): New prototype. * config/avr/avr.md (adjust_len): Add alternative call.

  1   2   >