[llvm] [OpenMP] Add definitions of FLATTEN and SPLIT to OMP.td (PR #185642)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 06:04:21 PDT 2026
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/185642
Add the definitions of the "flatten" and the "split" constructs to the OMP.td file. This will allow the implementation efforts in clang and flang to proceed independently.
There is no other functionality added in this patch.
>From 8b790f8a830b50f3ad9d334a864225b1472f7764 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Tue, 10 Mar 2026 07:24:50 -0500
Subject: [PATCH] [OpenMP] Add definitions of FLATTEN and SPLIT to OMP.td
Add the definitions of the "flatten" and the "split" constructs
to the OMP.td file. This will allow the implementation efforts
in clang and flang to proceed independently.
There is no other functionality added in this patch.
---
llvm/include/llvm/Frontend/OpenMP/OMP.td | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 865cad7769554..cb688959f7519 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -929,6 +929,16 @@ def OMP_Error : Directive<[Spelling<"error">]> {
let association = AS_None;
let category = CA_Utility;
}
+def OMP_Flatten : Directive<[Spelling<"flatten">]> {
+ let allowedClauses = [
+ VersionedClause<OMPC_Apply, 60>,
+ ];
+ let allowedOnceClauses = [
+ VersionedClause<OMPC_Depth, 61>,
+ ];
+ let association = AS_LoopNest;
+ let category = CA_Executable;
+}
def OMP_Flush : Directive<[Spelling<"flush">]> {
let allowedOnceClauses = [
VersionedClause<OMPC_AcqRel, 50>,
@@ -1192,6 +1202,16 @@ def OMP_EndSingle : Directive<[Spelling<"end single">]> {
let category = OMP_Single.category;
let languages = [L_Fortran];
}
+def OMP_Split : Directive<[Spelling<"split">]> {
+ let allowedClauses = [
+ VersionedClause<OMPC_Apply, 60>,
+ ];
+ let allowedOnceClauses = [
+ VersionedClause<OMPC_Counts, 60>,
+ ];
+ let association = AS_LoopNest;
+ let category = CA_Executable;
+}
def OMP_Target : Directive<[Spelling<"target">]> {
let allowedClauses = [
VersionedClause<OMPC_Allocate>,
More information about the llvm-commits
mailing list