This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: how to avoid default inlining of static functions at O3 ?


john wrote:

> I see that at optimization level O3, the compiler is defaultly inlining my static functions. Is there a way to avoid inlining static functions for C programs ?

That's kind of contradictory to what -O3 means, though.  -O3 tells gcc
to favor speed at any cost so in effect you are telling it to enable all
the optimizations that it might otherwise consider a poor tradeoff
because they bloat code size with extra inlining.  Consider using -Os if
you want less inlining.

Brian


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