lkml.org 
[lkml]   [2008]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] prepare kconfig inline optimization for all architectures


On Sun, 27 Apr 2008, Adrian Bunk wrote:
>
> I'm looking at it from a different angle, all code in the kernel should
> follow the following rules [1]:
> - no functions in .c files should be marked inline
> - all functions in headers should be static inline
> - all functions in headers should either be very small or collapse
> to become very small after inlining
>
> I can simply not see any usecase for a non-forced inline in the kernel,
> and fixing the kernel should give a superset of the space savings of
> this "inline optimization".

Your whole argument is premised on the assumption that the compiler does
the right thing.

That's a *known*to*be*bogus* assumption.

Modern versions of gcc may do the right thing. Note the two very important
code-words: "modern" and "may".

I'm just telling you that

- older versions of gcc (and by "older" I do not mean "really ancient" or
"deprecated", but stuff that is still in use) are known to be total and
utter crap when it comes to inlining

- even absent that, there are historical reasons stemming from even more
ancient versions of gcc that are no longer in use.

In other words, my arguments have nothing to do with "I wish". They are
plain facts. Why argue with them?

Linus


\
 
 \ /
  Last update: 2008-04-27 19:37    [W:0.108 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site