[llvm-branch-commits] [clang] [CIR][OpenMP] Add support for omp teams (PR #231982)

Kevin Sala Penades via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Nov 12 18:06:05 PST 2026


================
@@ -205,6 +206,62 @@ static mlir::LogicalResult emitParallel(
                         emitBody);
 }
 
+/// Evaluates the clauses allowed on an omp.teams leaf; none are supported
+/// yet, so every eligible clause is reported as NYI.
+static mlir::LogicalResult
+emitTeamsClauses(CIRGenFunction &cgf, CIRGenModule &cgm,
+                 CIRGenBuilderTy &builder, mlir::Location loc,
+                 llvm::ArrayRef<const OMPClause *> clauses,
+                 mlir::omp::TeamsOperands &clauseOps) {
+  OpenMPClauseEmitter ce(cgf, cgm, builder, loc, clauses);
+  return ce.emitNYI</*supported=*/>(
+      /*nyi=*/OpenMPNYIClauseList<
+          OMPAllocateClause, OMPDefaultClause, OMPDynGroupprivateClause,
+          OMPFirstprivateClause, OMPIfClause, OMPNumTeamsClause,
+          OMPPrivateClause, OMPReductionClause, OMPSharedClause,
+          OMPThreadLimitClause, OMPXAttributeClause>{},
----------------
kevinsala wrote:

OpenMP 6.1 (just released) introduces the `message` clause in the teams construct. It's likely worth adding `OMPMessageClause` here, as done for dyn_groupprivate.

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


More information about the llvm-branch-commits mailing list