This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc loop unrolling problem ??
> 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