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

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 22:13:23 PDT 2024


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/80680 at github.com>


================
@@ -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) {
----------------
arsenm wrote:

Don't see the point of wrapping this in optional instead of just returning null. It's no safer and now requires more syntax 

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


More information about the cfe-commits mailing list