[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 12 06:45:08 PDT 2024


================
@@ -1130,8 +1130,96 @@ struct BitTest {
 
   static BitTest decodeBitTestBuiltin(unsigned BuiltinID);
 };
+
+// Returns the first convergence entry/loop/anchor instruction found in |BB|.
+// std::nullopt otherwise.
+std::optional<llvm::IntrinsicInst *> getConvergenceToken(llvm::BasicBlock *BB) {
----------------
Keenuts wrote:

No strong opinion. My rational is if you read "optional", you know it's not always there. But I'm fine with the pointer, changed to pointer.

https://github.com/llvm/llvm-project/pull/80680


More information about the cfe-commits mailing list