diff options
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r-- | tools/opt/opt.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 14a40a4af7..4dd9544fc3 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -210,14 +210,7 @@ static void AddOptimizationPasses(PassManagerBase &MPM,FunctionPassManager &FPM, if (DisableInline) { // No inlining pass } else if (OptLevel > 1) { - unsigned Threshold = 225; - if (SizeLevel == 1) // -Os - Threshold = 75; - else if (SizeLevel == 2) // -Oz - Threshold = 25; - if (OptLevel > 2) - Threshold = 275; - Builder.Inliner = createFunctionInliningPass(Threshold); + Builder.Inliner = createFunctionInliningPass(OptLevel, SizeLevel); } else { Builder.Inliner = createAlwaysInlinerPass(); } |