[flang] [llvm] [OpenMP] Define remaining OpenMP 6.0 clauses, add flang skeleton (PR #172080)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 12 12:08:26 PST 2025
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/172080
Add definitions of the remaining OpenMP 6.0 clauses to the OMP.td file. Implement the bare-bones skeleton in flang to support the new definitions.
Adding a clause to OMP.td automatically generates some flang code which requires manual completion to even compile. This PR adds the absolute minimum for all 6.0 clauses that were still missing. This minimum does not implement any OpenMP functionality, it just allows flang to compile and run. As a benefit, any future clause-related clang work will not require any changes to flang.
>From 7965957b39be7c4bce787d930bc660031610a641 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Fri, 12 Dec 2025 13:55:58 -0600
Subject: [PATCH] [OpenMP] Define remaining OpenMP 6.0 clauses, add flang
skeleton
Add definitions of the remaining OpenMP 6.0 clauses to the OMP.td
file. Implement the bare-bones skeleton in flang to support the new
definitions.
Adding a clause to OMP.td automatically generates some flang code
which requires manual completion to even compile. This PR adds the
absolute minimum for all 6.0 clauses that were still missing. This
minimum does not implement any OpenMP functionality, it just allows
flang to compile and run. As a benefit, any future clause-related
clang work will not require any changes to flang.
---
flang/include/flang/Lower/OpenMP/Clauses.h | 33 ++++----
flang/lib/Lower/OpenMP/Clauses.cpp | 10 ++-
flang/lib/Semantics/check-omp-structure.cpp | 8 ++
llvm/include/llvm/Frontend/OpenMP/ClauseT.h | 86 +++++++++++++++++----
llvm/include/llvm/Frontend/OpenMP/OMP.td | 54 ++++++++-----
5 files changed, 142 insertions(+), 49 deletions(-)
diff --git a/flang/include/flang/Lower/OpenMP/Clauses.h b/flang/include/flang/Lower/OpenMP/Clauses.h
index 455eda2738e6d..894db67deee87 100644
--- a/flang/include/flang/Lower/OpenMP/Clauses.h
+++ b/flang/include/flang/Lower/OpenMP/Clauses.h
@@ -201,9 +201,10 @@ using Align = tomp::clause::AlignT<TypeTy, IdTy, ExprTy>;
using Allocate = tomp::clause::AllocateT<TypeTy, IdTy, ExprTy>;
using Allocator = tomp::clause::AllocatorT<TypeTy, IdTy, ExprTy>;
using AppendArgs = tomp::clause::AppendArgsT<TypeTy, IdTy, ExprTy>;
+using Apply = tomp::clause::ApplyT<TypeTy, IdTy, ExprTy>;
+using At = tomp::clause::AtT<TypeTy, IdTy, ExprTy>;
using AtomicDefaultMemOrder =
tomp::clause::AtomicDefaultMemOrderT<TypeTy, IdTy, ExprTy>;
-using At = tomp::clause::AtT<TypeTy, IdTy, ExprTy>;
using Bind = tomp::clause::BindT<TypeTy, IdTy, ExprTy>;
using Capture = tomp::clause::CaptureT<TypeTy, IdTy, ExprTy>;
using Collapse = tomp::clause::CollapseT<TypeTy, IdTy, ExprTy>;
@@ -212,8 +213,9 @@ using Compare = tomp::clause::CompareT<TypeTy, IdTy, ExprTy>;
using Contains = tomp::clause::ContainsT<TypeTy, IdTy, ExprTy>;
using Copyin = tomp::clause::CopyinT<TypeTy, IdTy, ExprTy>;
using Copyprivate = tomp::clause::CopyprivateT<TypeTy, IdTy, ExprTy>;
-using Defaultmap = tomp::clause::DefaultmapT<TypeTy, IdTy, ExprTy>;
+using Counts = tomp::clause::CountsT<TypeTy, IdTy, ExprTy>;
using Default = tomp::clause::DefaultT<TypeTy, IdTy, ExprTy>;
+using Defaultmap = tomp::clause::DefaultmapT<TypeTy, IdTy, ExprTy>;
using Depend = tomp::clause::DependT<TypeTy, IdTy, ExprTy>;
using Destroy = tomp::clause::DestroyT<TypeTy, IdTy, ExprTy>;
using Detach = tomp::clause::DetachT<TypeTy, IdTy, ExprTy>;
@@ -243,27 +245,32 @@ using If = tomp::clause::IfT<TypeTy, IdTy, ExprTy>;
using Inbranch = tomp::clause::InbranchT<TypeTy, IdTy, ExprTy>;
using Inclusive = tomp::clause::InclusiveT<TypeTy, IdTy, ExprTy>;
using Indirect = tomp::clause::IndirectT<TypeTy, IdTy, ExprTy>;
+using Induction = tomp::clause::InductionT<TypeTy, IdTy, ExprTy>;
using Inductor = tomp::clause::InductorT<TypeTy, IdTy, ExprTy>;
using Init = tomp::clause::InitT<TypeTy, IdTy, ExprTy>;
+using InitComplete = tomp::clause::InitCompleteT<TypeTy, IdTy, ExprTy>;
using Initializer = tomp::clause::InitializerT<TypeTy, IdTy, ExprTy>;
using InReduction = tomp::clause::InReductionT<TypeTy, IdTy, ExprTy>;
+using Interop = tomp::clause::InteropT<TypeTy, IdTy, ExprTy>;
using IsDevicePtr = tomp::clause::IsDevicePtrT<TypeTy, IdTy, ExprTy>;
using Lastprivate = tomp::clause::LastprivateT<TypeTy, IdTy, ExprTy>;
-using Looprange = tomp::clause::LooprangeT<TypeTy, IdTy, ExprTy>;
using Linear = tomp::clause::LinearT<TypeTy, IdTy, ExprTy>;
using Link = tomp::clause::LinkT<TypeTy, IdTy, ExprTy>;
+using Local = tomp::clause::LocalT<TypeTy, IdTy, ExprTy>;
+using Looprange = tomp::clause::LooprangeT<TypeTy, IdTy, ExprTy>;
using Map = tomp::clause::MapT<TypeTy, IdTy, ExprTy>;
using Match = tomp::clause::MatchT<TypeTy, IdTy, ExprTy>;
+using Memscope = tomp::clause::MemscopeT<TypeTy, IdTy, ExprTy>;
using Mergeable = tomp::clause::MergeableT<TypeTy, IdTy, ExprTy>;
using Message = tomp::clause::MessageT<TypeTy, IdTy, ExprTy>;
+using Nocontext = tomp::clause::NocontextT<TypeTy, IdTy, ExprTy>;
+using Nogroup = tomp::clause::NogroupT<TypeTy, IdTy, ExprTy>;
+using Nontemporal = tomp::clause::NontemporalT<TypeTy, IdTy, ExprTy>;
using NoOpenmp = tomp::clause::NoOpenmpT<TypeTy, IdTy, ExprTy>;
-using NoOpenmpRoutines = tomp::clause::NoOpenmpRoutinesT<TypeTy, IdTy, ExprTy>;
using NoOpenmpConstructs =
tomp::clause::NoOpenmpConstructsT<TypeTy, IdTy, ExprTy>;
+using NoOpenmpRoutines = tomp::clause::NoOpenmpRoutinesT<TypeTy, IdTy, ExprTy>;
using NoParallelism = tomp::clause::NoParallelismT<TypeTy, IdTy, ExprTy>;
-using Nocontext = tomp::clause::NocontextT<TypeTy, IdTy, ExprTy>;
-using Nogroup = tomp::clause::NogroupT<TypeTy, IdTy, ExprTy>;
-using Nontemporal = tomp::clause::NontemporalT<TypeTy, IdTy, ExprTy>;
using Notinbranch = tomp::clause::NotinbranchT<TypeTy, IdTy, ExprTy>;
using Novariants = tomp::clause::NovariantsT<TypeTy, IdTy, ExprTy>;
using Nowait = tomp::clause::NowaitT<TypeTy, IdTy, ExprTy>;
@@ -273,10 +280,11 @@ using NumThreads = tomp::clause::NumThreadsT<TypeTy, IdTy, ExprTy>;
using OmpxAttribute = tomp::clause::OmpxAttributeT<TypeTy, IdTy, ExprTy>;
using OmpxBare = tomp::clause::OmpxBareT<TypeTy, IdTy, ExprTy>;
using OmpxDynCgroupMem = tomp::clause::OmpxDynCgroupMemT<TypeTy, IdTy, ExprTy>;
-using Ordered = tomp::clause::OrderedT<TypeTy, IdTy, ExprTy>;
using Order = tomp::clause::OrderT<TypeTy, IdTy, ExprTy>;
+using Ordered = tomp::clause::OrderedT<TypeTy, IdTy, ExprTy>;
using Otherwise = tomp::clause::OtherwiseT<TypeTy, IdTy, ExprTy>;
using Partial = tomp::clause::PartialT<TypeTy, IdTy, ExprTy>;
+using Permutation = tomp::clause::PermutationT<TypeTy, IdTy, ExprTy>;
using Priority = tomp::clause::PriorityT<TypeTy, IdTy, ExprTy>;
using Private = tomp::clause::PrivateT<TypeTy, IdTy, ExprTy>;
using ProcBind = tomp::clause::ProcBindT<TypeTy, IdTy, ExprTy>;
@@ -287,33 +295,32 @@ using Release = tomp::clause::ReleaseT<TypeTy, IdTy, ExprTy>;
using Replayable = tomp::clause::ReplayableT<TypeTy, IdTy, ExprTy>;
using ReverseOffload = tomp::clause::ReverseOffloadT<TypeTy, IdTy, ExprTy>;
using Safelen = tomp::clause::SafelenT<TypeTy, IdTy, ExprTy>;
+using Safesync = tomp::clause::SafesyncT<TypeTy, IdTy, ExprTy>;
using Schedule = tomp::clause::ScheduleT<TypeTy, IdTy, ExprTy>;
using SelfMaps = tomp::clause::SelfMapsT<TypeTy, IdTy, ExprTy>;
using SeqCst = tomp::clause::SeqCstT<TypeTy, IdTy, ExprTy>;
using Severity = tomp::clause::SeverityT<TypeTy, IdTy, ExprTy>;
using Shared = tomp::clause::SharedT<TypeTy, IdTy, ExprTy>;
-using Simdlen = tomp::clause::SimdlenT<TypeTy, IdTy, ExprTy>;
using Simd = tomp::clause::SimdT<TypeTy, IdTy, ExprTy>;
+using Simdlen = tomp::clause::SimdlenT<TypeTy, IdTy, ExprTy>;
using Sizes = tomp::clause::SizesT<TypeTy, IdTy, ExprTy>;
-using Permutation = tomp::clause::PermutationT<TypeTy, IdTy, ExprTy>;
using TaskReduction = tomp::clause::TaskReductionT<TypeTy, IdTy, ExprTy>;
using ThreadLimit = tomp::clause::ThreadLimitT<TypeTy, IdTy, ExprTy>;
using Threads = tomp::clause::ThreadsT<TypeTy, IdTy, ExprTy>;
using Threadset = tomp::clause::ThreadsetT<TypeTy, IdTy, ExprTy>;
-using Transparent = tomp::clause::TransparentT<TypeTy, IdTy, ExprTy>;
using To = tomp::clause::ToT<TypeTy, IdTy, ExprTy>;
+using Transparent = tomp::clause::TransparentT<TypeTy, IdTy, ExprTy>;
using UnifiedAddress = tomp::clause::UnifiedAddressT<TypeTy, IdTy, ExprTy>;
using UnifiedSharedMemory =
tomp::clause::UnifiedSharedMemoryT<TypeTy, IdTy, ExprTy>;
-using SelfMaps = tomp::clause::SelfMapsT<TypeTy, IdTy, ExprTy>;
using Uniform = tomp::clause::UniformT<TypeTy, IdTy, ExprTy>;
using Unknown = tomp::clause::UnknownT<TypeTy, IdTy, ExprTy>;
using Untied = tomp::clause::UntiedT<TypeTy, IdTy, ExprTy>;
using Update = tomp::clause::UpdateT<TypeTy, IdTy, ExprTy>;
+using Use = tomp::clause::UseT<TypeTy, IdTy, ExprTy>;
using UseDeviceAddr = tomp::clause::UseDeviceAddrT<TypeTy, IdTy, ExprTy>;
using UseDevicePtr = tomp::clause::UseDevicePtrT<TypeTy, IdTy, ExprTy>;
using UsesAllocators = tomp::clause::UsesAllocatorsT<TypeTy, IdTy, ExprTy>;
-using Use = tomp::clause::UseT<TypeTy, IdTy, ExprTy>;
using Weak = tomp::clause::WeakT<TypeTy, IdTy, ExprTy>;
using When = tomp::clause::WhenT<TypeTy, IdTy, ExprTy>;
using Write = tomp::clause::WriteT<TypeTy, IdTy, ExprTy>;
diff --git a/flang/lib/Lower/OpenMP/Clauses.cpp b/flang/lib/Lower/OpenMP/Clauses.cpp
index 9ea4e8fcd6c0e..66328daaf246a 100644
--- a/flang/lib/Lower/OpenMP/Clauses.cpp
+++ b/flang/lib/Lower/OpenMP/Clauses.cpp
@@ -248,17 +248,25 @@ MAKE_EMPTY_CLASS(Write, Write);
// Artificial clauses
MAKE_EMPTY_CLASS(Depobj, Depobj);
MAKE_EMPTY_CLASS(Flush, Flush);
+MAKE_EMPTY_CLASS(Groupprivate, Groupprivate);
MAKE_EMPTY_CLASS(MemoryOrder, MemoryOrder);
MAKE_EMPTY_CLASS(Threadprivate, Threadprivate);
-MAKE_EMPTY_CLASS(Groupprivate, Groupprivate);
MAKE_INCOMPLETE_CLASS(AdjustArgs, AdjustArgs);
MAKE_INCOMPLETE_CLASS(AppendArgs, AppendArgs);
+MAKE_INCOMPLETE_CLASS(Apply, Apply);
MAKE_INCOMPLETE_CLASS(Collector, Collector);
+MAKE_INCOMPLETE_CLASS(Counts, Counts);
MAKE_INCOMPLETE_CLASS(GraphId, GraphId);
MAKE_INCOMPLETE_CLASS(GraphReset, GraphReset);
+MAKE_INCOMPLETE_CLASS(Induction, Induction);
MAKE_INCOMPLETE_CLASS(Inductor, Inductor);
+MAKE_INCOMPLETE_CLASS(InitComplete, InitComplete);
+MAKE_INCOMPLETE_CLASS(Interop, Interop);
+MAKE_INCOMPLETE_CLASS(Local, Local);
+MAKE_INCOMPLETE_CLASS(Memscope, Memscope);
MAKE_INCOMPLETE_CLASS(Replayable, Replayable);
+MAKE_INCOMPLETE_CLASS(Safesync, Safesync);
MAKE_INCOMPLETE_CLASS(Transparent, Transparent);
List<IteratorSpecifier>
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index e640ca8c1d3d9..ca2e8481a1ffd 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -5579,11 +5579,13 @@ CHECK_SIMPLE_CLAUSE(Acquire, OMPC_acquire)
CHECK_SIMPLE_CLAUSE(AdjustArgs, OMPC_adjust_args)
CHECK_SIMPLE_CLAUSE(Affinity, OMPC_affinity)
CHECK_SIMPLE_CLAUSE(AppendArgs, OMPC_append_args)
+CHECK_SIMPLE_CLAUSE(Apply, OMPC_apply)
CHECK_SIMPLE_CLAUSE(Bind, OMPC_bind)
CHECK_SIMPLE_CLAUSE(Capture, OMPC_capture)
CHECK_SIMPLE_CLAUSE(Collector, OMPC_collector)
CHECK_SIMPLE_CLAUSE(Compare, OMPC_compare)
CHECK_SIMPLE_CLAUSE(Contains, OMPC_contains)
+CHECK_SIMPLE_CLAUSE(Counts, OMPC_counts)
CHECK_SIMPLE_CLAUSE(Default, OMPC_default)
CHECK_SIMPLE_CLAUSE(Depobj, OMPC_depobj)
CHECK_SIMPLE_CLAUSE(DeviceType, OMPC_device_type)
@@ -5602,12 +5604,17 @@ CHECK_SIMPLE_CLAUSE(Holds, OMPC_holds)
CHECK_SIMPLE_CLAUSE(Inbranch, OMPC_inbranch)
CHECK_SIMPLE_CLAUSE(Inclusive, OMPC_inclusive)
CHECK_SIMPLE_CLAUSE(Indirect, OMPC_indirect)
+CHECK_SIMPLE_CLAUSE(Induction, OMPC_induction)
CHECK_SIMPLE_CLAUSE(Inductor, OMPC_inductor)
+CHECK_SIMPLE_CLAUSE(InitComplete, OMPC_init_complete)
CHECK_SIMPLE_CLAUSE(Initializer, OMPC_initializer)
CHECK_SIMPLE_CLAUSE(Init, OMPC_init)
+CHECK_SIMPLE_CLAUSE(Interop, OMPC_interop)
CHECK_SIMPLE_CLAUSE(Link, OMPC_link)
+CHECK_SIMPLE_CLAUSE(Local, OMPC_local)
CHECK_SIMPLE_CLAUSE(Match, OMPC_match)
CHECK_SIMPLE_CLAUSE(MemoryOrder, OMPC_memory_order)
+CHECK_SIMPLE_CLAUSE(Memscope, OMPC_memscope)
CHECK_SIMPLE_CLAUSE(Mergeable, OMPC_mergeable)
CHECK_SIMPLE_CLAUSE(Message, OMPC_message)
CHECK_SIMPLE_CLAUSE(Nocontext, OMPC_nocontext)
@@ -5630,6 +5637,7 @@ CHECK_SIMPLE_CLAUSE(Read, OMPC_read)
CHECK_SIMPLE_CLAUSE(Relaxed, OMPC_relaxed)
CHECK_SIMPLE_CLAUSE(Release, OMPC_release)
CHECK_SIMPLE_CLAUSE(Replayable, OMPC_replayable)
+CHECK_SIMPLE_CLAUSE(Safesync, OMPC_safesync)
CHECK_SIMPLE_CLAUSE(SeqCst, OMPC_seq_cst)
CHECK_SIMPLE_CLAUSE(Severity, OMPC_severity)
CHECK_SIMPLE_CLAUSE(Simd, OMPC_simd)
diff --git a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h
index 0a0323559eb27..bcd424021d421 100644
--- a/llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+++ b/llvm/include/llvm/Frontend/OpenMP/ClauseT.h
@@ -415,6 +415,12 @@ struct AppendArgsT {
using IncompleteTrait = std::true_type;
};
+// [6.0:372-373]
+template <typename T, typename I, typename E> //
+struct ApplyT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [8.1] `at` clause
template <typename T, typename I, typename E> //
struct AtT {
@@ -488,6 +494,12 @@ struct CopyprivateT {
List v;
};
+// [6.0:378-379]
+template <typename T, typename I, typename E> //
+struct CountsT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [5.4.1] `default` clause
template <typename T, typename I, typename E> //
struct DefaultT {
@@ -748,6 +760,12 @@ struct IndirectT {
OPT(InvokedByFptr) v;
};
+// [6.0:257-261]
+template <typename T, typename I, typename E> //
+struct InductionT {
+ using IncompleteTrait = std::true_type;
+};
+
// [6.0:265-266]
template <typename T, typename I, typename E> //
struct InductorT {
@@ -767,6 +785,12 @@ struct InitT {
std::tuple<OPT(InteropPreference), InteropTypes, InteropVar> t;
};
+// [6.0:270]
+template <typename T, typename I, typename E> //
+struct InitCompleteT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [5.5.4] `initializer` clause
template <typename T, typename I, typename E> //
struct InitializerT {
@@ -786,6 +810,12 @@ struct InReductionT {
std::tuple<ReductionIdentifiers, List> t;
};
+// [6.0:339-340]
+template <typename T, typename I, typename E> //
+struct InteropT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [5.4.7] `is_device_ptr` clause
template <typename T, typename I, typename E> //
struct IsDevicePtrT {
@@ -825,6 +855,22 @@ struct LinkT {
List v;
};
+// [6.0:303]
+template <typename T, typename I, typename E> //
+struct LocalT {
+ using IncompleteTrait = std::true_type;
+};
+
+// V6: [6.4.7] Looprange clause
+template <typename T, typename I, typename E> //
+struct LooprangeT {
+ using Begin = E;
+ using End = E;
+
+ using TupleTrait = std::true_type;
+ std::tuple<Begin, End> t;
+};
+
// V5.2: [5.8.3] `map` clause
template <typename T, typename I, typename E> //
struct MapT {
@@ -850,6 +896,12 @@ struct MatchT {
using IncompleteTrait = std::true_type;
};
+// [6.0:493-494]
+template <typename T, typename I, typename E> //
+struct MemscopeT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [12.2] `mergeable` clause
template <typename T, typename I, typename E> //
struct MergeableT {
@@ -892,15 +944,15 @@ struct NoOpenmpT {
using EmptyTrait = std::true_type;
};
-// V5.2: [8.3.1] `assumption` clauses
+// V6.0: [10.6.1] `assumption` clauses
template <typename T, typename I, typename E> //
-struct NoOpenmpRoutinesT {
+struct NoOpenmpConstructsT {
using EmptyTrait = std::true_type;
};
-// V6.0: [10.6.1] `assumption` clauses
+// V5.2: [8.3.1] `assumption` clauses
template <typename T, typename I, typename E> //
-struct NoOpenmpConstructsT {
+struct NoOpenmpRoutinesT {
using EmptyTrait = std::true_type;
};
@@ -1097,6 +1149,12 @@ struct SafelenT {
Length v;
};
+// [6.0:393]
+template <typename T, typename I, typename E> //
+struct SafesyncT {
+ using IncompleteTrait = std::true_type;
+};
+
// V5.2: [11.5.3] `schedule` clause
template <typename T, typename I, typename E> //
struct ScheduleT {
@@ -1314,15 +1372,6 @@ struct WriteT {
using EmptyTrait = std::true_type;
};
-// V6: [6.4.7] Looprange clause
-template <typename T, typename I, typename E> struct LooprangeT {
- using Begin = E;
- using End = E;
-
- using TupleTrait = std::true_type;
- std::tuple<Begin, End> t;
-};
-
// ---
template <typename T, typename I, typename E>
@@ -1342,10 +1391,13 @@ using EmptyClausesT = std::variant<
template <typename T, typename I, typename E>
using IncompleteClausesT =
- std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>,
- CollectorT<T, I, E>, GraphIdT<T, I, E>, GraphResetT<T, I, E>,
- InductorT<T, I, E>, MatchT<T, I, E>, OtherwiseT<T, I, E>,
- ReplayableT<T, I, E>, TransparentT<T, I, E>, WhenT<T, I, E>>;
+ std::variant<AdjustArgsT<T, I, E>, AppendArgsT<T, I, E>, ApplyT<T, I, E>,
+ CollectorT<T, I, E>, CountsT<T, I, E>, GraphIdT<T, I, E>,
+ GraphResetT<T, I, E>, InductionT<T, I, E>, InductorT<T, I, E>,
+ InitCompleteT<T, I, E>, InteropT<T, I, E>, LocalT<T, I, E>,
+ MatchT<T, I, E>, MemscopeT<T, I, E>, OtherwiseT<T, I, E>,
+ ReplayableT<T, I, E>, SafesyncT<T, I, E>,
+ TransparentT<T, I, E>, WhenT<T, I, E>>;
template <typename T, typename I, typename E>
using TupleClausesT =
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 81438f2e323c8..b1b01daef585e 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -65,6 +65,8 @@ def OMPC_Allocator : Clause<[Spelling<"allocator">]> {
let clangClass = "OMPAllocatorClause";
let flangClass = "ScalarIntExpr";
}
+def OMPC_Apply : Clause<[Spelling<"apply">]> {
+}
def OMPC_AppendArgs : Clause<[Spelling<"append_args">]> {
let flangClass = "OmpAppendArgsClause";
}
@@ -112,10 +114,6 @@ def OMPC_CancellationConstructType
let flangClass = "OmpCancellationConstructTypeClause";
let skipFlangUnparser = true;
}
-def OMPC_Contains : Clause<[Spelling<"contains">]> {
- let clangClass = "OMPContainsClause";
- let flangClass = "OmpContainsClause";
-}
def OMPC_Capture : Clause<[Spelling<"capture">]> {
let clangClass = "OMPCaptureClause";
}
@@ -128,6 +126,10 @@ def OMPC_Collector : Clause<[Spelling<"collector">]> {
def OMPC_Compare : Clause<[Spelling<"compare">]> {
let clangClass = "OMPCompareClause";
}
+def OMPC_Contains : Clause<[Spelling<"contains">]> {
+ let clangClass = "OMPContainsClause";
+ let flangClass = "OmpContainsClause";
+}
def OMPC_Copyin : Clause<[Spelling<"copyin">]> {
let clangClass = "OMPCopyinClause";
let flangClass = "OmpObjectList";
@@ -136,6 +138,8 @@ def OMPC_CopyPrivate : Clause<[Spelling<"copyprivate">]> {
let clangClass = "OMPCopyprivateClause";
let flangClass = "OmpObjectList";
}
+def OMPC_Counts : Clause<[Spelling<"counts">]> {
+}
def OMPC_Default : Clause<[Spelling<"default">]> {
let clangClass = "OMPDefaultClause";
let flangClass = "OmpDefaultClause";
@@ -242,6 +246,9 @@ def OMPC_GraphReset : Clause<[Spelling<"graph_reset">]> {
let flangClass = "OmpGraphResetClause";
let isValueOptional = true;
}
+def OMPC_GroupPrivate : Clause<[Spelling<"groupprivate">]> {
+ let isImplicit = true;
+}
def OMPC_HasDeviceAddr : Clause<[Spelling<"has_device_addr">]> {
let clangClass = "OMPHasDeviceAddrClause";
let flangClass = "OmpObjectList";
@@ -267,12 +274,17 @@ def OMPC_Inclusive : Clause<[Spelling<"inclusive">]> {
def OMPC_Indirect : Clause<[Spelling<"indirect">]> {
let flangClass = "OmpIndirectClause";
}
+def OMPC_Induction : Clause<[Spelling<"induction">]> {
+}
def OMPC_Inductor : Clause<[Spelling<"inductor">]> {
}
def OMPC_Init : Clause<[Spelling<"init">]> {
let clangClass = "OMPInitClause";
let flangClass = "OmpInitClause";
}
+def OMPC_InitComplete : Clause<[Spelling<"init_complete">]> {
+ let isValueOptional = true;
+}
def OMPC_Initializer : Clause<[Spelling<"initializer">]> {
let flangClass = "OmpInitializerClause";
}
@@ -280,6 +292,8 @@ def OMPC_InReduction : Clause<[Spelling<"in_reduction">]> {
let clangClass = "OMPInReductionClause";
let flangClass = "OmpInReductionClause";
}
+def OMPC_Interop : Clause<[Spelling<"interop">]> {
+}
def OMPC_IsDevicePtr : Clause<[Spelling<"is_device_ptr">]> {
let clangClass = "OMPIsDevicePtrClause";
let flangClass = "OmpObjectList";
@@ -295,6 +309,8 @@ def OMPC_Linear : Clause<[Spelling<"linear">]> {
def OMPC_Link : Clause<[Spelling<"link">]> {
let flangClass = "OmpObjectList";
}
+def OMPC_Local : Clause<[Spelling<"local">]> {
+}
def OMPC_LoopRange : Clause<[Spelling<"looprange">]> {
let clangClass = "OMPLoopRangeClause";
let flangClass = "OmpLooprangeClause";
@@ -306,6 +322,8 @@ def OMPC_Map : Clause<[Spelling<"map">]> {
def OMPC_Match : Clause<[Spelling<"match">]> {
let flangClass = "OmpMatchClause";
}
+def OMPC_Memscope : Clause<[Spelling<"memscope">]> {
+}
def OMP_MEMORY_ORDER_SeqCst : EnumVal<"seq_cst", 1, 1> {}
def OMP_MEMORY_ORDER_AcqRel : EnumVal<"acq_rel", 2, 1> {}
def OMP_MEMORY_ORDER_Acquire : EnumVal<"acquire", 3, 1> {}
@@ -335,12 +353,12 @@ def OMPC_Message : Clause<[Spelling<"message">]> {
def OMPC_NoOpenMP : Clause<[Spelling<"no_openmp">]> {
let clangClass = "OMPNoOpenMPClause";
}
-def OMPC_NoOpenMPRoutines : Clause<[Spelling<"no_openmp_routines">]> {
- let clangClass = "OMPNoOpenMPRoutinesClause";
-}
def OMPC_NoOpenMPConstructs : Clause<[Spelling<"no_openmp_constructs">]> {
let clangClass = "OMPNoOpenMPConstructsClause";
}
+def OMPC_NoOpenMPRoutines : Clause<[Spelling<"no_openmp_routines">]> {
+ let clangClass = "OMPNoOpenMPRoutinesClause";
+}
def OMPC_NoParallelism : Clause<[Spelling<"no_parallelism">]> {
let clangClass = "OMPNoParallelismClause";
}
@@ -485,6 +503,9 @@ def OMPC_SafeLen : Clause<[Spelling<"safelen">]> {
let clangClass = "OMPSafelenClause";
let flangClass = "ScalarIntConstantExpr";
}
+def OMPC_Safesync : Clause<[Spelling<"safesync">]> {
+ let isValueOptional = true;
+}
def OMP_SCHEDULE_Static : EnumVal<"static", 2, 1> {}
def OMP_SCHEDULE_Dynamic : EnumVal<"dynamic", 3, 1> {}
def OMP_SCHEDULE_Guided : EnumVal<"guided", 4, 1> {}
@@ -506,6 +527,11 @@ def OMPC_Schedule : Clause<[Spelling<"schedule">]> {
OMP_SCHEDULE_Default
];
}
+def OMPC_SelfMaps : Clause<[Spelling<"self_maps">]> {
+ let clangClass = "OMPSelfMapsClause";
+ let flangClass = "OmpSelfMapsClause";
+ let isValueOptional = true;
+}
def OMPC_SeqCst : Clause<[Spelling<"seq_cst">]> {
let clangClass = "OMPSeqCstClause";
}
@@ -540,9 +566,6 @@ def OMPC_ThreadLimit : Clause<[Spelling<"thread_limit">]> {
def OMPC_ThreadPrivate : Clause<[Spelling<"threadprivate">]> {
let isImplicit = true;
}
-def OMPC_GroupPrivate : Clause<[Spelling<"groupprivate">]> {
- let isImplicit = true;
-}
def OMPC_Threads : Clause<[Spelling<"threads">]> {
let clangClass = "OMPThreadsClause";
}
@@ -568,11 +591,6 @@ def OMPC_UnifiedSharedMemory : Clause<[Spelling<"unified_shared_memory">]> {
let flangClass = "OmpUnifiedSharedMemoryClause";
let isValueOptional = true;
}
-def OMPC_SelfMaps : Clause<[Spelling<"self_maps">]> {
- let clangClass = "OMPSelfMapsClause";
- let flangClass = "OmpSelfMapsClause";
- let isValueOptional = true;
-}
def OMPC_Uniform : Clause<[Spelling<"uniform">]> {
let flangClass = "Name";
let isValueList = true;
@@ -593,9 +611,6 @@ def OMPC_Use : Clause<[Spelling<"use">]> {
let clangClass = "OMPUseClause";
let flangClass = "OmpUseClause";
}
-def OMPC_UsesAllocators : Clause<[Spelling<"uses_allocators">]> {
- let clangClass = "OMPUsesAllocatorsClause";
-}
def OMPC_UseDeviceAddr : Clause<[Spelling<"use_device_addr">]> {
let clangClass = "OMPUseDeviceAddrClause";
let flangClass = "OmpObjectList";
@@ -604,6 +619,9 @@ def OMPC_UseDevicePtr : Clause<[Spelling<"use_device_ptr">]> {
let clangClass = "OMPUseDevicePtrClause";
let flangClass = "OmpObjectList";
}
+def OMPC_UsesAllocators : Clause<[Spelling<"uses_allocators">]> {
+ let clangClass = "OMPUsesAllocatorsClause";
+}
def OMPC_Weak : Clause<[Spelling<"weak">]> {
let clangClass = "OMPWeakClause";
}
More information about the llvm-commits
mailing list