This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]