From 7ab6937c028793e630f54d5df62f6e05a46e0560 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Wed, 2 Aug 2017 14:50:27 +0000 Subject: [PATCH] [InlineCost] Remove redundant call. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309819 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/InlineCost.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/InlineCost.cpp b/lib/Analysis/InlineCost.cpp index efc808140cf..21de036d98a 100644 --- a/lib/Analysis/InlineCost.cpp +++ b/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 -- 2.40.0