[clang] [clang][SPIR-V] Always add convergence intrinsics (PR #88918)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 10:54:22 PDT 2024


Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
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/88918 at github.com>


================
@@ -1586,6 +1586,12 @@ class CodeGenModule : public CodeGenTypeCache {
   void AddGlobalDtor(llvm::Function *Dtor, int Priority = 65535,
                      bool IsDtorAttrFunc = false);
 
+  // Return whether structured convergence intrinsics should be generated for
+  // this target.
+  bool shouldEmitConvergenceTokens() const {
+    return getTriple().isSPIRVLogical();
----------------
arsenm wrote:

This doesn't have anything to do with what the target wants to do with with the CFG lowering. Structurally the IR should not allow uncontrolled convergence, and that it exists is a wart that needs to exist until everywhere handles convergence tokens 

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


More information about the cfe-commits mailing list