Re: RFC: Link Time Optimization support for the kernel

From: Avi Kivity
Date: Tue Aug 21 2012 - 10:26:24 EST


On 08/21/2012 10:49 AM, Ingo Molnar wrote:
>
> Can the current implementation of LTO optimize to the level of
> inlining? A lot of our include file hell situation results from
> the desire to declare structures publicly so that inlined
> functions can use them directly.
>
> If data structures could be encapsulated/internalized to
> subsystems and only global functions are exposed to other
> subsystems [which are then LTO optimized] then our include
> file dependencies could become a *lot* simpler.

I think modules break this (if I understand what you mean correctly).
If the main kernel exposes symbol x as a global function, then lto will
not inline it into a module.

--
error compiling committee.c: too many arguments to function
--
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/