This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Re-run of loop pass
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Re-run of loop pass
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 23 Oct 1998 00:18:50 -0600
- cc: Toon Moene <toon at moene dot indiv dot nluug dot nl>, Richard Henderson <rth at cygnus dot com>, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <13871.53637.686739.360606@ongaonga.elec.canterbury.ac.nz>you writ
e:
> Michael Hayes writes:
> > I've done some experimentation with this code snippet. With
> > -funroll-loops or BCT optimisation the generated code is _attrocious_
> > since the constant iteration count cannot be determined. The patch at
> > the end seems to fix this problem...
>
> I've come up with a better patch that tries to determine what the
> expressions for the loop initial and final values are if they are not
> constant. If the initial and final expressions are the sum of an
> equivalent base register and some constants, then the initial and
> final values are replaced with the constants. The number of loop
> iterations is now simply calculable and thus the loop unroll and loop
> BCT optimisations are happy.
Does this latest version subsume your earlier unroll.c changes?
[ Still catching up after being away for a few days... ]
jeff