[cfe-dev] NormalInlining pass run only at > O1
Chris Lattner
clattner at apple.com
Tue Mar 8 09:33:38 PST 2011
On Mar 8, 2011, at 9:09 AM, Roman Divacky wrote:
> hi,
>
> there's this code in CompilerInvocation.cpp:
>
>
> Opts.Inlining = (Opts.OptimizationLevel > 1) ? CodeGenOptions::NormalInlining
> : CodeGenOptions::OnlyAlwaysInlining;
>
>
> ie. for all optimization levels below -O2 only the OnlyAlwaysInlining pass
> is run. why is it so? it makes more sense to me to run NormalInlining
> at -O1 too.
>
> can someone shed some light on this?
Hi Roman,
-O1 is intended to only do simple intraprocedural optimizations. Inlining isn't one of those. What is your use case for -O1?
-Chris
More information about the cfe-dev
mailing list