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

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 01:46:32 PDT 2024


================
@@ -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();
----------------
Keenuts wrote:

Not necessarily. The SPIR-V compute (as OpenCL not Vulkan compute) doesn't require a structured CFG, so this could remain forever if they don't see any benefit in generating a SCFG.

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


More information about the cfe-commits mailing list