41#ifndef LLVM_FRONTEND_OPENMP_CLAUSET_H
42#define LLVM_FRONTEND_OPENMP_CLAUSET_H
61#define ENUM(Name, ...) enum class Name { __VA_ARGS__ }
62#define OPT(x) std::optional<x>
76#define CLAUSET_SCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
77 if (v == OtherEnum::Ov) { \
78 return ThisEnum::Tv; \
82#define CLAUSET_UNSCOPED_ENUM_MEMBER_CONVERT(Ov, Tv) \
84 return ThisEnum::Tv; \
87#define CLAUSET_ENUM_CONVERT(func, OtherE, ThisE, Maps) \
88 auto func = [](OtherE v) -> ThisE { \
89 using ThisEnum = ThisE; \
90 using OtherEnum = OtherE; \
91 (void)sizeof(OtherEnum); \
93 llvm_unreachable("Unexpected value in " #OtherE); \
115 static constexpr bool value =
false;
127template <
typename... Types1,
typename... Types2>
129 using type = std::variant<Types1..., Types2...>;
145template <
typename T,
typename... Ts>
struct Union<
T, Ts...> {
146 static_assert(detail::is_variant_v<T>);
181template <
typename IdType,
typename ExprType>
struct ObjectT;
184template <
typename I,
typename E>
186 return o1.id() == o2.id();
193template <
typename I,
typename E>
199 ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract,
Concat, LT,
200 LE,
EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max);
202 std::variant<DefinedOpName, IntrinsicOperator>
u;
214template <
typename TypeType,
typename IdType,
typename ExprType>
230template <
typename I,
typename E>
239ENUM(MemoryOrder, AcqRel, Acquire, Relaxed, Release, SeqCst);
240ENUM(MotionExpectation, Present);
243ENUM(DependenceType, Depobj, In, Inout, Inoutset, Mutexinoutset, Out, Sink,
247template <
typename I,
typename E>
251 std::tuple<DefinedOperatorT<I, E>,
E>
t;
257template <
typename I,
typename E>
270template <
typename I,
typename E>
276template <
typename T,
typename I,
typename E>
280std::enable_if_t<T::EmptyTrait::value, bool> operator==(
const T &a,
285std::enable_if_t<T::IncompleteTrait::value, bool> operator==(
const T &a,
290std::enable_if_t<T::WrapperTrait::value, bool> operator==(
const T &a,
295std::enable_if_t<T::TupleTrait::value, bool> operator==(
const T &a,
300std::enable_if_t<T::UnionTrait::value, bool> operator==(
const T &a,
311template <
typename T,
typename I,
typename E>
315 typename ContainerTy,
typename FunctionTy,
317 typename ResultTy = std::invoke_result_t<FunctionTy, ElemTy>>
325using type::operator==;
328template <
typename T,
typename I,
typename E>
336template <
typename T,
typename I,
typename E>
342template <
typename T,
typename I,
typename E>
348template <
typename T,
typename I,
typename E>
354template <
typename T,
typename I,
typename E>
364template <
typename T,
typename I,
typename E>
373template <
typename T,
typename I,
typename E>
382template <
typename T,
typename I,
typename E>
386template <
typename T,
typename I,
typename E>
398template <
typename T,
typename I,
typename E>
406template <
typename T,
typename I,
typename E>
412template <
typename T,
typename I,
typename E>
414 ENUM(ActionTime, Compilation, Execution);
420template <
typename T,
typename I,
typename E>
428template <
typename T,
typename I,
typename E>
436template <
typename T,
typename I,
typename E>
442template <
typename T,
typename I,
typename E>
450template <
typename T,
typename I,
typename E>
456template <
typename T,
typename I,
typename E>
464template <
typename T,
typename I,
typename E>
472template <
typename T,
typename I,
typename E>
480template <
typename T,
typename I,
typename E>
482 ENUM(DataSharingAttribute, Firstprivate,
None, Private, Shared);
484 DataSharingAttribute
v;
488template <
typename T,
typename I,
typename E>
492 ENUM(VariableCategory,
All, Scalar, Aggregate, Pointer, Allocatable);
494 std::tuple<ImplicitBehavior,
OPT(VariableCategory)>
t;
497template <
typename T,
typename I,
typename E>
501template <
typename T,
typename I,
typename E>
515 std::variant<Doacross, TaskDep>
u;
519template <
typename T,
typename I,
typename E>
528template <
typename T,
typename I,
typename E>
536template <
typename T,
typename I,
typename E>
539 ENUM(DeviceModifier, Ancestor, DeviceNum);
545template <
typename T,
typename I,
typename E>
547 ENUM(DeviceTypeDescription, Any, Host, Nohost);
549 DeviceTypeDescription
v;
553template <
typename T,
typename I,
typename E>
562template <
typename T,
typename I,
typename E>
568 std::tuple<DependenceType, Vector>
t;
572template <
typename T,
typename I,
typename E>
578template <
typename T,
typename I,
typename E>
586template <
typename T,
typename I,
typename E>
594template <
typename T,
typename I,
typename E>
602template <
typename T,
typename I,
typename E>
610template <
typename T,
typename I,
typename E>
618template <
typename T,
typename I,
typename E>
626template <
typename T,
typename I,
typename E>
639template <
typename T,
typename I,
typename E>
645template <
typename T,
typename I,
typename E>
654template <
typename T,
typename I,
typename E>
662template <
typename T,
typename I,
typename E>
670template <
typename T,
typename I,
typename E>
677template <
typename T,
typename I,
typename E>
686template <
typename T,
typename I,
typename E>
692template <
typename T,
typename I,
typename E>
700template <
typename T,
typename I,
typename E>
708template <
typename T,
typename I,
typename E>
713 ENUM(InteropType, Target, Targetsync);
721template <
typename T,
typename I,
typename E>
729template <
typename T,
typename I,
typename E>
736 std::tuple<ReductionIdentifiers, List>
t;
740template <
typename T,
typename I,
typename E>
748template <
typename T,
typename I,
typename E>
751 ENUM(LastprivateModifier, Conditional);
757template <
typename T,
typename I,
typename E>
763 ENUM(LinearModifier, Ref, Val, Uval);
771template <
typename T,
typename I,
typename E>
779template <
typename T,
typename I,
typename E>
782 ENUM(MapType, To,
From, Tofrom, Alloc, Release, Delete);
783 ENUM(MapTypeModifier, Always, Close, Present, OmpxHold);
796template <
typename T,
typename I,
typename E>
802template <
typename T,
typename I,
typename E>
808template <
typename T,
typename I,
typename E>
816template <
typename T,
typename I,
typename E>
824template <
typename T,
typename I,
typename E>
830template <
typename T,
typename I,
typename E>
838template <
typename T,
typename I,
typename E>
844template <
typename T,
typename I,
typename E>
850template <
typename T,
typename I,
typename E>
856template <
typename T,
typename I,
typename E>
862template <
typename T,
typename I,
typename E>
870template <
typename T,
typename I,
typename E>
876template <
typename T,
typename I,
typename E>
885template <
typename T,
typename I,
typename E>
904template <
typename T,
typename I,
typename E>
911template <
typename T,
typename I,
typename E>
916template <
typename T,
typename I,
typename E>
921template <
typename T,
typename I,
typename E>
928template <
typename T,
typename I,
typename E>
930 ENUM(OrderModifier, Reproducible, Unconstrained);
933 std::tuple<
OPT(OrderModifier), Ordering>
t;
937template <
typename T,
typename I,
typename E>
945template <
typename T,
typename I,
typename E>
951template <
typename T,
typename I,
typename E>
959template <
typename T,
typename I,
typename E>
967template <
typename T,
typename I,
typename E>
975template <
typename T,
typename I,
typename E>
983template <
typename T,
typename I,
typename E>
985 ENUM(AffinityPolicy, Close, Master, Spread, Primary);
991template <
typename T,
typename I,
typename E>
997template <
typename T,
typename I,
typename E>
1009template <
typename T,
typename I,
typename E>
1015template <
typename T,
typename I,
typename E>
1021template <
typename T,
typename I,
typename E>
1027template <
typename T,
typename I,
typename E>
1035template <
typename T,
typename I,
typename E>
1037 ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime);
1039 ENUM(OrderingModifier, Monotonic, Nonmonotonic);
1046template <
typename T,
typename I,
typename E>
1052template <
typename T,
typename I,
typename E>
1060template <
typename T,
typename I,
typename E>
1068template <
typename T,
typename I,
typename E>
1074template <
typename T,
typename I,
typename E>
1082template <
typename T,
typename I,
typename E>
1090template <
typename T,
typename I,
typename E>
1097 std::tuple<ReductionIdentifiers, List>
t;
1101template <
typename T,
typename I,
typename E>
1109template <
typename T,
typename I,
typename E>
1115template <
typename T,
typename I,
typename E>
1128template <
typename T,
typename I,
typename E>
1134template <
typename T,
typename I,
typename E>
1140template <
typename T,
typename I,
typename E>
1147template <
typename T,
typename I,
typename E>
1153template <
typename T,
typename I,
typename E>
1161template <
typename T,
typename I,
typename E>
1169template <
typename T,
typename I,
typename E>
1177template <
typename T,
typename I,
typename E>
1185template <
typename T,
typename I,
typename E>
1193template <
typename T,
typename I,
typename E>
1208template <
typename T,
typename I,
typename E>
1214template <
typename T,
typename I,
typename E>
1220template <
typename T,
typename I,
typename E>
1227template <
typename T,
typename I,
typename E>
1232template <
typename T,
typename I,
typename E>
1234 AcqRelT<T, I, E>,
AcquireT<T, I, E>,
CaptureT<T, I, E>,
CompareT<T, I, E>,
1238 NowaitT<T, I, E>,
ReadT<T, I, E>,
RelaxedT<T, I, E>,
ReleaseT<T, I, E>,
1241 UnknownT<T, I, E>,
UntiedT<T, I, E>,
UseT<T, I, E>,
WeakT<T, I, E>,
1244template <
typename T,
typename I,
typename E>
1249template <
typename T,
typename I,
typename E>
1259template <
typename T,
typename I,
typename E>
1262template <
typename T,
typename I,
typename E>
1269 ExclusiveT<T, I, E>,
FailT<T, I, E>,
FilterT<T, I, E>,
FinalT<T, I, E>,
1275 OrderedT<T, I, E>,
PartialT<T, I, E>,
PriorityT<T, I, E>,
PrivateT<T, I, E>,
1276 ProcBindT<T, I, E>,
SafelenT<T, I, E>,
SeverityT<T, I, E>,
SharedT<T, I, E>,
1281template <
typename T,
typename I,
typename E>
1292using type::operator==;
1306template <
typename TypeType,
typename IdType,
typename ExprType,
1318 std::variant<Extras...>>::type;
1326 llvm::omp::Directive
id = llvm::omp::Directive::OMPD_unknown;
BlockVerifier::State From
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
This file defines the SmallVector class.
static constexpr int Concat[]
constexpr bool is_variant_v
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
typename llvm::remove_cvref< T >::type remove_cvref_t
Implement std::hash so that hash_code can be used in STL containers.
std::variant< DependT< T, I, E > > UnionClausesT
std::variant< AcqRelT< T, I, E >, AcquireT< T, I, E >, CaptureT< T, I, E >, CompareT< T, I, E >, DynamicAllocatorsT< T, I, E >, FullT< T, I, E >, InbranchT< T, I, E >, MergeableT< T, I, E >, NogroupT< T, I, E >, NoOpenmpRoutinesT< T, I, E >, NoOpenmpT< T, I, E >, NoParallelismT< T, I, E >, NotinbranchT< T, I, E >, NowaitT< T, I, E >, ReadT< T, I, E >, RelaxedT< T, I, E >, ReleaseT< T, I, E >, ReverseOffloadT< T, I, E >, SeqCstT< T, I, E >, SimdT< T, I, E >, ThreadsT< T, I, E >, UnifiedAddressT< T, I, E >, UnifiedSharedMemoryT< T, I, E >, UnknownT< T, I, E >, UntiedT< T, I, E >, UseT< T, I, E >, WeakT< T, I, E >, WriteT< T, I, E > > EmptyClausesT
typename type::Union< EmptyClausesT< T, I, E >, ExtensionClausesT< T, I, E >, IncompleteClausesT< T, I, E >, TupleClausesT< T, I, E >, UnionClausesT< T, I, E >, WrapperClausesT< T, I, E > >::type UnionOfAllClausesT
std::variant< AbsentT< T, I, E >, AlignT< T, I, E >, AllocatorT< T, I, E >, AtomicDefaultMemOrderT< T, I, E >, AtT< T, I, E >, BindT< T, I, E >, CollapseT< T, I, E >, ContainsT< T, I, E >, CopyinT< T, I, E >, CopyprivateT< T, I, E >, DefaultT< T, I, E >, DestroyT< T, I, E >, DetachT< T, I, E >, DeviceTypeT< T, I, E >, EnterT< T, I, E >, ExclusiveT< T, I, E >, FailT< T, I, E >, FilterT< T, I, E >, FinalT< T, I, E >, FirstprivateT< T, I, E >, HasDeviceAddrT< T, I, E >, HintT< T, I, E >, HoldsT< T, I, E >, InclusiveT< T, I, E >, IndirectT< T, I, E >, InitializerT< T, I, E >, IsDevicePtrT< T, I, E >, LinkT< T, I, E >, MessageT< T, I, E >, NocontextT< T, I, E >, NontemporalT< T, I, E >, NovariantsT< T, I, E >, NumTeamsT< T, I, E >, NumThreadsT< T, I, E >, OrderedT< T, I, E >, PartialT< T, I, E >, PriorityT< T, I, E >, PrivateT< T, I, E >, ProcBindT< T, I, E >, SafelenT< T, I, E >, SeverityT< T, I, E >, SharedT< T, I, E >, SimdlenT< T, I, E >, SizesT< T, I, E >, PermutationT< T, I, E >, ThreadLimitT< T, I, E >, UniformT< T, I, E >, UpdateT< T, I, E >, UseDeviceAddrT< T, I, E >, UseDevicePtrT< T, I, E >, UsesAllocatorsT< T, I, E > > WrapperClausesT
std::variant< OmpxAttributeT< T, I, E >, OmpxBareT< T, I, E >, OmpxDynCgroupMemT< T, I, E > > ExtensionClausesT
std::variant< AdjustArgsT< T, I, E >, AppendArgsT< T, I, E >, MatchT< T, I, E >, OtherwiseT< T, I, E >, WhenT< T, I, E > > IncompleteClausesT
std::variant< AffinityT< T, I, E >, AlignedT< T, I, E >, AllocateT< T, I, E >, DefaultmapT< T, I, E >, DeviceT< T, I, E >, DistScheduleT< T, I, E >, DoacrossT< T, I, E >, FromT< T, I, E >, GrainsizeT< T, I, E >, IfT< T, I, E >, InitT< T, I, E >, InReductionT< T, I, E >, LastprivateT< T, I, E >, LinearT< T, I, E >, MapT< T, I, E >, NumTasksT< T, I, E >, OrderT< T, I, E >, ReductionT< T, I, E >, ScheduleT< T, I, E >, TaskReductionT< T, I, E >, ToT< T, I, E > > TupleClausesT
llvm::omp::Directive DirectiveName
ListT< ResultTy > makeList(ContainerTy &&container, FunctionTy &&func)
std::variant< Types1..., Types2... > type
static constexpr bool value
std::true_type UnionTrait
typename type::Union< clause::UnionOfAllClausesT< TypeType, IdType, ExprType >, std::variant< Extras... > >::type VariantTy
tomp::type::ListT< ClauseType > clauses
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type IncompleteTrait
std::tuple< OPT(Iterator), LocatorList > t
std::true_type TupleTrait
std::true_type WrapperTrait
std::tuple< OPT(Alignment), List > t
std::true_type TupleTrait
std::true_type TupleTrait
std::tuple< OPT(AllocatorComplexModifier), OPT(AlignModifier), List > t
std::true_type WrapperTrait
std::true_type IncompleteTrait
ENUM(ActionTime, Compilation, Execution)
std::true_type WrapperTrait
std::true_type WrapperTrait
type::MemoryOrder MemoryOrder
ENUM(Binding, Teams, Parallel, Thread)
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
ENUM(DataSharingAttribute, Firstprivate, None, Private, Shared)
ENUM(ImplicitBehavior, Alloc, To, From, Tofrom, Firstprivate, None, Default, Present)
ENUM(VariableCategory, All, Scalar, Aggregate, Pointer, Allocatable)
std::tuple< ImplicitBehavior, OPT(VariableCategory)> t
std::true_type TupleTrait
std::true_type TupleTrait
std::tuple< DependenceType, OPT(Iterator), LocatorList > t
tomp::type::DependenceType DependenceType
std::true_type UnionTrait
std::variant< Doacross, TaskDep > u
std::true_type WrapperTrait
std::true_type WrapperTrait
std::tuple< OPT(DeviceModifier), DeviceDescription > t
std::true_type TupleTrait
ENUM(DeviceModifier, Ancestor, DeviceNum)
std::true_type WrapperTrait
ENUM(DeviceTypeDescription, Any, Host, Nohost)
std::tuple< Kind, OPT(ChunkSize)> t
std::true_type TupleTrait
std::true_type TupleTrait
tomp::type::DependenceType DependenceType
std::tuple< DependenceType, Vector > t
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
type::MemoryOrder MemoryOrder
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type TupleTrait
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
type::MotionExpectation Expectation
std::true_type EmptyTrait
type::Prescriptiveness Prescriptiveness
std::true_type TupleTrait
std::tuple< OPT(Prescriptiveness), GrainSize > t
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::tuple< OPT(DirectiveNameModifier), IfExpression > t
std::true_type TupleTrait
type::DirectiveName DirectiveNameModifier
std::tuple< ReductionIdentifiers, List > t
std::true_type TupleTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
ListT< InteropType > InteropTypes
std::tuple< OPT(InteropPreference), InteropTypes, InteropVar > t
ENUM(InteropType, Target, Targetsync)
std::true_type TupleTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::tuple< OPT(LastprivateModifier), List > t
ENUM(LastprivateModifier, Conditional)
std::true_type TupleTrait
std::true_type TupleTrait
std::tuple< OPT(StepComplexModifier), OPT(LinearModifier), List > t
ENUM(LinearModifier, Ref, Val, Uval)
std::true_type WrapperTrait
ENUM(MapTypeModifier, Always, Close, Present, OmpxHold)
ENUM(MapType, To, From, Tofrom, Alloc, Release, Delete)
std::tuple< OPT(MapType), OPT(MapTypeModifiers), OPT(Mappers), OPT(Iterator), LocatorList > t
std::true_type TupleTrait
std::true_type IncompleteTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::tuple< OPT(Prescriptiveness), NumTasks > t
type::Prescriptiveness Prescriptiveness
std::true_type TupleTrait
std::true_type TupleTrait
std::tuple< OPT(LowerBound), UpperBound > t
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::tuple< OPT(OrderModifier), Ordering > t
ENUM(OrderModifier, Reproducible, Unconstrained)
std::true_type TupleTrait
ENUM(Ordering, Concurrent)
std::true_type WrapperTrait
std::true_type IncompleteTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
ENUM(AffinityPolicy, Close, Master, Spread, Primary)
std::true_type EmptyTrait
std::true_type TupleTrait
std::tuple< OPT(ReductionModifier), ReductionIdentifiers, List > t
ENUM(ReductionModifier, Default, Inscan, Task)
ListT< type::ReductionIdentifierT< I, E > > ReductionIdentifiers
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type TupleTrait
std::tuple< Kind, OPT(OrderingModifier), OPT(ChunkModifier), OPT(ChunkSize)> t
ENUM(OrderingModifier, Monotonic, Nonmonotonic)
ENUM(ChunkModifier, Simd)
ENUM(Kind, Static, Dynamic, Guided, Auto, Runtime)
std::true_type EmptyTrait
ENUM(SevLevel, Fatal, Warning)
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type TupleTrait
std::tuple< ReductionIdentifiers, List > t
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type TupleTrait
type::MotionExpectation Expectation
std::tuple< OPT(Expectation), OPT(Mappers), OPT(Iterator), LocatorList > t
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
tomp::type::DependenceType DependenceType
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::tuple< OPT(MemSpace), OPT(TraitsArray), Allocator > t
std::true_type TupleTrait
std::true_type WrapperTrait
std::true_type EmptyTrait
std::true_type IncompleteTrait
std::true_type EmptyTrait
std::true_type WrapperTrait
std::true_type UnionTrait
std::variant< DefinedOpName, IntrinsicOperator > u
ENUM(IntrinsicOperator, Power, Multiply, Divide, Add, Subtract, Concat, LT, LE, EQ, NE, GE, GT, NOT, AND, OR, EQV, NEQV, Min, Max)
std::true_type TupleTrait
std::tuple< OPT(TypeType), ObjectT< IdType, ExprType >, RangeT< ExprType > > t
std::tuple< DefinedOperatorT< I, E >, E > t
std::true_type TupleTrait
std::tuple< ObjectT< I, E >, OPT(Distance)> t
std::true_type TupleTrait
std::true_type WrapperTrait
std::true_type WrapperTrait
std::true_type TupleTrait
std::tuple< E, E, OPT(E)> t
std::true_type UnionTrait
std::variant< DefinedOperatorT< I, E >, ProcedureDesignatorT< I, E > > u
typename detail::UnionOfTwo< T, typename Union< Ts... >::type >::type type