[clang] [llvm] [OpenMP][Clang] Add no-loop SPMD kernel promotion (PR #205325)

Robert Imschweiler via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 30 04:34:33 PDT 2026


================
@@ -66,6 +66,15 @@ static bool canEmitGPUFusedDistSchedule(const CodeGenModule &CGM,
          !S.getSingleClause<OMPOrderedClause>();
 }
 
+static bool canEmitGPUNoLoopKernel(CodeGenModule &CGM,
+                                   const OMPLoopDirective &S) {
+  const auto *D = dyn_cast<OMPTargetTeamsDistributeParallelForDirective>(&S);
+  return CGM.getLangOpts().OpenMPIRBuilder && S.getLoopsNumber() == 1 &&
----------------
ro-i wrote:

... this?

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


More information about the cfe-commits mailing list