diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2014-05-19 18:25:54 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2014-05-19 18:25:54 +0000 |
commit | 20a6a27beacccf89ba7ad015fd98fa206637e9f1 (patch) | |
tree | b2cca2eb8d6268801d752beed74402c07eb3a6f8 /lib/Analysis | |
parent | 234227f375ea141f7b1759614c368b7b230bda86 (diff) | |
download | llvm-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/Analysis')
-rw-r--r-- | lib/Analysis/IPA/InlineCost.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/InlineCost.cpp b/lib/Analysis/IPA/InlineCost.cpp index 358f61fd52..66f3f8e025 100644 --- a/lib/Analysis/IPA/InlineCost.cpp +++ b/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(); |