[llvm] 592d8e7 - [CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 13:25:16 PDT 2020
Author: Craig Topper
Date: 2020-04-15T13:25:02-07:00
New Revision: 592d8e7d75cf4024f8104c68bb22f6cdbda6f0d5
URL: https://github.com/llvm/llvm-project/commit/592d8e7d75cf4024f8104c68bb22f6cdbda6f0d5
DIFF: https://github.com/llvm/llvm-project/commit/592d8e7d75cf4024f8104c68bb22f6cdbda6f0d5.diff
LOG: [CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC
Differential Revision: https://reviews.llvm.org/D78227
Added:
Modified:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
index ea763589372c..2e2e8cdb986b 100644
--- a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -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);
More information about the llvm-commits
mailing list