gcc loop unrolling problem ??

Jan Hubicka jh@suse.cz
Thu Feb 12 16:18:00 GMT 2004


> Matt Fago wrote:
> 
> >My code contains quite a few simple loops with 9 iterations. While I'm 
> >surprised that gcc doesn't attempt to completely unroll these, I do 
> >agree that doing so will not necessarily improve performance.
> 
> What's important to realize is that unrolling such a loop fully may
> well *degrade* performance by increasing I-cache pressure without
> any compensating gain.

The bound on 8 unrollings is pretty artifical.  We do have other bound
specifying the size of loop to reach.  Perhaps you can try benchmark on
the code and tell us how it works when the loop is unrolled 9 times.

Honza



More information about the Gcc mailing list