[cfe-dev] always_inline and noinline attributes
dpatel at apple.com
Wed Jul 23 16:46:46 PDT 2008
On Jul 23, 2008, at 3:10 PM, Matthijs Kooijman wrote:
> With plain gcc I assume?
> I was thinking of doing this stripping in the tool generating the
> LLVM module,
> so opt (or perhaps clang?). It should always be able to just throw
> away the
> always_inline global and the function should then be just a normal
> I'm not sure if having such a strip-always_inline option is needed,
> at least
> not if the default is to preserve always_inline information.
What I'm worried is - if always_inline info is not stripped away the
LTO inliner will obey always_inline. In this case, it is not
appropriate to say "LTO may not inline functions, marked as
always_inline", across translation unit".
> I was proposing
> this option, because IIRC someone proposed or implied throwing away
> always_inline info by default.
> Devang, if I see this right, you agree with me that the combination
> of 2) and
> b) are the "right" ones?
Yes. Otherwise, if we want to restrict enforcing always_inline across
translation unit then we need to encode "always_inline in module XYZ"
in LLVM IR, not just "always_inline".
More information about the cfe-dev