[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)
Nathan Gauër via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 05:55:25 PDT 2024
================
@@ -1130,8 +1130,92 @@ struct BitTest {
static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
};
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullptr otherwise.
+llvm::IntrinsicInst *getConvergenceToken(llvm::BasicBlock *BB) {
+ for (auto &I : *BB) {
+ auto *II = dyn_cast<llvm::IntrinsicInst>(&I);
+ if (II && isConvergenceControlIntrinsic(II->getIntrinsicID()))
+ return II;
+ }
+ return nullptr;
+}
+
} // namespace
+llvm::CallBase *
+CodeGenFunction::AddConvergenceControlAttr(llvm::CallBase *Input,
----------------
Keenuts wrote:
Thanks, done, Added `Token` to function name end, changed `Attr` to `Token`, and fixed case the first letters.
https://github.com/llvm/llvm-project/pull/80680
More information about the llvm-commits
mailing list