[PATCH, rs6000] Remove XFAIL from default_format_denormal_2.f90 for PowerPC on Linux

2014-06-17 Thread William J. Schmidt
Hi, The testcase gfortran.dg/default_format_denormal_2.f90 has been reporting XPASS since 4.8 on the powerpc*-unknown-linux-gnu platforms. This patch removes the XFAIL for powerpc*-*-linux-* from the test. I believe this pattern doesn't match any other platforms, but please let me know if I shoul

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-18 Thread William J. Schmidt
Greetings, Here is a new revision of the tree portions of this patch. I moved the pattern recognizer to expand, and added additional logic to look for the same pattern in gimple form. I added two more tests to verify the new logic. I didn't run into any problems with the RTL CSE phases. I can'

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-21 Thread William J. Schmidt
On Fri, 2011-10-21 at 11:26 +0200, Richard Guenther wrote: > On Tue, Oct 18, 2011 at 4:14 PM, William J. Schmidt > wrote: > > + > > + /* We don't use get_def_for_expr for S1 because TER doesn't forward > > + S1 in some situations where this transform is

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-24 Thread William J. Schmidt
OK, I've removed the pointer-arithmetic case from expand, to be handled later by straight-line strength reduction. Here's the patch to deal with just the specific pattern of PR46556 (which will also eventually be handled by strength reduction, but not as quickly). (FYI, I've been thinking through

[PATCH] Straight-line strength reduction, stage 1

2011-10-30 Thread William J. Schmidt
Greetings, IVOPTS handles strength reduction of induction variables, but GCC does not currently perform strength reduction in straight-line code. This has been noted before in PR22586 and PR35308. PR46556 is also a case that could be handled with strength reduction. This patch adds a pass to pe

[PING] Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-30 Thread William J. Schmidt
Ping. On Mon, 2011-10-24 at 08:38 -0500, William J. Schmidt wrote: > OK, I've removed the pointer-arithmetic case from expand, to be handled > later by straight-line strength reduction. Here's the patch to deal > with just the specific pattern of PR46556 (which will also even

Re: [PING] Re: [PATCH] Fix PR46556 (poor address generation)

2011-11-02 Thread William J. Schmidt
On Wed, 2011-11-02 at 12:55 +0100, Richard Guenther wrote: > On Sun, 30 Oct 2011, William J. Schmidt wrote: > > > Ping. > > > > On Mon, 2011-10-24 at 08:38 -0500, William J. Schmidt wrote: > > > OK, I've removed the pointer-arithmetic case from expand, to b

Re: [PATCH] Straight-line strength reduction, stage 1

2011-11-04 Thread William J. Schmidt
Richard, thanks for the quick reply! I realize there's a lot of traffic on gcc-patches right now, so I appreciate your time. On Fri, 2011-11-04 at 14:55 +0100, Richard Guenther wrote: > On Sun, Oct 30, 2011 at 5:10 PM, William J. Schmidt > wrote: > > Greetings, > > >

Re: [PATCH] Straight-line strength reduction, stage 1

2011-11-05 Thread William J. Schmidt
On Fri, 2011-11-04 at 14:55 +0100, Richard Guenther wrote: > On Sun, Oct 30, 2011 at 5:10 PM, William J. Schmidt > wrote: > > > > You do not seem to transform stmts on-the-fly, so for > > a1 = c + d; > a2 = c + 2*d; > a3 = c + 3*d; > > are you able to gen

Re: [PATCH] Strength reduction part 3 of 4: candidates with unknown strides

2012-08-08 Thread William J. Schmidt
On Wed, 2012-08-08 at 15:35 -0700, Janis Johnson wrote: > On 08/08/2012 03:27 PM, Andrew Pinski wrote: > > On Wed, Aug 8, 2012 at 3:25 PM, H.J. Lu wrote: > >> On Wed, Aug 1, 2012 at 10:36 AM, William J. Schmidt > >> wrote: > >>> Greetings, > >>

Re: [PATCH] Strength reduction part 3 of 4: candidates with unknown strides

2012-08-09 Thread William J. Schmidt
On Wed, 2012-08-08 at 19:22 -0700, Janis Johnson wrote: > On 08/08/2012 06:41 PM, William J. Schmidt wrote: > > On Wed, 2012-08-08 at 15:35 -0700, Janis Johnson wrote: > >> On 08/08/2012 03:27 PM, Andrew Pinski wrote: > >>> On Wed, Aug 8, 2012 at 3:25 PM, H.J. Lu wro

[PATCH] Fix PR54211

2012-08-09 Thread William J. Schmidt
Fix a thinko in strength reduction. I was checking the type of the wrong operand to determine whether address arithmetic should be used in replacing expressions. This produced a spurious POINTER_PLUS_EXPR when an address was converted to an unsigned long and back again. Bootstrapped and tested o

[PATCH, testsuite] New effective target long_neq_int

2012-08-09 Thread William J. Schmidt
As suggested by Janis regarding testsuite/gcc.dg/tree-ssa/slsr-30.c, this patch adds a new effective target for machines having long and int of differing sizes. Tested on powerpc64-unknown-linux-gnu, where the test passes for -m64 and is skipped for -m32. Ok for trunk? Thanks, Bill doc: 2012-

[PATCH] Fix PR54240

2012-08-14 Thread William J. Schmidt
Replace the once vacuously true, and now vacuously false, test for existence of a conditional move instruction for a given mode, with one that actually checks what it's supposed to. Add a test case so we don't miss such things in future. The test is powerpc-specific. It would be good to have an

Re: [PATCH] Fix PR54240

2012-08-14 Thread William J. Schmidt
Thanks, Andrew! Bill On Tue, 2012-08-14 at 14:17 -0700, Andrew Pinski wrote: > On Tue, Aug 14, 2012 at 2:15 PM, Andrew Pinski wrote: > > On Tue, Aug 14, 2012 at 2:11 PM, William J. Schmidt > > wrote: > >> Replace the once vacuously true, and now vacuously false, test

[PATCH] Fix PR54245

2012-08-14 Thread William J. Schmidt
Currently we can insert an initializer that performs a multiply in too small of a type for correctness. For now, detect the problem and avoid the optimization when this would happen. Eventually I will fix this up to cause the multiply to be performed in a sufficiently wide type. Bootstrapped and

Re: [patch] rs6000: plug a leak

2012-08-22 Thread William J. Schmidt
On Thu, 2012-08-23 at 00:53 +0200, Steven Bosscher wrote: > Hello Bill, > > This patch plugs a leak in rs6000.c:rs6000_density_test(). You have to > free the array that get_loop_body returns. Noticed while going over > all uses of get_loop_body (it's a common mistake to leak the return > array). >

Re: [patch] rs6000: plug a leak

2012-08-23 Thread William J. Schmidt
On Thu, 2012-08-23 at 00:53 +0200, Steven Bosscher wrote: > Hello Bill, > > This patch plugs a leak in rs6000.c:rs6000_density_test(). You have to > free the array that get_loop_body returns. Noticed while going over > all uses of get_loop_body (it's a common mistake to leak the return > array). >

[PATCH] Fix PR54492

2012-09-10 Thread William J. Schmidt
Richard found some N^2 behavior in SLSR that has to be suppressed. Searching for the best possible basis is overkill when there are hundreds of thousands of possibilities. This patch constrains the search to "good enough" in such cases. Bootstrapped and tested on powerpc64-unknown-linux-gnu with

Re: [PATCH] Fix PR54492

2012-09-10 Thread William J. Schmidt
On Mon, 2012-09-10 at 16:45 +0200, Richard Guenther wrote: > On Mon, 10 Sep 2012, William J. Schmidt wrote: > > > Richard found some N^2 behavior in SLSR that has to be suppressed. > > Searching for the best possible basis is overkill when there are > > hundreds of th

Re: [PATCH] Fix PR54492

2012-09-10 Thread William J. Schmidt
On Mon, 2012-09-10 at 16:56 +0200, Richard Guenther wrote: > On Mon, 10 Sep 2012, Jakub Jelinek wrote: > > > On Mon, Sep 10, 2012 at 04:45:24PM +0200, Richard Guenther wrote: > > > On Mon, 10 Sep 2012, William J. Schmidt wrote: > > > > > > > Richard foun

Re: [PATCH] Fix PR54492

2012-09-10 Thread William J. Schmidt
Here's the revised patch with a param. Bootstrapped and tested in the same manner. Ok for trunk? Thanks, Bill 2012-08-10 Bill Schmidt * doc/invoke.texi (max-slsr-cand-scan): New description. * gimple-ssa-strength-reduction.c (find_basis_for_candidate): Limit the tim

[PATCH] Fix PR54674

2012-09-24 Thread William J. Schmidt
In cases where pointers and ints are cast back and forth, SLSR can be tricked into introducing a multiply where one of the operands is of pointer type. Don't do that! Verified that the reduced test case in the PR is fixed with a cross-compile to sh4-unknown-linux-gnu with -Os, which is the only k

Re: [PATCH] Fix PR54674

2012-09-25 Thread William J. Schmidt
On Tue, 2012-09-25 at 09:14 +0200, Richard Guenther wrote: > On Mon, 24 Sep 2012, William J. Schmidt wrote: > > > In cases where pointers and ints are cast back and forth, SLSR can be > > tricked into introducing a multiply where one of the operands is of > > poin

[PATCH] Some vector cost model cleanup

2012-06-13 Thread William J. Schmidt
This is just some general maintenance to the vectorizer's cost model code: * Corrects a typo in a function name; * Eliminates an unnecessary function; * Combines some duplicate inline functions. Bootstrapped and tested on powerpc64-unknown-linux-gnu, no new regressions. Ok for trunk? Thanks,

Re: [Patch ping] Strength reduction

2012-06-14 Thread William J. Schmidt
Pro forma ping. :) Thanks, Bill On Sun, 2012-04-29 at 18:17 -0500, William J. Schmidt wrote: > Thought I'd ping http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01225.html > since it's been about six weeks. Any initial feedback would be very > much appreciated! > > Thanks, > Bill

[PATCH] Fix PR53703

2012-06-17 Thread William J. Schmidt
The test case exposes a bug that occurs only when a diamond control flow pattern has the arguments of the joining phi in a different order from the successor arcs of the entry block. My logic for setting bb_for_def[12] was just brain-dead. This cleans that up and also prevents wasting time examin

Re: [PATCH] Add vector cost model density heuristic

2012-06-18 Thread William J. Schmidt
On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > Hmm. I don't like this patch or its general idea too much. Instead > I'd like us to move more of the cost model detail to the target, giving > it a chan

Re: [PATCH] Add vector cost model density heuristic

2012-06-18 Thread William J. Schmidt
On Mon, 2012-06-18 at 13:49 -0500, William J. Schmidt wrote: > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > > > > > Hmm. I don't like this patch or its general idea too much. Instead >

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread William J. Schmidt
On Tue, 2012-06-19 at 12:08 +0200, Richard Guenther wrote: > On Mon, 18 Jun 2012, William J. Schmidt wrote: > > > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > > > > > > >

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread William J. Schmidt
On Tue, 2012-06-19 at 12:10 +0200, Richard Guenther wrote: > On Mon, 18 Jun 2012, William J. Schmidt wrote: > > > On Mon, 2012-06-18 at 13:49 -0500, William J. Schmidt wrote: > > > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > > > On Fri, 8 J

Re: [PATCH] Add vector cost model density heuristic

2012-06-19 Thread William J. Schmidt
On Tue, 2012-06-19 at 14:48 +0200, Richard Guenther wrote: > On Tue, 19 Jun 2012, William J. Schmidt wrote: > > > I remember having this discussion, and I was looking for it to check on > > the details, but I can't seem to find it either in my inbox or in the > > ar

Re: [Patch ping] Strength reduction

2012-06-20 Thread William J. Schmidt
On Wed, 2012-06-20 at 13:11 +0200, Richard Guenther wrote: > On Thu, Jun 14, 2012 at 3:21 PM, William J. Schmidt > wrote: > > Pro forma ping. :) > > ;) > > I notice (with all of these functions) > > +unsigned > +negate_cost (enum machine_mode mode, bool speed

Re: [Patch ping] Strength reduction

2012-06-20 Thread William J. Schmidt
On Wed, 2012-06-20 at 11:52 -0700, Richard Henderson wrote: > On 06/20/2012 04:11 AM, Richard Guenther wrote: > > I notice (with all of these functions) > > > > +unsigned > > +negate_cost (enum machine_mode mode, bool speed) > > +{ > > + static unsigned costs[NUM_MACHINE_MODES]; > > + rtx seq; >

Re: [PATCH] Add vector cost model density heuristic

2012-06-21 Thread William J. Schmidt
On Tue, 2012-06-19 at 16:20 +0200, Richard Guenther wrote: > On Tue, 19 Jun 2012, William J. Schmidt wrote: > > > On Tue, 2012-06-19 at 14:48 +0200, Richard Guenther wrote: > > > On Tue, 19 Jun 2012, William J. Schmidt wrote: > > > > > > > I remember hav

[PATCH] Strength reduction preliminaries

2012-06-21 Thread William J. Schmidt
As promised, this breaks out the changes to the IVOPTS cost model and the added function in double-int.c. Please let me know if you would rather see me attempt to consolidate the IVOPTS logic into expmed.c per Richard H's suggestion. I ran into a glitch with multiply_by_const_cost. The original

Re: [PATCH] Strength reduction preliminaries

2012-06-22 Thread William J. Schmidt
On Fri, 2012-06-22 at 10:44 +0200, Richard Guenther wrote: > On Thu, 21 Jun 2012, William J. Schmidt wrote: > > > As promised, this breaks out the changes to the IVOPTS cost model and > > the added function in double-int.c. Please let me know if you would > > rather see m

Re: [PATCH] Strength reduction preliminaries

2012-06-22 Thread William J. Schmidt
On Fri, 2012-06-22 at 10:44 +0200, Richard Guenther wrote: > On Thu, 21 Jun 2012, William J. Schmidt wrote: > > I ran into a glitch with multiply_by_const_cost. The original code > > declared a static htab_t in the function and allocated it on demand. > > When I tried addin

[PATCH] Strength reduction

2012-06-25 Thread William J. Schmidt
Here's a new version of the main strength reduction patch, addressing previous comments. A couple of quick notes: * I opened PR53773 and PR53774 for the cases where commutative operations were encountered with a constant in rhs1. This version of the patch still has the gcc_asserts in place to ca

[PATCH] Fix PR46556 (straight-line strength reduction, part 2)

2012-06-28 Thread William J. Schmidt
Here's a relatively small piece of strength reduction that solves that pesky addressing bug that got me looking at this in the first place... The main part of the code is the stuff that was reviewed last year, but which needed to find a good home. So hopefully that's in pretty good shape. I reca

Re: [PATCH, RFC] New target interface for vectorizer cost model

2012-07-03 Thread William J. Schmidt
On Tue, 2012-07-03 at 10:00 -0500, William J. Schmidt wrote: > On Tue, 2012-07-03 at 15:59 +0200, Richard Guenther wrote: > > On Tue, 3 Jul 2012, William J. Schmidt wrote: > > > > +@deftypefn {Target Hook} int TARGET_VECTORIZE_FINISH_COST (void > > > >

Re: [PATCH, RFC] New target interface for vectorizer cost model

2012-07-04 Thread William J. Schmidt
On Wed, 2012-07-04 at 10:49 +0200, Richard Guenther wrote: > On Tue, 3 Jul 2012, William J. Schmidt wrote: > > > Hi Richard, > > > > Here's a revision incorporating changes addressing your comments. As > > before it passes bootstrap and regression testing on p

[PATCH, committed] Fix PR53955

2012-07-13 Thread William J. Schmidt
Configure with --disable-build-poststage1-with-cxx exposed functions that should have been marked static. Bootstrapped on powerpc-unknown-linux-gnu, committed as obvious. Thanks, Bill 2012-07-13 Bill Schmidt PR bootstrap/53955 * config/spu/spu.c (spu_init_cost): Mark static.

[PATCH] Enable vectorizer cost model by default at -O3

2012-07-15 Thread William J. Schmidt
The auto-vectorizer is overly aggressive when not constrained by the vectorizer cost model. Although the cost model is by no means perfect, it does a reasonable job of avoiding many poor vectorization decisions. Since the auto-vectorizer is enabled by default at -O3 and above, we should also enabl

[PATCH] Add flag to control straight-line strength reduction

2012-07-17 Thread William J. Schmidt
I overlooked adding a pass-control flag for strength reduction, added here. I named it -ftree-slsr for consistency with other -ftree- flags, but could change it to -fgimple-slsr if you prefer that for a pass named gimple-ssa-... Bootstrapped and tested on powerpc-unknown-linux-gnu with no new reg

Re: [PATCH] Add flag to control straight-line strength reduction

2012-07-18 Thread William J. Schmidt
On Wed, 2012-07-18 at 11:01 +0200, Richard Guenther wrote: > On Wed, 18 Jul 2012, Steven Bosscher wrote: > > > On Wed, Jul 18, 2012 at 9:59 AM, Richard Guenther wrote: > > > On Tue, 17 Jul 2012, William J. Schmidt wrote: > > > > > >> I overlooked adding

Re: [PATCH] Add flag to control straight-line strength reduction

2012-07-18 Thread William J. Schmidt
On Wed, 2012-07-18 at 08:24 -0500, William J. Schmidt wrote: > On Wed, 2012-07-18 at 11:01 +0200, Richard Guenther wrote: > > On Wed, 18 Jul 2012, Steven Bosscher wrote: > > > > > On Wed, Jul 18, 2012 at 9:59 AM, Richard Guenther > > > wrote: > > >

Re: [PATCH] Add flag to control straight-line strength reduction

2012-07-18 Thread William J. Schmidt
Here's the patch with documentation changes included. I also cleaned up missing work from a couple of my previous patches, so -fhoist-adjacent-loads is documented now, and -fvect-cost-model is added to the list of options on by default at -O3. Ok for trunk? Thanks, Bill 2012-07-18 Bill Schmid

Ping: [PATCH] Fix PR46556 (straight-line strength reduction, part 2)

2012-07-22 Thread William J. Schmidt
Ping... On Thu, 2012-06-28 at 16:45 -0500, William J. Schmidt wrote: > Here's a relatively small piece of strength reduction that solves that > pesky addressing bug that got me looking at this in the first place... > > The main part of the code is the stuff that was review

Re: [PATCH] Vectorizer cost model outside-cost changes

2012-07-24 Thread William J. Schmidt
On Tue, 2012-07-24 at 10:57 +0200, Richard Guenther wrote: > On Mon, 23 Jul 2012, William J. Schmidt wrote: > > > This patch completes the conversion of the vectorizer cost model to use > > target hooks for recording vectorization information and calculating > > costs. P

[PATCH] Change IVOPTS and strength reduction to use expmed cost model

2012-07-25 Thread William J. Schmidt
Per Richard Henderson's suggestion (http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01370.html), this patch changes the IVOPTS and straight-line strength reduction passes to make use of data computed by init_expmed. This required adding a new convert_cost array in expmed to store the costs of convert

Re: [PATCH] Change IVOPTS and strength reduction to use expmed cost model

2012-07-25 Thread William J. Schmidt
On Wed, 2012-07-25 at 09:59 -0700, Richard Henderson wrote: > On 07/25/2012 09:13 AM, William J. Schmidt wrote: > > Per Richard Henderson's suggestion > > (http://gcc.gnu.org/ml/gcc-patches/2012-06/msg01370.html), this patch > > changes the IVOPTS and straight-line st

Re: [PING] Re: [RFC, ivopts] fix bugs in ivopts address cost computation

2012-07-25 Thread William J. Schmidt
On Wed, 2012-07-25 at 13:39 -0600, Sandra Loosemore wrote: > On 07/17/2012 05:22 AM, Richard Guenther wrote: > > On Wed, Jul 4, 2012 at 6:35 PM, Sandra Loosemore > > wrote: > >> > >> Ping? Original post with patch is here: > >> > >> http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00319.html > > > >

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-27 Thread William J. Schmidt
On Fri, 2012-07-27 at 15:40 +0200, Richard Guenther wrote: > On Thu, Jul 26, 2012 at 11:57 AM, Steven Bosscher > wrote: > > On Thu, Jul 26, 2012 at 11:23 AM, Richard Guenther > > wrote: > >> Ok! Thanks for adding this exhaustive documentation. > > > > There's more to come! I want to add some ex

[PATCH] Fix PR53733

2012-07-30 Thread William J. Schmidt
This fixes the de-canonicalization of commutative GIMPLE operations in the vectorizer that occurs when processing reductions. A loop_vec_info is flagged for cleanup when a de-canonicalization has occurred in that loop, and the cleanup is done when the loop_vec_info is destroyed. Bootstrapped on p

[PATCH, rs6000] Vectorizer heuristic

2012-07-31 Thread William J. Schmidt
Now that the vectorizer cost model is set up to facilitate per-target heuristics, I'm revisiting the "density" heuristic I submitted previously. This allows the vec_permute and vec_promote_demote costs to be set to their natural values, but inhibits vectorization in cases like sphinx3 where vector

[PATCH, committed] Strength reduction clean-up (base name => base expr)

2012-08-01 Thread William J. Schmidt
This cleans up terminology in strength reduction. What used to be a base SSA name is now sometimes other tree expressions, so the term "base name" is replaced by "base expression" throughout. Bootstrapped and tested with no new regressions on powerpc64-unknown-linux-gnu; committed as obvious. Th

[PATCH] Strength reduction part 3 of 4: candidates with unknown strides

2012-08-01 Thread William J. Schmidt
Greetings, Thanks for the review of part 2! Here's another chunk of the SLSR code (I feel I owe you a few beers at this point). This performs analysis and replacement on groups of related candidates having an SSA name (rather than a constant) for a stride. This leaves only the conditional incre

[PATCH, committed] Fix PR53773

2012-08-03 Thread William J. Schmidt
Change this test case to use the optimized dump so that the unreliable vect-details dump can't cause different behavior on different targets. Verified on powerpc64-unknown-linux-gnu, committed as obvious. Thanks, Bill 2012-08-03 Bill Schmidt * testsuite/gcc.dg/vect/pr53773.c: Change

[Patch ping] Strength reduction

2012-04-29 Thread William J. Schmidt
Thought I'd ping http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01225.html since it's been about six weeks. Any initial feedback would be very much appreciated! Thanks, Bill

Re: [PATCH] Improve COND_EXPR expansion

2012-05-02 Thread William J. Schmidt
On Mon, 2012-04-30 at 20:22 -0700, Andrew Pinski wrote: > Hi, > This patch improves the expansion of COND_EXPR into RTL, directly > using conditional moves. > I had to fix a bug in the x86 backend where emit_conditional_move > could cause a crash as we had a comparison mode of DImode which is not

[PATCH] Hoist adjacent pointer loads

2012-05-03 Thread William J. Schmidt
This patch was posted for comment back in February during stage 4. It addresses a performance issue noted in the EEMBC routelookup benchmark on a common idiom: if (...) x = y->left; else x = y->right; If the two loads can be hoisted out of the if/else, the if/else can be replaced by

Re: [PATCH] Hoist adjacent pointer loads

2012-05-03 Thread William J. Schmidt
On Thu, 2012-05-03 at 09:40 -0600, Jeff Law wrote: > On 05/03/2012 08:33 AM, William J. Schmidt wrote: > > This patch was posted for comment back in February during stage 4. It > > addresses a performance issue noted in the EEMBC routelookup benchmark > > on a common

Re: [PATCH] Hoist adjacent pointer loads

2012-05-03 Thread William J. Schmidt
On Thu, 2012-05-03 at 11:44 -0600, Jeff Law wrote: > On 05/03/2012 10:47 AM, William J. Schmidt wrote: > >> > > Yes and no. What's important is that you don't want to introduce page > > faults (or less urgently, cache misses) by speculating the load. So th

[PATCH] Fix PR53217

2012-05-08 Thread William J. Schmidt
This fixes another statement-placement issue when reassociating expressions with repeated factors. Multiplies feeding into __builtin_powi calls were not getting placed properly ahead of them in some cases. Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new regressions. I've also

[PATCH, 4.7] Backport fix to [un]signed_type_for

2012-05-10 Thread William J. Schmidt
Backporting this patch to 4.7 fixes a problem building Fedora 17. Bootstrapped and regression tested on powerpc64-unknown-linux-gnu. Is the backport OK? Thanks, Bill 2012-05-10 Bill Schmidt Backport from trunk: 2012-03-12 Richard Guenther * tree.c (signed_or_unsi

Re: [PATCH, 4.7] Backport fix to [un]signed_type_for

2012-05-10 Thread William J. Schmidt
On Thu, 2012-05-10 at 18:49 +0200, Jakub Jelinek wrote: > On Thu, May 10, 2012 at 11:44:27AM -0500, William J. Schmidt wrote: > > Backporting this patch to 4.7 fixes a problem building Fedora 17. > > Bootstrapped and regression tested on powerpc64-unknown-linux-gnu. Is >

PING: [PATCH] Fix PR53217

2012-05-15 Thread William J. Schmidt
Ping. Thanks, Bill On Tue, 2012-05-08 at 22:04 -0500, William J. Schmidt wrote: > This fixes another statement-placement issue when reassociating > expressions with repeated factors. Multiplies feeding into > __builtin_powi calls were not getting placed properly ahead of them in >

Re: PING: [PATCH] Fix PR53217

2012-05-16 Thread William J. Schmidt
On Wed, 2012-05-16 at 11:45 +0200, Richard Guenther wrote: > On Tue, 15 May 2012, William J. Schmidt wrote: > > > Ping. > > I don't like it too much - but pondering a bit over it I can't find > a nicer solution. > > So, ok. > > Thanks, > Richard

Re: PING: [PATCH] Fix PR53217

2012-05-16 Thread William J. Schmidt
On Wed, 2012-05-16 at 14:05 +0200, Richard Guenther wrote: > On Wed, 16 May 2012, William J. Schmidt wrote: > > > On Wed, 2012-05-16 at 11:45 +0200, Richard Guenther wrote: > > > On Tue, 15 May 2012, William J. Schmidt wrote: > > > > > > > Ping. &

Ping: [PATCH] Hoist adjacent pointer loads

2012-05-16 Thread William J. Schmidt
Ping. Thanks, Bill On Thu, 2012-05-03 at 09:33 -0500, William J. Schmidt wrote: > This patch was posted for comment back in February during stage 4. It > addresses a performance issue noted in the EEMBC routelookup benchmark > on a common idiom: > > if (...) > x =

Re: [PATCH][1/n] Improve vectorization in PR53355

2012-05-16 Thread William J. Schmidt
On Tue, 2012-05-15 at 14:17 +0200, Richard Guenther wrote: > This is the first patch to make the generated code for the testcase > in PR53355 better. It teaches VRP about LSHIFT_EXPRs (albeit only > of a very simple form). > > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. This a

[PATCH] Simplify attempt_builtin_powi logic

2012-05-17 Thread William J. Schmidt
This patch gives up on using the reassociation rank algorithm to correctly place __builtin_powi calls and their feeding multiplies. In the end this proved to introduce more complexity than it saved, due in part to the poor fit of introducing DAG expressions into the reassociated operand tree. Thi

[PATCH, rs6000] Fix PR53385

2012-05-18 Thread William J. Schmidt
This repairs the bootstrap issue due to unsafe signed overflow assumptions. Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new regressions. Ok for trunk? Thanks, Bill 2012-05-18 Bill Schmidt * config/rs6000/rs6000.c (print_operand): Revise code that unsafely

Re: [PATCH] Hoist adjacent pointer loads

2012-05-21 Thread William J. Schmidt
On Mon, 2012-05-21 at 14:17 +0200, Richard Guenther wrote: > On Thu, May 3, 2012 at 4:33 PM, William J. Schmidt > wrote: > > This patch was posted for comment back in February during stage 4. It > > addresses a performance issue noted in the EEMBC routelookup benchmark >

Re: [PATCH] Hoist adjacent pointer loads

2012-05-22 Thread William J. Schmidt
Here's a revision of the hoist-adjacent-loads patch. Besides hopefully addressing all your comments, I added a gate of at least -O2 for this transformation. Let me know if you prefer a different minimum opt level. I'm still running SPEC tests to make sure there are no regressions when opening th

Re: [PATCH] Hoist adjacent pointer loads

2012-05-23 Thread William J. Schmidt
On Wed, 2012-05-23 at 13:25 +0200, Richard Guenther wrote: > On Tue, 22 May 2012, William J. Schmidt wrote: > > > Here's a revision of the hoist-adjacent-loads patch. Besides hopefully > > addressing all your comments, I added a gate of at least -O2 for this > > tr

Re: [PATCH] Hoist adjacent pointer loads

2012-06-04 Thread William J. Schmidt
Hi Richard, Here's a revision of the hoist-adjacent-loads patch. I'm sorry for the delay since the last revision, but my performance testing has been blocked waiting for a fix to PR53487. I ended up applying a test version of the patch to 4.7 and ran performance numbers with that instead, with n

Re: [PATCH] Hoist adjacent pointer loads

2012-06-06 Thread William J. Schmidt
On Mon, 2012-06-04 at 08:45 -0500, William J. Schmidt wrote: > Hi Richard, > > Here's a revision of the hoist-adjacent-loads patch. I'm sorry for the > delay since the last revision, but my performance testing has been > blocked waiting for a fix to PR53487. I ended up

[PATCH] Add vector cost model density heuristic

2012-06-08 Thread William J. Schmidt
This patch adds a heuristic to the vectorizer when estimating the minimum profitable number of iterations. The heuristic is target-dependent, and is currently disabled for all targets except PowerPC. However, the intent is to make it general enough to be useful for other targets that want to opt

[PATCH] Correct cost model for strided loads

2012-06-10 Thread William J. Schmidt
The fix for PR53331 caused a degradation to 187.facerec on powerpc64-unknown-linux-gnu. The following simple patch reverses the degradation without otherwise affecting SPEC cpu2000 or cpu2006. Bootstrapped and regtested on that platform with no new regressions. Ok for trunk? Thanks, Bill 2012-

Re: [PATCH] Hoist adjacent pointer loads

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 13:28 +0200, Richard Guenther wrote: > On Mon, Jun 4, 2012 at 3:45 PM, William J. Schmidt > wrote: > > Hi Richard, > > > > Here's a revision of the hoist-adjacent-loads patch. I'm sorry for the > > delay since the last revis

Re: [PATCH] Correct cost model for strided loads

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 11:15 +0200, Richard Guenther wrote: > On Sun, Jun 10, 2012 at 5:58 PM, William J. Schmidt > wrote: > > The fix for PR53331 caused a degradation to 187.facerec on > > powerpc64-unknown-linux-gnu. The following simple patch reverses the > > degra

Re: [PATCH] Add vector cost model density heuristic

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > On Fri, 8 Jun 2012, William J. Schmidt wrote: > > > This patch adds a heuristic to the vectorizer when estimating the > > minimum profitable number of iterations. The heuristic is > > target-dependent, and is cu

Re: [PATCH] Correct cost model for strided loads

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 16:10 +0200, Richard Guenther wrote: > On Mon, 11 Jun 2012, William J. Schmidt wrote: > > > > > > > On Mon, 2012-06-11 at 11:15 +0200, Richard Guenther wrote: > > > On Sun, Jun 10, 2012 at 5:58 PM, William J. Schmidt > > > w

Re: [PATCH] Add vector cost model density heuristic

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 16:58 +0200, Richard Guenther wrote: > On Mon, 11 Jun 2012, Richard Guenther wrote: > > > On Mon, 11 Jun 2012, William J. Schmidt wrote: > > > > > On Mon, 2012-06-11 at 13:40 +0200, Richard Guenther wrote: > > > > On Fr

Re: [PATCH] Add vector cost model density heuristic

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 11:09 -0400, David Edelsohn wrote: > On Mon, Jun 11, 2012 at 10:55 AM, Richard Guenther wrote: > > > Well, they are at least magic numbers and heuristics that apply > > generally and not only to the single issue in sphinx. And in > > fact how it works for sphinx _is_ magi

Re: [PATCH] Hoist adjacent pointer loads

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 14:59 +0200, Richard Guenther wrote: > On Mon, 11 Jun 2012, William J. Schmidt wrote: > > > On Mon, 2012-06-11 at 13:28 +0200, Richard Guenther wrote: > > > On Mon, Jun 4, 2012 at 3:45 PM, William J. Schmidt > > > wrote: > > > > Hi

Re: [PATCH] Hoist adjacent pointer loads

2012-06-11 Thread William J. Schmidt
On Mon, 2012-06-11 at 12:11 -0500, William J. Schmidt wrote: > I found this parameter that seems to correspond to well-predicted > conditional jumps: > > /* When branch is predicted to be taken with probability lower than this >threshold (in percent), then it is considered w

Re: [PATCH] Hoist adjacent loads

2012-06-11 Thread William J. Schmidt
OK, once more with feeling... :) This patch differs from the previous one in two respects: It disables the optimization when either the then or else edge is well-predicted; and it now uses the existing l1-cache-line-size parameter instead of a new one (with updated commentary). Bootstraps and te

Re: [PATCH] Correct cost model for strided loads

2012-06-12 Thread William J. Schmidt
On Tue, 2012-06-12 at 12:59 +0200, Richard Guenther wrote: > Btw, with PR53533 I now have a case where multiplications of v4si are > really expensive on x86 without SSE 4.1. But we only have vect_stmt_cost > and no further subdivision ... > > Thus we'd need a tree_code argument to the cost hook.

[PATCH, RFC] First cut at using vec_construct for strided loads

2012-06-12 Thread William J. Schmidt
This patch is a follow-up to the discussion generated by http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00546.html. I've added vec_construct to the cost model for use in vect_model_load_cost, and implemented a cost calculation that makes sense to me for PowerPC. I'm less certain about the default,

Re: [PATCH, RFC] First cut at using vec_construct for strided loads

2012-06-13 Thread William J. Schmidt
On Wed, 2012-06-13 at 11:26 +0200, Richard Guenther wrote: > On Tue, 12 Jun 2012, William J. Schmidt wrote: > > > This patch is a follow-up to the discussion generated by > > http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00546.html. I've added > > vec_construct

[PATCH, committed] Fix PR53647

2012-06-13 Thread William J. Schmidt
It turns out we have some old machine descriptions that have no L1 cache, so we must account for a zero line size. Regstrapped on powerpc64-linux-unknown-gnu with no new failures, committed as obvious. Thanks, Bill 2012-06-13 Bill Schmidt PR tree-optimization/53647 * tree-ss

[PATCH] Fix PR50183

2011-09-13 Thread William J. Schmidt
Greetings, The code to build scops (static control parts) for graphite first rewrites loops into canonical loop-closed SSA form. PR50183 identifies a scenario where the results do not fulfill all required invariants of this form. In particular, a value defined inside a loop and used outside that

[PING] Re: [PATCH] Fix PR50183

2011-09-28 Thread William J. Schmidt
Hi there, Ping. I'm seeking approval for this fix on trunk and 4_6-branch. Thanks! Bill On Tue, 2011-09-13 at 17:55 -0500, William J. Schmidt wrote: > Greetings, > > The code to build scops (static control parts) for graphite first > rewrites loops into canonical loo

Re: [PING] Re: [PATCH] Fix PR50183

2011-09-29 Thread William J. Schmidt
On Thu, 2011-09-29 at 10:03 +0100, Tobias Grosser wrote: > On 09/29/2011 09:58 AM, Richard Guenther wrote: > > On Thu, Sep 29, 2011 at 12:10 AM, William J. Schmidt > > wrote: > >> Hi there, > >> > >> Ping. I'm seeking approval for this fix on trunk

[PATCH] Fix PR46556 (poor address generation)

2011-10-05 Thread William J. Schmidt
This patch addresses the poor code generation in PR46556 for the following code: struct x { int a[16]; int b[16]; int c[16]; }; extern void foo (int, int, int); void f (struct x *p, unsigned int n) { foo (p->a[n], p->c[n], p->b[n]); } Prior to the fix for PR32698, gcc calculated the off

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-05 Thread William J. Schmidt
On Wed, 2011-10-05 at 18:29 +0200, Steven Bosscher wrote: > On Wed, Oct 5, 2011 at 6:13 PM, William J. Schmidt > wrote: > >* tree-ssa-loop-ivopts.c (copy_ref_info): Remove static token. > > Rather than this, why not move the function to common code somewhere? >

Re: [PATCH] Fix PR46556 (poor address generation)

2011-10-05 Thread William J. Schmidt
On Wed, 2011-10-05 at 18:21 +0200, Paolo Bonzini wrote: > On 10/05/2011 06:13 PM, William J. Schmidt wrote: > > One other general question about the pattern-match transformation: Is > > this an appropriate transformation for all targets, or should it be > > somehow gated on

  1   2   3   >