[PATCH] D78227: [CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 12:03:35 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: dblaikie, mtrofin.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78227

Files:
  llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp


Index: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2656,8 +2656,8 @@
 
       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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78227.257785.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/a7242099/attachment.bin>


More information about the llvm-commits mailing list