public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "William J. Schmidt" <wschmidt@linux.vnet.ibm.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: Nathan Froyd <froydnj@codesourcery.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR46728 (move pow/powi folds to tree phases)
Date: Sat, 14 May 2011 01:09:00 -0000	[thread overview]
Message-ID: <1305323758.4889.75.camel@L3G5336.ibm.com> (raw)
In-Reply-To: <1305301921.4889.20.camel@L3G5336.ibm.com>

On Fri, 2011-05-13 at 10:52 -0500, William J. Schmidt wrote:
> On Fri, 2011-05-13 at 17:26 +0200, Richard Guenther wrote:

 -- snip --

> > 
> > The position of the pass is odd - why did you place it there?  I would
> > have placed it alongside pass_cse_sincos and pass_optimize_bswap.
> 
> That was where I wanted it initially also, but this seems necessary for
> the pass to run unconditionally.  If I recall correctly,
> gate_all_optimizations() was kicking in at -O0, so I had to move it
> earlier.

As an alternative, I could reinstate the "expand" transformations to
kick in when the lower_pow pass is disabled.  I can then move the
lower_pow pass to the neighborhood of pass_cse_sincos and
pass_optimize_bswap, and limit it to -O1 and above.  Optionally, I could
gate it on flag_expensive_optimizations as Nathan suggested, though that
is perhaps not appropriate for a simple linear scan.

I did a quick regtest of this and it held up without regressions.  Let
me know if you'd prefer me to implement it that way.  I'd probably vote
for it myself, as I wasn't happy with extra compile time at -O0 either.
Just a matter of whether we want to tolerate duplicated logic to avoid
that.

  reply	other threads:[~2011-05-13 21:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13 15:58 William J. Schmidt
2011-05-13 16:11 ` Nathan Froyd
2011-05-13 16:31   ` Richard Guenther
2011-05-13 16:31     ` William J. Schmidt
2011-05-14  1:09       ` William J. Schmidt [this message]
2011-05-13 17:25     ` Nathan Froyd
2011-05-16 15:52       ` Richard Guenther
2011-05-16 17:07 ` Richard Guenther
2011-05-16 19:49   ` William J. Schmidt
2011-05-17 13:00     ` Richard Guenther
2011-05-17 14:11       ` William J. Schmidt

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=1305323758.4889.75.camel@L3G5336.ibm.com \
    --to=wschmidt@linux.vnet.ibm.com \
    --cc=froydnj@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).