summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
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
commit20a6a27beacccf89ba7ad015fd98fa206637e9f1 (patch)
treeb2cca2eb8d6268801d752beed74402c07eb3a6f8 /lib/Transforms/IPO
parent234227f375ea141f7b1759614c368b7b230bda86 (diff)
downloadllvm-20a6a27beacccf89ba7ad015fd98fa206637e9f1.tar.gz
llvm-20a6a27beacccf89ba7ad015fd98fa206637e9f1.tar.bz2
llvm-20a6a27beacccf89ba7ad015fd98fa206637e9f1.tar.xz
Check the alwaysinline attribute on the call as well as on the caller.
Differential Revision: http://reviews.llvm.org/D3815 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/InlineAlways.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/InlineAlways.cpp b/lib/Transforms/IPO/InlineAlways.cpp
index c5d9546cce..624cb90c0d 100644
--- a/lib/Transforms/IPO/InlineAlways.cpp
+++ b/lib/Transforms/IPO/InlineAlways.cpp
@@ -95,8 +95,7 @@ InlineCost AlwaysInliner::getInlineCost(CallSite CS) {
// that are viable for inlining. FIXME: We shouldn't even get here for
// declarations.
if (Callee && !Callee->isDeclaration() &&
- Callee->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
- Attribute::AlwaysInline) &&
+ CS.hasFnAttr(Attribute::AlwaysInline) &&
ICA->isInlineViable(*Callee))
return InlineCost::getAlways();