diff options
author | Eric Christopher <echristo@apple.com> | 2010-03-25 04:49:10 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-03-25 04:49:10 +0000 |
commit | f27e6088a3af277d5aeed7b554192cc62b7b40fd (patch) | |
tree | 7ca0b6f14a80866154443d116693c7b80c622363 /lib/Analysis/InlineCost.cpp | |
parent | 3d7d07ef038696cefcaf3ce5335072964199a78d (diff) |
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/InlineCost.cpp')
-rw-r--r-- | lib/Analysis/InlineCost.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index 5b8b53495c..c599e907eb 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 |