OSDN Git Service

[InlineCost] Remove redundant call. NFC.
authorChad Rosier <mcrosier@codeaurora.org>
Wed, 2 Aug 2017 14:50:27 +0000 (14:50 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Wed, 2 Aug 2017 14:50:27 +0000 (14:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309819 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/InlineCost.cpp

index efc8081..21de036 100644 (file)
@@ -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