* Disabling the heuristic inliner
@ 2007-12-20 1:29 Shaun Jackman
2007-12-20 3:09 ` Shaun Jackman
0 siblings, 1 reply; 5+ messages in thread
From: Shaun Jackman @ 2007-12-20 1:29 UTC (permalink / raw)
To: gcc
Is it possible to disable the heuristic inline function logic? I would
like to select the following behaviour:
* all static inline functions are always inlined
* all static functions that are called once are inlined
(-finline-functions-called-once)
* no other functions are inlined
I'm using -Os and I'm trying to find the right combination of -f
switches to enable this behaviour. I tried
-finline-limit=1 -finline-functions-called-once
but it caused static inline functions to not be inlined.
Thanks,
Shaun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disabling the heuristic inliner
2007-12-20 1:29 Disabling the heuristic inliner Shaun Jackman
@ 2007-12-20 3:09 ` Shaun Jackman
0 siblings, 0 replies; 5+ messages in thread
From: Shaun Jackman @ 2007-12-20 3:09 UTC (permalink / raw)
To: gcc
Is there a switch to never inline a non-static function?
Thanks,
Shaun
On Dec 19, 2007 6:25 PM, Shaun Jackman <sjackman@gmail.com> wrote:
> Is it possible to disable the heuristic inline function logic? I would
> like to select the following behaviour:
>
> * all static inline functions are always inlined
> * all static functions that are called once are inlined
> (-finline-functions-called-once)
> * no other functions are inlined
>
> I'm using -Os and I'm trying to find the right combination of -f
> switches to enable this behaviour. I tried
> -finline-limit=1 -finline-functions-called-once
> but it caused static inline functions to not be inlined.
>
> Thanks,
> Shaun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disabling the heuristic inliner
2009-11-19 1:22 ` Shaun Jackman
@ 2009-11-19 2:43 ` Paolo Carlini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Carlini @ 2009-11-19 2:43 UTC (permalink / raw)
To: gcc; +Cc: sjackman
On 11/19/2009 02:21 AM, Shaun Jackman wrote:
> I haven't done a lot of testing, but
> -Os -fno-inline-small-functions
> seems to accomplish this.
>
Note that this issue really doesn't qualify for gcc, gcc-help is more
suited.
Anyway, there are some attributes available, which probably you can find
useful, like always_inline, see the docs for details.
Paolo.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Disabling the heuristic inliner
2009-11-18 23:21 Shaun Jackman
@ 2009-11-19 1:22 ` Shaun Jackman
2009-11-19 2:43 ` Paolo Carlini
0 siblings, 1 reply; 5+ messages in thread
From: Shaun Jackman @ 2009-11-19 1:22 UTC (permalink / raw)
To: gcc
2009/11/18 Shaun Jackman <sjackman@gmail.com>:
> Is it possible to disable the heuristic inline function logic? I would
> like the following behaviour:
>
> * static inline functions are always inlined
> * non-static functions are never inlined
> * static functions that are called once are inlined
> * static functions that are called more than once are not inlined
>
> I'm using -Os, and I'm trying to find the right combination of -f
> switches to enable this behaviour.
>
> Thanks,
> Shaun
I haven't done a lot of testing, but
-Os -fno-inline-small-functions
seems to accomplish this.
Cheers,
Shaun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Disabling the heuristic inliner
@ 2009-11-18 23:21 Shaun Jackman
2009-11-19 1:22 ` Shaun Jackman
0 siblings, 1 reply; 5+ messages in thread
From: Shaun Jackman @ 2009-11-18 23:21 UTC (permalink / raw)
To: gcc
Is it possible to disable the heuristic inline function logic? I would
like the following behaviour:
* static inline functions are always inlined
* non-static functions are never inlined
* static functions that are called once are inlined
* static functions that are called more than once are not inlined
I'm using -Os, and I'm trying to find the right combination of -f
switches to enable this behaviour.
Thanks,
Shaun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-19 2:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-20 1:29 Disabling the heuristic inliner Shaun Jackman
2007-12-20 3:09 ` Shaun Jackman
2009-11-18 23:21 Shaun Jackman
2009-11-19 1:22 ` Shaun Jackman
2009-11-19 2:43 ` Paolo Carlini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).