aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-03-25 04:49:10 +0000
committerEric Christopher <echristo@apple.com>2010-03-25 04:49:10 +0000
commitf27e6088a3af277d5aeed7b554192cc62b7b40fd (patch)
tree7ca0b6f14a80866154443d116693c7b80c622363 /lib/Analysis
parent3d7d07ef038696cefcaf3ce5335072964199a78d (diff)
downloadexternal_llvm-f27e6088a3af277d5aeed7b554192cc62b7b40fd.zip
external_llvm-f27e6088a3af277d5aeed7b554192cc62b7b40fd.tar.gz
external_llvm-f27e6088a3af277d5aeed7b554192cc62b7b40fd.tar.bz2
Reapply r99451 with a fix to move the NoInline check to the cost functions
instead of InlineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/InlineCost.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp
index 5b8b534..c599e90 100644
--- a/lib/Analysis/InlineCost.cpp
+++ b/lib/Analysis/InlineCost.cpp
@@ -255,9 +255,11 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS,
Function *Caller = TheCall->getParent()->getParent();
// Don't inline functions which can be redefined at link-time to mean
- // something else. Don't inline functions marked noinline.
+ // something else. Don't inline functions marked noinline or call sites
+ // marked noinline.
if (Callee->mayBeOverridden() ||
- Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee))
+ Callee->hasFnAttr(Attribute::NoInline) || NeverInline.count(Callee) ||
+ CS.isNoInline())
return llvm::InlineCost::getNever();
// InlineCost - This value measures how good of an inline candidate this call