This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Variable Expansion Optimization
- From: Ayal Zaks <ZAKS at il dot ibm dot com>
- To: <tm_gccmail at kloo dot net>
- Cc: gcc at gcc dot gnu dot org, Mircea Namolaru <NAMOLARU at il dot ibm dot com>, Revital Eres <ERES at il dot ibm dot com>, Mostafa Hagog <MUSTAFA at il dot ibm dot com>
- Date: Wed, 18 Aug 2004 03:28:13 +0300
- Subject: 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
>
>