From 592d8e7d75cf4024f8104c68bb22f6cdbda6f0d5 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 15 Apr 2020 12:49:20 -0700 Subject: [PATCH] [CallSite removal][SimpleLoopUnswitch] Use CallBase instead of CallSite. NFC Differential Revision: https://reviews.llvm.org/D78227 --- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp index ea76358..2e2e8cd 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(&I)) + if (CB->isConvergent() || CB->cannotDuplicate()) return false; Cost += TTI.getUserCost(&I); -- 2.7.4