[PATCH] D152431: [Inliner] Handle convergence control when inlining a call
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 13:24:49 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/ConvergenceControlUsage.cpp:34
+ }
+ if (CB->getOperandBundle(LLVMContext::OB_convergencectrl).has_value())
+ return ConvergenceControlUsage::ControlledOps;
----------------
Don't think you need has_value()
================
Comment at: llvm/test/Transforms/Inline/convergence-inline.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -passes='cgscc(inline)' -S %s | FileCheck %s
+
----------------
Pre-commit test with baseline checks
================
Comment at: llvm/test/Transforms/Inline/convergence-inline.ll:101
+ call void @convergent_callee(i32 0) [ "convergencectrl"(token %tok.loop) ]
+ br i1 undef, label %hdr, label %end
+
----------------
Don't use branch on undef
================
Comment at: llvm/test/Transforms/Inline/convergence-inline.ll:106
+}
+
+declare void @f(i32) convergent
----------------
Add indirect with convergence bundle call? Also a recursive call?
================
Comment at: llvm/test/Transforms/Inline/convergence-inline.ll:108
+declare void @f(i32) convergent
+
+declare token @llvm.experimental.convergence.entry()
----------------
Test where a convergent call is passed as an argument to a call that also has a convergence token
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152431/new/
https://reviews.llvm.org/D152431
More information about the llvm-commits
mailing list