[CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC
authorCraig Topper <craig.topper@gmail.com>
Wed, 15 Apr 2020 19:49:20 +0000 (12:49 -0700)
committerCraig Topper <craig.topper@gmail.com>
Wed, 15 Apr 2020 20:25:02 +0000 (13:25 -0700)
Differential Revision: https://reviews.llvm.org/D78227

llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp

index ea76358..2e2e8cd 100644 (file)
@@ -2656,8 +2656,8 @@ unswitchBestCondition(Loop &L, DominatorTree &DT, LoopInfo &LI,
 
       if (I.getType()->isTokenTy() && I.isUsedOutsideOfBlock(BB))
         return false;
-      if (auto CS = CallSite(&I))
-        if (CS.isConvergent() || CS.cannotDuplicate())
+      if (auto *CB = dyn_cast<CallBase>(&I))
+        if (CB->isConvergent() || CB->cannotDuplicate())
           return false;
 
       Cost += TTI.getUserCost(&I);