LWN.net Logo

Clang builds a working 2.6.36 Kernel

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 14:19 UTC (Tue) by mjw (subscriber, #16740)
In reply to: Clang builds a working 2.6.36 Kernel by jwakely
Parent article: Clang builds a working 2.6.36 Kernel

If so, try -funroll-loops, which isn't automatically done with gcc/g++, because it might create larger object code:

   -funroll-loops
       Unroll loops whose number of iterations can be determined at
       compile time or upon entry to the loop.  -funroll-loops implies
       -frerun-cse-after-loop, -fweb and -frename-registers.  It also
       turns on complete loop peeling (i.e. complete removal of loops with
       small constant number of iterations).  This option makes code
       larger, and may or may not make it run faster.


(Log in to post comments)

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 14:38 UTC (Tue) by juliank (subscriber, #45896) [Link]

> If so, try -funroll-loops, which isn't automatically
> done with gcc/g++, because it might create larger object code:

Brings it down to 0.200s

Clang builds a working 2.6.36 Kernel

Posted Oct 26, 2010 16:32 UTC (Tue) by gmaxwell (subscriber, #30048) [Link]

I believe that unrolling is enabled by default in GCC if you do a profile guided build.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds