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 via email to