summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 14a40a4af76..4dd9544fc32 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/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();
}
OpenPOWER on IntegriCloud