public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/49749] Reassociation rank algorithm does not include all non-NULL operands
Date: Wed, 20 Jul 2011 16:30:00 -0000	[thread overview]
Message-ID: <bug-49749-4-anzoDinpTB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-49749-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49749

William J. Schmidt <wschmidt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |wschmidt at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #9 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-07-20 16:28:49 UTC ---
Created attachment 24798
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24798
Proposed patch

I'm attaching a patch that solves this issue.  The patch was produced against
the ibm/gcc-4_6-branch, but should apply OK to trunk -- I'll verify that later
if the direction of this patch is acceptable.  This regains the 20% performance
loss we had experienced in 410.bwaves, and also gives a 5% boost to 444.namd. 
No significant degradations were observed on SPEC cpu2006.

In addition to fixing the operand access problems, the patch looks for
loop-carried dependencies in innermost loops, and biases the reassociation so
that the phi target is summed last.  The purpose of this is to identify
accumulator variables in inner loops and make each iteration of their
accumulations independent.  When these loops are unrolled, multiple independent
iterations can be interleaved for improved performance.

The optimization is restricted to innermost loops to avoid unnecessarily
raising register pressure.

There may be a better way to achieve the bias than what I've chosen here, so
please comment.  If the general approach is acceptable, I'll apply comments and
submit the patch for approval.


  parent reply	other threads:[~2011-07-20 16:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 16:51 [Bug tree-optimization/49749] New: " wschmidt at gcc dot gnu.org
2011-07-14 19:23 ` [Bug tree-optimization/49749] " wschmidt at gcc dot gnu.org
2011-07-14 19:23 ` wschmidt at gcc dot gnu.org
2011-07-14 19:27 ` wschmidt at gcc dot gnu.org
2011-07-14 19:28 ` wschmidt at gcc dot gnu.org
2011-07-14 19:30 ` wschmidt at gcc dot gnu.org
2011-07-15 20:16 ` wschmidt at gcc dot gnu.org
2011-07-15 20:21 ` wschmidt at gcc dot gnu.org
2011-07-18  9:11 ` rguenth at gcc dot gnu.org
2011-07-20 16:30 ` wschmidt at gcc dot gnu.org [this message]
2011-07-20 16:39 ` wschmidt at gcc dot gnu.org
2011-07-20 19:02 ` wschmidt at gcc dot gnu.org
2011-07-21 12:07 ` rguenth at gcc dot gnu.org
2011-07-21 18:09 ` wschmidt at gcc dot gnu.org
2011-07-21 20:28 ` wschmidt at gcc dot gnu.org
2011-07-29 18:41 ` wschmidt at gcc dot gnu.org
2011-07-31 19:00 ` wschmidt at gcc dot gnu.org
2011-07-31 19:01 ` wschmidt at gcc dot gnu.org
2021-09-28 12:11 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-49749-4-anzoDinpTB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).