summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitbb4ed2394b185a0c86edb3a248bc19ba8ae8e6e6 (patch)
treea1188c2b6261952e6ed7643cc1fc89b2113e54f4 /llvm/lib
parentcd4c17aeaf2371a9cd9befb35768ea2ae520630b (diff)
downloadbcm5719-llvm-bb4ed2394b185a0c86edb3a248bc19ba8ae8e6e6.tar.gz
bcm5719-llvm-bb4ed2394b185a0c86edb3a248bc19ba8ae8e6e6.zip
Allow -inline-threshold override default threshold even if compiling to optimize for size.
llvm-svn: 83274
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 61772651583..c38cf82a692 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud