This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Variable Expansion Optimization
- From: <tm_gccmail at kloo dot net>
- To: Revital Eres <ERES at il dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, Ayal Zaks <ZAKS at il dot ibm dot com>,Mircea Namolaru <NAMOLARU at il dot ibm dot com>
- Date: Tue, 17 Aug 2004 15:06:36 -0700 (PDT)
- Subject: Re: Variable Expansion Optimization
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?
Toshi