[CallSite removal][CodeGen] Use CallBase instead of CallSite in getNoopInput in Analy...
authorCraig Topper <craig.topper@gmail.com>
Mon, 13 Apr 2020 06:47:17 +0000 (23:47 -0700)
committerCraig Topper <craig.topper@gmail.com>
Mon, 13 Apr 2020 07:20:12 +0000 (00:20 -0700)
llvm/lib/CodeGen/Analysis.cpp

index 2a99592..487d9bf 100644 (file)
@@ -312,8 +312,8 @@ static const Value *getNoopInput(const Value *V,
       DataBits = std::min((uint64_t)DataBits,
                          I->getType()->getPrimitiveSizeInBits().getFixedSize());
       NoopInput = Op;
-    } else if (auto CS = ImmutableCallSite(I)) {
-      const Value *ReturnedOp = CS.getReturnedArgOperand();
+    } else if (auto *CB = dyn_cast<CallBase>(I)) {
+      const Value *ReturnedOp = CB->getReturnedArgOperand();
       if (ReturnedOp && isNoopBitcast(ReturnedOp->getType(), I->getType(), TLI))
         NoopInput = ReturnedOp;
     } else if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(V)) {