This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 3.0 -finline-limit and c++


In message <200106041741.KAA06278@atrus.synopsys.com>, Joe Buck writes:
>Teemu Torma writes:
>> ....  In many cases the inline function is so simple, that inlining
>> takes the same space or less than the function call itself would.  That
>> is exactly why I don't like the idea to stop inlining completely at some
>> point, whilst bigger functions were inlined before.
>
>This is why -Os does not turn off inlining.  Rather, it sets the threshold
>such that functions will still be inlined if the inlined call is about
>the same size or less as the code to pass the arguments and call the
>function.

Sounds to me like a useful incremental mod of the current heuristic
would be to move to the -Os strategy once the size threshold is
reached.  The way the current strategy is coded in
function_cannot_inline_p() looks a little obscure to me though.

Anyone familiar with this code who could try it out?

-------------------------------------------------------------------------------
Lee Iverson     		SRI International
leei@ai.sri.com			333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/	(650) 859-3307



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]