Re: GCC 3.4 and broken inlining.

From: Andi Kleen
Date: Sun Jul 11 2004 - 00:55:01 EST


On Sat, Jul 10, 2004 at 06:25:52PM -0300, Alexandre Oliva wrote:
> > And then just mark the function you know needs to be inlined
> > as __always_inline__.
>
> It's probably a good idea to define such functions as `extern inline'
> (another GCC extension), such that a definition of the function is
> never emitted, and you get a linker error if the compiler somehow
> fails to emit an error on a failure to inline the function.

That used to be done in the past for all functions, but it was
stopped because gcc suddenly stopped inlining functions it did previously
and it caused a lot of spurious linker errors.

I guess it could be readded if the inlining heuristics were fixed,
but even in gcc 3.5 it still looks quite bleak.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/