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: g++ doesn't unroll a loop it should unroll


On Wed, 13 Dec 2006, Ian Lance Taylor wrote:
When I try it, gcc does unroll the loops.  It completely unrolls the
inner loop, but only partially unrolls the outer loop.  The reason it
doesn't completely unroll the outer loop is simply that gcc doesn't
attempt to completely unroll loops which contain inner loops.

OK, I don't have the skill to check the binary code. All I know is that with UNROLL defined it runs more than 5x faster, so there is room for improvement :)


This could probably be fixed: we could probably completely unroll a
loop if all its inner loop were completely unrolled.  I encourage you
to file a bug report.  See http://gcc.gnu.org/bugs.html.

OK: I didn't dare decide on my own that it's a bug, but if you say so... I file a bug report now.


Benoit


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