aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-04 06:13:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-04 06:13:54 +0000
commita0479e53323ade402272ddf8302c8aa2c496c775 (patch)
treef3a8b02b6706e1c40a8911e31fcf72223cd45279
parentd113c6b601c778a85443cb4b4c80452e92c1fb8e (diff)
Allow -inline-threshold override default threshold even if compiling to optimize for size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83274 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/Inliner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp
index 6177265158..c38cf82a69 100644
--- a/lib/Transforms/IPO/Inliner.cpp
+++ b/lib/Transforms/IPO/Inliner.cpp
@@ -192,6 +192,7 @@ bool Inliner::shouldInline(CallSite CS) {
Function *Fn = CS.getCaller();
if (Fn && !Fn->isDeclaration() &&
Fn->hasFnAttr(Attribute::OptimizeForSize) &&
+ InlineLimit.getNumOccurrences() == 0 &&
InlineThreshold != 50)
CurrentThreshold = 50;