From: Craig Topper Date: Wed, 15 Apr 2020 22:11:14 +0000 (-0700) Subject: [CallSite removal][CloneFunction] Use CallSite instead of CallBase. NFC X-Git-Tag: llvmorg-12-init~8888 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fbb804983d0b6478a5baba9a6c10bb06bc179b6f;p=platform%2Fupstream%2Fllvm.git [CallSite removal][CloneFunction] Use CallSite instead of CallBase. NFC Differential Revision: https://reviews.llvm.org/D78236 --- diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 1e020db..fce926f 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -367,8 +367,8 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, hasCalls |= (isa(II) && !isa(II)); if (CodeInfo) - if (auto CS = ImmutableCallSite(&*II)) - if (CS.hasOperandBundles()) + if (auto *CB = dyn_cast(&*II)) + if (CB->hasOperandBundles()) CodeInfo->OperandBundleCallSites.push_back(NewInst); if (const AllocaInst *AI = dyn_cast(II)) { @@ -424,8 +424,8 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, VMap[OldTI] = NewInst; // Add instruction map to value. if (CodeInfo) - if (auto CS = ImmutableCallSite(OldTI)) - if (CS.hasOperandBundles()) + if (auto *CB = dyn_cast(OldTI)) + if (CB->hasOperandBundles()) CodeInfo->OperandBundleCallSites.push_back(NewInst); // Recursively clone any reachable successor blocks. @@ -619,8 +619,9 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc, // Skip over non-intrinsic callsites, we don't want to remove any nodes from // the CGSCC. - CallSite CS = CallSite(I); - if (CS && CS.getCalledFunction() && !CS.getCalledFunction()->isIntrinsic()) + CallBase *CB = dyn_cast(I); + if (CB && CB->getCalledFunction() && + !CB->getCalledFunction()->isIntrinsic()) continue; // See if this instruction simplifies.