summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-05-19 18:25:54 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-05-19 18:25:54 +0000
commit68a889757dec7f4b6d7e2e87863f3152bb0603c3 (patch)
tree97731338e18963b8eed6d1576829f4b4270637ad /llvm/lib/Analysis
parent230c5eb4bde7314331ae5c0bca65087ed504202c (diff)
downloadbcm5719-llvm-68a889757dec7f4b6d7e2e87863f3152bb0603c3.tar.gz
bcm5719-llvm-68a889757dec7f4b6d7e2e87863f3152bb0603c3.zip
Check the alwaysinline attribute on the call as well as on the caller.
Differential Revision: http://reviews.llvm.org/D3815 llvm-svn: 209150
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/IPA/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/InlineCost.cpp b/llvm/lib/Analysis/IPA/InlineCost.cpp
index 358f61fd523..66f3f8e0252 100644
--- a/llvm/lib/Analysis/IPA/InlineCost.cpp
+++ b/llvm/lib/Analysis/IPA/InlineCost.cpp
@@ -1259,7 +1259,7 @@ InlineCost InlineCostAnalysis::getInlineCost(CallSite CS, Function *Callee,
// Calls to functions with always-inline attributes should be inlined
// whenever possible.
- if (Callee->hasFnAttribute(Attribute::AlwaysInline)) {
+ if (CS.hasFnAttr(Attribute::AlwaysInline)) {
if (isInlineViable(*Callee))
return llvm::InlineCost::getAlways();
return llvm::InlineCost::getNever();
OpenPOWER on IntegriCloud