LWN.net Logo

Kernel, meet gcc

Kernel, meet gcc

Posted Jan 18, 2009 13:01 UTC (Sun) by rwmj (subscriber, #5474)
Parent article: Who is the best inliner of all?

I find it strange that there's this "wall" between the kernel developers and the gcc developers. If
there are problems with gcc's inlining, why don't the kernel developers submit patches to gcc to fix
them (or at least post test cases so the gcc devs can take a look).


(Log in to post comments)

Kernel, meet gcc

Posted Jan 19, 2009 1:44 UTC (Mon) by i3839 (guest, #31386) [Link]

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.

Kernel, meet gcc

Posted Jan 19, 2009 3:53 UTC (Mon) by dlang (✭ supporter ✭, #313) [Link]

in part because the gcc guys respond to the bug reports with claims that gcc is working as designed and there is nothing to fix.

Kernel, meet gcc

Posted Jan 20, 2009 4:36 UTC (Tue) by dvdeug (subscriber, #10998) [Link]

Which seems to be a pretty common reaction of kernel people, too, when people want to ignore what Posix says and what standard usage is, in exchange for "Do (what I think is) The Right Thing (for me)".

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