aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2020-04-15 15:11:14 -0700
committerCraig Topper <craig.topper@gmail.com>2020-04-15 15:38:02 -0700
commitfbb804983d0b6478a5baba9a6c10bb06bc179b6f (patch)
treea0d6446a29df691089bec19931e7aa1b96a1174c /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent8a9d48b46d4f0ebaa887921af6d8471be1080c63 (diff)
downloadllvm-fbb804983d0b6478a5baba9a6c10bb06bc179b6f.zip
llvm-fbb804983d0b6478a5baba9a6c10bb06bc179b6f.tar.gz
llvm-fbb804983d0b6478a5baba9a6c10bb06bc179b6f.tar.bz2
[CallSite removal][CloneFunction] Use CallSite instead of CallBase. NFC
Differential Revision: https://reviews.llvm.org/D78236
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp13
1 files changed, 7 insertions, 6 deletions
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<CallInst>(II) && !isa<DbgInfoIntrinsic>(II));
if (CodeInfo)
- if (auto CS = ImmutableCallSite(&*II))
- if (CS.hasOperandBundles())
+ if (auto *CB = dyn_cast<CallBase>(&*II))
+ if (CB->hasOperandBundles())
CodeInfo->OperandBundleCallSites.push_back(NewInst);
if (const AllocaInst *AI = dyn_cast<AllocaInst>(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<CallBase>(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<CallBase>(I);
+ if (CB && CB->getCalledFunction() &&
+ !CB->getCalledFunction()->isIntrinsic())
continue;
// See if this instruction simplifies.