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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |documentation

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>It says: "For a function marked with this attribute, every call inside this 
>function is inlined, if possible." The call to foo() is not directly inside 
>the function bar().

The definition of "every call" is definitely ambious in the documentation. It
could mean every mentioned call or it could mean recusively every call. In this
case, it means flatten all calls including ones called from other functions
("indirectly"). It was originally added to workaround some (not so good)
inlining heurstics at the time for some C++ code (early 2000s).  inlining
heurstics has changed since then and has gotten better over the years so folks
don't use it as much.

Also if you have any code where GCC's inlining heurstics does not do what you
think it should please file that so we can improve them instead of workarounds
like always_inline and flatten don't need to be used ...

Reply via email to