summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2017-08-02 14:50:27 +0000
committerChad Rosier <mcrosier@codeaurora.org>2017-08-02 14:50:27 +0000
commit5ce28f4f9232935c3f7e4f1dc5894bb1102ecbc9 (patch)
tree53edf7100f494684cb56a7e3a9f70b746a899c4c /llvm/lib/Analysis/InlineCost.cpp
parent3d1a2147ea75e042af4333ed3ea674ac9944eaae (diff)
downloadbcm5719-llvm-5ce28f4f9232935c3f7e4f1dc5894bb1102ecbc9.tar.gz
bcm5719-llvm-5ce28f4f9232935c3f7e4f1dc5894bb1102ecbc9.zip
[InlineCost] Remove redundant call. NFC.
llvm-svn: 309819
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index efc808140cf..21de036d98a 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1636,11 +1636,12 @@ InlineCost llvm::getInlineCost(
// Never inline functions with conflicting attributes (unless callee has
// always-inline attribute).
- if (!functionsHaveCompatibleAttributes(CS.getCaller(), Callee, CalleeTTI))
+ Function *Caller = CS.getCaller();
+ if (!functionsHaveCompatibleAttributes(Caller, Callee, CalleeTTI))
return llvm::InlineCost::getNever();
// Don't inline this call if the caller has the optnone attribute.
- if (CS.getCaller()->hasFnAttribute(Attribute::OptimizeNone))
+ if (Caller->hasFnAttribute(Attribute::OptimizeNone))
return llvm::InlineCost::getNever();
// Don't inline functions which can be interposed at link-time. Don't inline
OpenPOWER on IntegriCloud