Variable Expansion Optimization

Ayal Zaks ZAKS@il.ibm.com
Wed Aug 18 00:40:00 GMT 2004


<tm_gccmail@kloo.net> wrote on 18/08/2004 01:06:36:

>
>
> On Sun, 15 Aug 2004, Revital Eres wrote:
>
> > The variable expansion optimization will expand the variable
> > sum into n separate copies, one for each copy of the loop body
> > and combine them at the loop exit:
> >
> > sum += a[i]
> > ....
> > i = i+1;
> > sum1 += a[i]
> > ....
> > i = i+1
> > sum2 += a[i];
> > ....
> >
> > This transformation decreases the number of dependences
> > in the loop, thus making instruction scheduling
> > more effective when applied on it.
>
> Well, as long as you don't exceed the number of hard registers, sure.
>
> Have you considered how to limit the number of hard registers used?

You mean how do we know our register budget, or what do we do if the budget
is small? The former is also considered for the modulo-scheduler. The
latter is pretty straightforward for this transformation.

Ayal.


>
> Toshi
>
>




More information about the Gcc mailing list