This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variable Expansion Optimization


<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
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]