Loop unrolling
Jeffrey A Law
law@cygnus.com
Thu Sep 17 22:12:00 GMT 1998
In message < 199809171822.LAA23671@Canada.AI.SRI.COM >you write:
> The technical problems are:
>
> 1) Semi-reliably determine that a loop terminates (the constraint is
> all one-sided in that we can never delete a loop unless we can
> prove that it terminates).
Absolutely correct.
> 2) Determining whether a loop is empty or not needs some kind of
> register lifetime information. Last I looked, this was not
> reliable at the time of loop unrolling. If this is no longer true,
> then I can resurrect some code to do this.
Maybe I misunderstood the kinds of loops people wanted to eliminate.
I thought if they were empty there was nothing but an increment of
the counter, and a condjump back to the counter increment.
Obviously we can not eliminate a loop if we can not prove doing so
is safe.
jeff
More information about the Gcc
mailing list