[PATCH] D153744: [LoopUnroll] adjust for new `convergent` semantics
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 09:27:18 PDT 2023
sameerds marked 2 inline comments as done.
sameerds added inline comments.
================
Comment at: llvm/lib/Analysis/CodeMetrics.cpp:114-126
+static bool isConvergenceCtrlIntr(const Instruction &I) {
+ auto *Intrinsic = dyn_cast<IntrinsicInst>(&I);
+ if (!Intrinsic)
+ return false;
+ switch (Intrinsic->getIntrinsicID()) {
+ case Intrinsic::experimental_convergence_entry:
----------------
arsenm wrote:
> It might be worth introducing a ConvergenceControlInst subclass of IntrinsicInst
I suppose so, but it seems too early to attempt for an experimental feature!
================
Comment at: llvm/lib/Transforms/Utils/LoopUnroll.cpp:402-427
+ bool HasOutsideConvergenceControl = false;
+ for (auto &BB : L->blocks()) {
+ for (auto &I : *BB) {
+ if (auto *CB = dyn_cast<CallBase>(&I)) {
+ if (CB->isConvergent()) {
+ auto control =
+ CB->getOperandBundle(LLVMContext::OB_convergencectrl);
----------------
arsenm wrote:
> This is a lot for one LLVM_DEBUG, move this all to a function?
Fixed by moving it out into a function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153744/new/
https://reviews.llvm.org/D153744
More information about the llvm-commits
mailing list