https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223

--- Comment #14 from Fangrui Song <i at maskray dot me> ---
(In reply to Martin Liška from comment #13)
> What's likely missing is that the attribute should prevent inlining. I'm
> going to test how it behaves right now. Then, the issue can be closed.

It's not clear to me that no_profile_instrument_function should prevent
inlining. I'll argue that attributes should be orthogonal.
https://lists.llvm.org/pipermail/llvm-dev/2021-April/150062.html
https://reviews.llvm.org/D101011#2715555

If the user wants to suppress inlining, add noinline.

Can a no_profile_instrument_function function be inlined to another
no_profile_instrument_function function? Why not.

Can a no_profile_instrument_function function be inlined into a function
without the attribute? This may be controversial but I'd argue that it can. GCC
no_stack_protector behaves this way. no_profile_instrument_function can mean
that user does not want profiling when the function is called with its entity,
not via another entity.

Reply via email to