This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0 -finline-limit and c++
- To: Joe Buck <jbuck at synopsys dot COM>
- Subject: Re: 3.0 -finline-limit and c++
- From: Lee Iverson <leei at AI dot SRI dot COM>
- Date: Mon, 04 Jun 2001 16:25:48 -0700
- cc: teemu at torma dot org (Teemu Torma), mrs at windriver dot com (mike stump), gcc at gcc dot gnu dot org
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