[PATCH] D78236: [CallSite removal][CloneFunction] Use CallSite instead of CallBase. NFC
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 16:02:34 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfbb804983d0b: [CallSite removal][CloneFunction] Use CallSite instead of CallBase. NFC (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78236/new/
https://reviews.llvm.org/D78236
Files:
llvm/lib/Transforms/Utils/CloneFunction.cpp
Index: llvm/lib/Transforms/Utils/CloneFunction.cpp
===================================================================
--- llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -367,8 +367,8 @@
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 @@
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 @@
// 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78236.257883.patch
Type: text/x-patch
Size: 1462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/539b14be/attachment.bin>
More information about the llvm-commits
mailing list