Loop unrolling
Scott A Crosby
crosby@qwes.math.cmu.edu
Wed Sep 16 21:52:00 GMT 1998
On Wed, 16 Sep 1998, Joern Rennecke wrote:
> It is a special case of loop unrolling. It is fairly easy to modify
> unroll.c to completely unroll all empty loops. The tricky part is that
> some loops might not terminate before unrolling, yet unrolling them
> completely removes them.
Also, you would want to rerun this pass multiple times, because you might
have multiple-nested empty loops. (I think this could happen when you
initializing a multidimensional array of objects.)
It would at least help a 'little' at speeding up template code and it
would definitely remove unnecessary do-nothing code, decreasing
code-bloat a small amount.
Scott
--
This message is copyright 1998 by Scott A Crosby. Unauthorized
reproduction or duplication if forbidden without the express permission of
the author.
More information about the Gcc
mailing list