LWN.net Logo

Kernel, meet gcc

Kernel, meet gcc

Posted Jan 19, 2009 1:44 UTC (Mon) by i3839 (guest, #31386)
In reply to: Kernel, meet gcc by rwmj
Parent article: Who is the best inliner of all?

At least two reasons:

- The kernel is special, not at all like most other code, so gcc behaviour that is considered wrong for the kernel is in other cases perfectly fine.

- The kernel supports all kind of gcc versions, so fixing something in newer versions isn't enough. The problem is worked around one way or the other, reducing the need to change gcc.

Other reason is that optimising is a very difficult problem, and cases where gcc does the wrong thing are in general not easy to fix, because it needs a lot of restructuring.

As the posted numbers have shown, gcc almost always does the right thing. Unfortunately, doing it wrong only for a couple functions can be quite bad.


(Log in to post comments)

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