Variable Expansion Optimization

Ayal Zaks ZAKS@il.ibm.com
Mon Aug 16 13:41:00 GMT 2004


Michael Matz <matz@suse.de> wrote on 16/08/2004 14:14:13:

> Hi,
>
> On Mon, 16 Aug 2004, Steven Bosscher wrote:
>
> > > On Sun, 15 Aug 2004, Steven Bosscher wrote:
> > > > Hmm, I guess you're going to have carefully analyze what the
> > > > effects of such a transformation are on register pressure.
> > >
> > > Yes.  But note that this transformation mainly helps an
autovectorizer.
> >
> > Not in this case, it doesn't.  The current proposal is to do this
> > transformation on RTL.
>
> Indeed.  I misread the intention.  So it really is just useful for
> breaking dependencies over multiple iterations.  That would need even
more
> careful heuristics to not pessimize code, especially on ooo processors
> where a little better scheduling can be more than offset by register
> pressure and spills.

Note that even if/when/where the autovectorizer breaks one accumulator into
a vector of accumulators, subsequent loop unrolling can parallelize the
accumulation further into several accumulator-vectors. The execution of
some loops is constrained (only) by such true-dependence cycles, which ooo
cannot remedy. All this should be done (not over-done), of-course, without
causing register spills.

Ayal.



More information about the Gcc mailing list