Loop unrolling

Jeffrey A Law law@cygnus.com
Fri Sep 18 23:50:00 GMT 1998


  In message < 3602E6AF.ECC8E445@nospam.cantrip.org >you write:
  > Generally the kinds of "empty" loops that show up in template 
  > expansions look something like:
  > 
  >   for (i = 0; i < 0; ++i) *p++ = *q++;
That's not empty though :-)

The compiler is certainly free to unroll it fully though.

  > or probably more frequently
  >    
  >   for (i = 0; i < 10; ++i, ++p) { if (p); }
Not sure if this would be considered empty either.  

jeff



More information about the Gcc mailing list