diff --git a/llvm/include/llvm/Frontend/Directive/DirectiveBase.td b/llvm/include/llvm/Frontend/Directive/DirectiveBase.td --- a/llvm/include/llvm/Frontend/Directive/DirectiveBase.td +++ b/llvm/include/llvm/Frontend/Directive/DirectiveBase.td @@ -61,7 +61,19 @@ bit isDefault = 0; } -// Information about a specific directive +// Hold information about clause validity by version. +class VersionedClause { + // Actual clause. + Clause clause = c; + + // Mininum version number where this clause is valid. + int minVersion = min; + + // Maximum version number where this clause is valid. + int maxVersion = max; +} + +// Information about a specific directive. class Directive { // Name of the directive. Can be composite directive sepearted by whitespace. string name = d; @@ -71,13 +83,13 @@ string alternativeName = ""; // List of allowed clauses for the directive. - list allowedClauses = ?; + list allowedClauses = []; // List of clauses that are allowed to appear only once. - list allowedOnceClauses = ?; + list allowedOnceClauses = []; // List of clauses that are required. - list requiredClauses = ?; + list requiredClauses = []; // Set directive used by default when unknown. bit isDefault = 0; diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td --- a/llvm/include/llvm/Frontend/OpenMP/OMP.td +++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td @@ -196,301 +196,880 @@ def OMP_ThreadPrivate : Directive<"threadprivate"> {} def OMP_Parallel : Directive<"parallel"> { - let allowedClauses = [OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_FirstPrivate, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, - OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Task : Directive<"task"> { - let allowedClauses = [OMPC_If, OMPC_Final, OMPC_Default, OMPC_Private, - OMPC_FirstPrivate, OMPC_Shared, OMPC_Untied, OMPC_Mergeable, OMPC_Depend, - OMPC_Priority, OMPC_InReduction, OMPC_Allocate, OMPC_Detach, - OMPC_Affinity]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Simd : Directive<"simd"> { - let allowedClauses = [OMPC_Private, OMPC_LastPrivate, OMPC_Linear, - OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_Collapse, OMPC_Reduction, - OMPC_Allocate, OMPC_If, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_For : Directive<"for"> { - let allowedClauses = [OMPC_Private, OMPC_LastPrivate, OMPC_FirstPrivate, - OMPC_Reduction, OMPC_Collapse, OMPC_Schedule, OMPC_Ordered, OMPC_NoWait, - OMPC_Linear, OMPC_Allocate, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Sections : Directive<"sections"> { - let allowedClauses = [OMPC_Private, OMPC_LastPrivate, OMPC_FirstPrivate, - OMPC_Reduction, OMPC_NoWait, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Section : Directive<"section"> {} def OMP_Single : Directive<"single"> { - let allowedClauses = [OMPC_Private, OMPC_FirstPrivate, OMPC_CopyPrivate, - OMPC_NoWait, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Master : Directive<"master"> {} def OMP_Critical : Directive<"critical"> { - let allowedClauses = [OMPC_Hint]; + let allowedClauses = [ + VersionedClause + ]; } def OMP_TaskYield : Directive<"taskyield"> {} def OMP_Barrier : Directive<"barrier"> {} def OMP_TaskWait : Directive<"taskwait"> {} def OMP_TaskGroup : Directive<"taskgroup"> { - let allowedClauses = [OMPC_TaskReduction, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause + ]; } def OMP_Flush : Directive<"flush"> { - let allowedClauses = [OMPC_AcqRel, OMPC_Acquire, OMPC_Release, OMPC_Flush]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + // TODO This should ne `none` instead. Comment carried over from + // OMPKinds.def. + VersionedClause + ]; } def OMP_Ordered : Directive<"ordered"> { - let allowedClauses = [OMPC_Threads, OMPC_Simd, OMPC_Depend]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Atomic : Directive<"atomic"> { - let allowedClauses = [OMPC_Read, OMPC_Write, OMPC_Update, OMPC_Capture, - OMPC_SeqCst, OMPC_AcqRel, OMPC_Acquire, OMPC_Release, OMPC_Relaxed, - OMPC_Hint]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Target : Directive<"target"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_Reduction, OMPC_Allocate, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Teams : Directive<"teams"> { - let allowedClauses = [OMPC_Default, OMPC_Private, OMPC_FirstPrivate, - OMPC_Shared, OMPC_Reduction, OMPC_NumTeams, OMPC_ThreadLimit, - OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Cancel : Directive<"cancel"> { - let allowedClauses = [OMPC_If]; + let allowedClauses = [ + VersionedClause + ]; } def OMP_Requires : Directive<"requires"> { - let allowedClauses = [OMPC_UnifiedAddress, OMPC_UnifiedSharedMemory, - OMPC_ReverseOffload, OMPC_DynamicAllocators, OMPC_AtomicDefaultMemOrder]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetData : Directive<"target data"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_UseDevicePtr, - OMPC_UseDevicePtr]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetEnterData : Directive<"target enter data"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_NoWait, - OMPC_Depend]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetExitData : Directive<"target exit data"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_NoWait, - OMPC_Depend]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetParallel : Directive<"target parallel"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_NoWait, - OMPC_Depend, OMPC_Private, OMPC_FirstPrivate, OMPC_DefaultMap, - OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, OMPC_Shared, OMPC_Reduction, - OMPC_IsDevicePtr, OMPC_Allocator, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetParallelFor : Directive<"target parallel for"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_NoWait, OMPC_Depend, - OMPC_DefaultMap, OMPC_NumThreads, OMPC_DefaultMap, OMPC_ProcBind, - OMPC_Shared, OMPC_Reduction, OMPC_Collapse, OMPC_Schedule, OMPC_Ordered, - OMPC_Linear, OMPC_IsDevicePtr, OMPC_Allocator, OMPC_Order, - OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetUpdate : Directive<"target update"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_To, OMPC_From, OMPC_NoWait, - OMPC_Depend]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelFor : Directive<"parallel for"> { - let allowedClauses = [OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_FirstPrivate, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, - OMPC_LastPrivate, OMPC_Collapse, OMPC_Schedule, OMPC_Ordered, OMPC_Linear, - OMPC_Allocate, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelForSimd : Directive<"parallel for simd"> { - let allowedClauses = [OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_FirstPrivate, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, - OMPC_LastPrivate, OMPC_Collapse, OMPC_Schedule, OMPC_SafeLen, - OMPC_SimdLen, OMPC_Linear, OMPC_Aligned, OMPC_Ordered, OMPC_Allocate, - OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelMaster : Directive<"parallel master"> { - let allowedClauses = [OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_Private, - OMPC_FirstPrivate, OMPC_Shared, OMPC_Copyin, OMPC_Reduction, - OMPC_ProcBind, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelSections : Directive<"parallel sections"> { - let allowedClauses = [OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_FirstPrivate, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, - OMPC_LastPrivate, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ForSimd : Directive<"for simd"> { - let allowedClauses = [OMPC_Private, OMPC_FirstPrivate, OMPC_LastPrivate, - OMPC_Reduction, OMPC_Schedule, OMPC_Collapse, OMPC_NoWait, OMPC_SafeLen, - OMPC_SimdLen, OMPC_Linear, OMPC_Aligned, OMPC_Ordered, OMPC_Allocate, - OMPC_If, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + ]; } def OMP_CancellationPoint : Directive<"cancellation point"> {} def OMP_DeclareReduction : Directive<"declare reduction"> {} def OMP_DeclareMapper : Directive<"declare mapper"> { - let allowedClauses = [OMPC_Map]; + let allowedClauses = [ + VersionedClause + ]; } def OMP_DeclareSimd : Directive<"declare simd"> {} def OMP_TaskLoop : Directive<"taskloop"> { - let allowedClauses = [OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_Default, OMPC_Collapse, OMPC_Final, OMPC_Untied, - OMPC_Mergeable, OMPC_Priority, OMPC_GrainSize, OMPC_NoGroup, - OMPC_NumTasks, OMPC_Reduction, OMPC_InReduction, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TaskLoopSimd : Directive<"taskloop simd"> { - let allowedClauses = [OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_Default, OMPC_Collapse, OMPC_Final, OMPC_Untied, - OMPC_Mergeable, OMPC_Priority, OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, - OMPC_SimdLen, OMPC_GrainSize, OMPC_NoGroup, OMPC_NumTasks, OMPC_Reduction, - OMPC_InReduction, OMPC_Allocator, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + ]; } def OMP_Distribute : Directive<"distribute"> { - let allowedClauses = [OMPC_Private, OMPC_FirstPrivate, OMPC_LastPrivate, - OMPC_Collapse, OMPC_DistSchedule, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_DeclareTarget : Directive<"declare target"> {} def OMP_EndDeclareTarget : Directive<"end declare target"> {} def OMP_DistributeParallelFor : Directive<"distribute parallel for"> { - let allowedClauses = [OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, OMPC_Schedule, - OMPC_Allocate, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_DistributeParallelForSimd : Directive<"distribute parallel for simd"> { - let allowedClauses = [OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_Shared, OMPC_Reduction, OMPC_Copyin, OMPC_Schedule, - OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_Allocate, - OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_DistributeSimd : Directive<"distribute simd"> { - let allowedClauses = [OMPC_Private, OMPC_FirstPrivate, OMPC_LastPrivate, - OMPC_Collapse, OMPC_DistSchedule, OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, - OMPC_SimdLen, OMPC_Reduction, OMPC_Allocate, OMPC_If, OMPC_NonTemporal, - OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetParallelForSimd : Directive<"target parallel for simd"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_NoWait, OMPC_Depend, - OMPC_DefaultMap, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Shared, OMPC_Reduction, OMPC_Collapse, OMPC_Schedule, OMPC_Ordered, - OMPC_Linear, OMPC_SafeLen, OMPC_SimdLen, OMPC_Aligned, OMPC_IsDevicePtr, - OMPC_Allocate, OMPC_NonTemporal, OMPC_Order, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetSimd : Directive<"target simd"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_LastPrivate, OMPC_Linear, OMPC_Aligned, - OMPC_SafeLen, OMPC_SimdLen, OMPC_Collapse, OMPC_Reduction, OMPC_Allocate, - OMPC_NonTemporal, OMPC_Order, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TeamsDistribute : Directive<"teams distribute"> { - let allowedClauses = [OMPC_Default, OMPC_Private, OMPC_FirstPrivate, - OMPC_Shared, OMPC_Reduction, OMPC_NumTeams, OMPC_ThreadLimit, - OMPC_LastPrivate, OMPC_Collapse, OMPC_DistSchedule, OMPC_Allocate]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> { - let allowedClauses = [OMPC_Default, OMPC_Private, OMPC_FirstPrivate, - OMPC_Shared, OMPC_Reduction, OMPC_NumTeams, OMPC_ThreadLimit, - OMPC_LastPrivate, OMPC_Collapse, OMPC_DistSchedule, OMPC_Linear, - OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_Allocate, OMPC_If, - OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TeamsDistributeParallelForSimd : Directive<"teams distribute parallel for simd"> { - let allowedClauses = [OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_Shared, OMPC_Reduction, OMPC_Schedule, OMPC_Linear, - OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_NumTeams, OMPC_ThreadLimit, - OMPC_Allocate, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TeamsDistributeParallelFor : Directive<"teams distribute parallel for"> { - let allowedClauses = [OMPC_FirstPrivate, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_If, OMPC_NumThreads, OMPC_Default, OMPC_ProcBind, - OMPC_Private, OMPC_Shared, OMPC_Reduction, OMPC_Schedule, OMPC_NumTeams, - OMPC_ThreadLimit, OMPC_Copyin, OMPC_Allocate, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetTeams : Directive<"target teams"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_Default, OMPC_Shared, OMPC_Reduction, - OMPC_NumTeams, OMPC_ThreadLimit, OMPC_Allocate, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_Default, OMPC_Shared, OMPC_Reduction, - OMPC_NumTeams, OMPC_ThreadLimit, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_Allocate, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetTeamsDistributeParallelFor : Directive<"target teams distribute parallel for"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_Default, OMPC_Shared, OMPC_Reduction, - OMPC_NumTeams, OMPC_ThreadLimit, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_NumThreads, OMPC_ProcBind, OMPC_Schedule, - OMPC_Allocate, OMPC_Order, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetTeamsDistributeParallelForSimd : Directive<"target teams distribute parallel for simd"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_IsDevicePtr, OMPC_Default, OMPC_Shared, OMPC_Reduction, - OMPC_NumTeams, OMPC_ThreadLimit, OMPC_LastPrivate, OMPC_Collapse, - OMPC_DistSchedule, OMPC_NumThreads, OMPC_ProcBind, OMPC_Schedule, - OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_Allocate, - OMPC_NonTemporal, OMPC_Order, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_TargetTeamsDistributeSimd : Directive<"target teams distribute simd"> { - let allowedClauses = [OMPC_If, OMPC_Device, OMPC_Map, OMPC_Private, - OMPC_NoWait, OMPC_Depend, OMPC_DefaultMap, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_IsDevicePtr, OMPC_Shared, OMPC_Reduction, - OMPC_NumTeams, OMPC_ThreadLimit, OMPC_Collapse, OMPC_DistSchedule, - OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, OMPC_SimdLen, OMPC_Allocate, - OMPC_NonTemporal, OMPC_Order, OMPC_UsesAllocators]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Allocate : Directive<"allocate"> { - let allowedClauses = [OMPC_Allocator]; + let allowedClauses = [ + VersionedClause + ]; } def OMP_DeclareVariant : Directive<"declare variant"> { - let allowedClauses = [OMPC_Match]; + let allowedClauses = [ + VersionedClause + ]; } def OMP_MasterTaskloop : Directive<"master taskloop"> { let allowedClauses = [ - OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, OMPC_LastPrivate, - OMPC_Default, OMPC_Collapse, OMPC_Final, OMPC_Untied, OMPC_Mergeable, - OMPC_Priority, OMPC_GrainSize, OMPC_NoGroup, OMPC_NumTasks, - OMPC_Reduction, OMPC_InReduction, OMPC_Allocate]; + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelMasterTaskloop : Directive<"parallel master taskloop"> { - let allowedClauses = [OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_Default, OMPC_Collapse, OMPC_Final, OMPC_Untied, - OMPC_Mergeable, OMPC_Priority, OMPC_GrainSize, OMPC_NoGroup, - OMPC_NumTasks, OMPC_Reduction, OMPC_Allocate, OMPC_NumThreads, - OMPC_ProcBind, OMPC_Copyin]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_MasterTaskloopSimd : Directive<"master taskloop simd"> { - let allowedClauses = [OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_DefaultMap, OMPC_Collapse, OMPC_Final, OMPC_Untied, - OMPC_Mergeable, OMPC_Priority, OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, - OMPC_SimdLen, OMPC_GrainSize, OMPC_NoGroup, OMPC_NumTasks, OMPC_Reduction, - OMPC_InReduction, OMPC_Allocate, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_ParallelMasterTaskloopSimd : Directive<"parallel master taskloop simd"> { - let allowedClauses = [OMPC_If, OMPC_Shared, OMPC_Private, OMPC_FirstPrivate, - OMPC_LastPrivate, OMPC_Default, OMPC_Collapse, OMPC_Final, OMPC_Untied, - OMPC_Mergeable, OMPC_Priority, OMPC_GrainSize, OMPC_NoGroup, - OMPC_NumTasks, OMPC_Reduction, OMPC_Allocate, OMPC_NumThreads, - OMPC_ProcBind, OMPC_Copyin, OMPC_Linear, OMPC_Aligned, OMPC_SafeLen, - OMPC_SimdLen, OMPC_NonTemporal, OMPC_Order]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause, + VersionedClause + ]; } def OMP_Depobj : Directive<"depobj"> { - let allowedClauses = [OMPC_Depend, OMPC_Destroy, OMPC_Update, OMPC_Depobj]; + let allowedClauses = [ + VersionedClause, + VersionedClause, + VersionedClause, + // TODO This should ne `none` instead. Comment carried over from + // OMPKinds.def. + VersionedClause + ]; } def OMP_Scan : Directive<"scan"> { - let allowedClauses = [OMPC_Inclusive, OMPC_Exclusive]; + let allowedClauses = [ + VersionedClause, + VersionedClause + ]; } def OMP_BeginDeclareVariant : Directive<"begin declare variant"> {} def OMP_EndDeclareVariant : Directive<"end declare variant"> {} diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h --- a/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h +++ b/llvm/include/llvm/Frontend/OpenMP/OMPConstants.h @@ -89,9 +89,6 @@ #define OMP_IDENT_FLAG(Enum, ...) constexpr auto Enum = omp::IdentFlag::Enum; #include "llvm/Frontend/OpenMP/OMPKinds.def" -/// Return true if \p C is a valid clause for \p D in version \p Version. -bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version); - /// Forward declarations for LLVM-IR types (simple, function and structure) are /// generated below. Their names are defined and used in OpenMP/OMPKinds.def. /// Here we provide the forward declarations, the initializeTypes function will diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def --- a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def +++ b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def @@ -1147,746 +1147,3 @@ #undef __OMP_REQUIRES_TRAIT #undef OMP_REQUIRES_TRAIT ///} - - -/// Clauses allowed per directive -/// -///{ - -#ifndef OMP_DIRECTIVE_CLAUSE -#define OMP_DIRECTIVE_CLAUSE(Directive, MinVersion, MaxVersion, Clause) -#endif - -#define __OMP_DIRECTIVE_CLAUSE(Directive, MinVersion, MaxVersion, Clause) \ - OMP_DIRECTIVE_CLAUSE(OMPD_##Directive, unsigned(MinVersion), \ - unsigned(MaxVersion), OMPC_##Clause) - -__OMP_DIRECTIVE_CLAUSE(scan, 50, ~0, inclusive) -__OMP_DIRECTIVE_CLAUSE(scan, 50, ~0, exclusive) - -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, if) -__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, ordered) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(for, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~1, ordered) -__OMP_DIRECTIVE_CLAUSE(for_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, if) -__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(for_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(sections, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, copyprivate) -__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(single, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(cancel, 1, ~0, if) - -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~1, ordered) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(parallel_for, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~1, ordered) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(parallel_for_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_master, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_sections, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, in_reduction) -__OMP_DIRECTIVE_CLAUSE(task, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(task, 50, ~0, detach) -__OMP_DIRECTIVE_CLAUSE(task, 50, ~0, affinity) - -__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, read) -__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, write) -__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, update) -__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, capture) -__OMP_DIRECTIVE_CLAUSE(atomic, 1, ~0, seq_cst) -__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, acq_rel) -__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, acquire) -__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, release) -__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, relaxed) -__OMP_DIRECTIVE_CLAUSE(atomic, 50, ~0, hint) - -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, unified_address) -__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, unified_shared_memory) -__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, reverse_offload) -__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, dynamic_allocators) -__OMP_DIRECTIVE_CLAUSE(requires, 1, ~0, atomic_default_mem_order) - -__OMP_DIRECTIVE_CLAUSE(allocate, 1, ~0, allocator) - -__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_data, 1, ~0, use_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_data, 50, ~0, use_device_addr) - -__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_enter_data, 1, ~0, depend) - -__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_exit_data, 1, ~0, depend) - -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_parallel, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~1, ordered) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, to) -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, from) -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_update, 1, ~0, depend) - -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(teams, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, threads) -__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, simd) -__OMP_DIRECTIVE_CLAUSE(ordered, 1, ~0, depend) - -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, in_reduction) -__OMP_DIRECTIVE_CLAUSE(taskloop, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, in_reduction) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(taskloop_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, in_reduction) -__OMP_DIRECTIVE_CLAUSE(master_taskloop, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, in_reduction) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(master_taskloop_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop, 1, ~0, copyin) - -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, final) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, untied) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, mergeable) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, priority) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, grainsize) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, nogroup) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, num_tasks) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(parallel_master_taskloop_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(critical, 1, ~0, hint) - -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(distribute, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(distribute_parallel_for_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, if) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(distribute_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~1, ordered) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_parallel_for_simd, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(target_simd, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_simd, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, if) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for_simd, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, copyin) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(teams_distribute_parallel_for, 50, ~0, order) - -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(target_teams, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_teams, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, - firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, - is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, default) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, - thread_limit) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, - dist_schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, num_threads) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, proc_bind) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for, 50, ~0, - uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - private) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - default) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - reduction) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - num_teams) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - thread_limit) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - collapse) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - dist_schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - num_threads) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - proc_bind) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - aligned) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - safelen) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - simdlen) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 1, ~0, - allocate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 50, ~0, - nontemporal) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_parallel_for_simd, 50, ~0, - uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, if) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, device) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, map) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, private) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, nowait) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, defaultmap) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, firstprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, lastprivate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, is_device_ptr) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, shared) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, reduction) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, num_teams) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, thread_limit) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, collapse) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, dist_schedule) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, linear) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, aligned) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, safelen) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, simdlen) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 1, ~0, allocate) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 50, ~0, nontemporal) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 50, ~0, order) -__OMP_DIRECTIVE_CLAUSE(target_teams_distribute_simd, 50, ~0, uses_allocators) - -__OMP_DIRECTIVE_CLAUSE(taskgroup, 1, ~0, task_reduction) -__OMP_DIRECTIVE_CLAUSE(taskgroup, 1, ~0, allocate) - -__OMP_DIRECTIVE_CLAUSE(declare_mapper, 1, ~0, map) - -__OMP_DIRECTIVE_CLAUSE(declare_variant, 1, ~0, match) - -__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, acq_rel) -__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, acquire) -__OMP_DIRECTIVE_CLAUSE(flush, 50, ~0, release) -// TODO This should ne `none` instead -__OMP_DIRECTIVE_CLAUSE(flush, 1, ~0, flush) - -__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, depend) -__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, destroy) -__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, update) -// TODO This should ne `none` instead -__OMP_DIRECTIVE_CLAUSE(depobj, 50, ~0, depobj) - -#undef __OMP_DIRECTIVE_CLAUSE -#undef OMP_DIRECTIVE_CLAUSE -///} diff --git a/llvm/lib/Frontend/OpenMP/OMPConstants.cpp b/llvm/lib/Frontend/OpenMP/OMPConstants.cpp --- a/llvm/lib/Frontend/OpenMP/OMPConstants.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPConstants.cpp @@ -21,17 +21,6 @@ #include "llvm/Frontend/OpenMP/OMP.cpp.inc" -bool llvm::omp::isAllowedClauseForDirective(Directive D, Clause C, - unsigned Version) { - assert(unsigned(D) <= llvm::omp::Directive_enumSize); - assert(unsigned(C) <= llvm::omp::Clause_enumSize); -#define OMP_DIRECTIVE_CLAUSE(Dir, MinVersion, MaxVersion, Cl) \ - if (D == Dir && C == Cl && MinVersion <= Version && MaxVersion >= Version) \ - return true; -#include "llvm/Frontend/OpenMP/OMPKinds.def" - return false; -} - /// Declarations for LLVM-IR types (simple, array, function and structure) are /// generated below. Their names are defined and used in OpenMPKinds.def. Here /// we provide the declarations, the initializeTypes function will provide the diff --git a/llvm/test/TableGen/directive1.td b/llvm/test/TableGen/directive1.td --- a/llvm/test/TableGen/directive1.td +++ b/llvm/test/TableGen/directive1.td @@ -19,7 +19,10 @@ } def TDL_DirA : Directive<"dira"> { - let allowedClauses = [TDLC_ClauseA, TDLC_ClauseB]; + let allowedClauses = [ + VersionedClause, + VersionedClause + ]; let isDefault = 1; } @@ -61,6 +64,9 @@ // CHECK-EMPTY: // CHECK-NEXT: llvm::StringRef getTdlClauseName(Clause C); // CHECK-EMPTY: +// CHECK-NEXT: /// Return true if \p C is a valid clause for \p D in version \p Version. +// CHECK-NEXT: bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version); +// CHECK-EMPTY: // CHECK-NEXT: } // namespace tdl // CHECK-NEXT: } // namespace llvm // CHECK-NEXT: #endif // LLVM_Tdl_INC @@ -96,3 +102,13 @@ // IMPL-NEXT: } // IMPL-NEXT: llvm_unreachable("Invalid Tdl Clause kind"); // IMPL-NEXT: } +// IMPL-EMPTY: +// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(Directive D, Clause C, unsigned Version) { +// IMPL-NEXT: assert(unsigned(D) <= llvm::tdl::Directive_enumSize); +// IMPL-NEXT: assert(unsigned(C) <= llvm::tdl::Clause_enumSize); +// IMPL-NEXT: if (D == TDLD_dira && C == TDLC_clausea && 1 <= Version && 2147483647 >= Version) +// IMPL-NEXT: return true; +// IMPL-NEXT: if (D == TDLD_dira && C == TDLC_clauseb && 1 <= Version && 2147483647 >= Version) +// IMPL-NEXT: return true; +// IMPL-NEXT: return false; +// IMPL-NEXT: } diff --git a/llvm/test/TableGen/directive2.td b/llvm/test/TableGen/directive2.td --- a/llvm/test/TableGen/directive2.td +++ b/llvm/test/TableGen/directive2.td @@ -19,7 +19,10 @@ } def TDL_DirA : Directive<"dira"> { - let allowedClauses = [TDLC_ClauseA, TDLC_ClauseB]; + let allowedClauses = [ + VersionedClause, + VersionedClause + ]; let isDefault = 1; } @@ -52,6 +55,9 @@ // CHECK-EMPTY: // CHECK-NEXT: llvm::StringRef getTdlClauseName(Clause C); // CHECK-EMPTY: +// CHECK-NEXT: /// Return true if \p C is a valid clause for \p D in version \p Version. +// CHECK-NEXT: bool isAllowedClauseForDirective(Directive D, Clause C, unsigned Version); +// CHECK-EMPTY: // CHECK-NEXT: } // namespace tdl // CHECK-NEXT: } // namespace llvm // CHECK-NEXT: #endif // LLVM_Tdl_INC @@ -86,4 +92,15 @@ // IMPL-NEXT: return "clauseb"; // IMPL-NEXT: } // IMPL-NEXT: llvm_unreachable("Invalid Tdl Clause kind"); -// IMPL-NEXT: } \ No newline at end of file +// IMPL-NEXT: } +// IMPL-EMPTY: +// IMPL-NEXT: bool llvm::tdl::isAllowedClauseForDirective(Directive D, Clause C, unsigned Version) { +// IMPL-NEXT: assert(unsigned(D) <= llvm::tdl::Directive_enumSize); +// IMPL-NEXT: assert(unsigned(C) <= llvm::tdl::Clause_enumSize); +// IMPL-NEXT: if (D == TDLD_dira && C == TDLC_clausea && 2 <= Version && 4 >= Version) +// IMPL-NEXT: return true; +// IMPL-NEXT: if (D == TDLD_dira && C == TDLC_clauseb && 2 <= Version && 2147483647 >= Version) +// IMPL-NEXT: return true; +// IMPL-NEXT: return false; +// IMPL-NEXT: } + diff --git a/llvm/utils/TableGen/DirectiveEmitter.cpp b/llvm/utils/TableGen/DirectiveEmitter.cpp --- a/llvm/utils/TableGen/DirectiveEmitter.cpp +++ b/llvm/utils/TableGen/DirectiveEmitter.cpp @@ -22,6 +22,14 @@ namespace llvm { +// Get Directive or Clause name formatted by replacing whitespaces with +// underscores. +std::string getFormattedName(StringRef Name) { + std::string N = Name.str(); + std::replace(N.begin(), N.end(), ' ', '_'); + return N; +} + // Generate enum class void GenerateEnumClass(const std::vector &Records, raw_ostream &OS, StringRef Enum, StringRef Prefix, StringRef CppNamespace, @@ -30,9 +38,7 @@ OS << "enum class " << Enum << " {\n"; for (const auto &R : Records) { const auto Name = R->getValueAsString("name"); - std::string N = Name.str(); - std::replace(N.begin(), N.end(), ' ', '_'); - OS << " " << Prefix << N << ",\n"; + OS << " " << Prefix << getFormattedName(Name) << ",\n"; } OS << "};\n"; OS << "\n"; @@ -47,12 +53,10 @@ if (MakeEnumAvailableInNamespace) { OS << "\n"; for (const auto &R : Records) { - const auto Name = R->getValueAsString("name"); - std::string N = Name.str(); - std::replace(N.begin(), N.end(), ' ', '_'); - OS << "constexpr auto " << Prefix << N << " = " - << "llvm::" << CppNamespace << "::" << Enum << "::" << Prefix << N - << ";\n"; + const auto FormattedName = getFormattedName(R->getValueAsString("name")); + OS << "constexpr auto " << Prefix << FormattedName << " = " + << "llvm::" << CppNamespace << "::" << Enum << "::" << Prefix + << FormattedName << ";\n"; } } } @@ -122,6 +126,11 @@ OS << "\n"; OS << "llvm::StringRef get" << LanguageName << "ClauseName(Clause C);\n"; OS << "\n"; + OS << "/// Return true if \\p C is a valid clause for \\p D in version \\p " + << "Version.\n"; + OS << "bool isAllowedClauseForDirective(Directive D, " + << "Clause C, unsigned Version);\n"; + OS << "\n"; // Closing namespaces for (auto Ns : llvm::reverse(Namespaces)) @@ -143,9 +152,7 @@ for (const auto &R : Records) { const auto Name = R->getValueAsString("name"); const auto AlternativeName = R->getValueAsString("alternativeName"); - std::string N = Name.str(); - std::replace(N.begin(), N.end(), ' ', '_'); - OS << " case " << Prefix << N << ":\n"; + OS << " case " << Prefix << getFormattedName(Name) << ":\n"; OS << " return \""; if (AlternativeName.empty()) OS << Name; @@ -173,9 +180,8 @@ return; } - const auto DefaultName = (*DefaultIt)->getValueAsString("name"); - std::string DefaultEnum = DefaultName.str(); - std::replace(DefaultEnum.begin(), DefaultEnum.end(), ' ', '_'); + const auto FormattedDefaultName = + getFormattedName((*DefaultIt)->getValueAsString("name")); OS << "\n"; OS << Enum << " llvm::" << Namespace << "::get" << LanguageName << Enum @@ -184,15 +190,66 @@ for (const auto &R : Records) { const auto Name = R->getValueAsString("name"); - std::string N = Name.str(); - std::replace(N.begin(), N.end(), ' ', '_'); if (ImplicitAsUnknown && R->getValueAsBit("isImplicit")) { - OS << " .Case(\"" << Name << "\"," << Prefix << DefaultEnum << ")\n"; + OS << " .Case(\"" << Name << "\"," << Prefix << FormattedDefaultName + << ")\n"; } else { - OS << " .Case(\"" << Name << "\"," << Prefix << N << ")\n"; + OS << " .Case(\"" << Name << "\"," << Prefix << getFormattedName(Name) + << ")\n"; } } - OS << " .Default(" << Prefix << DefaultEnum << ");\n"; + OS << " .Default(" << Prefix << FormattedDefaultName << ");\n"; + OS << "}\n"; +} + +void GenerateTestForAllowedClauses(const std::vector &Clauses, + raw_ostream &OS, StringRef DirectiveName, + StringRef DirectivePrefix, + StringRef ClausePrefix) { + + const auto FormattedDirectiveName = getFormattedName(DirectiveName); + for (const auto &C : Clauses) { + const auto MinVersion = C->getValueAsInt("minVersion"); + const auto MaxVersion = C->getValueAsInt("maxVersion"); + const auto SpecificClause = C->getValueAsDef("clause"); + const auto ClauseName = SpecificClause->getValueAsString("name"); + + OS << " if (D == " << DirectivePrefix << FormattedDirectiveName + << " && C == " << ClausePrefix << getFormattedName(ClauseName) << " && " + << MinVersion << " <= Version && " << MaxVersion << " >= Version)\n"; + OS << " return true;\n"; + } +} + +// Generate the isAllowedClauseForDirective function implementation. +void GenerateIsAllowedClause(const std::vector &Directives, + raw_ostream &OS, StringRef DirectivePrefix, + StringRef ClausePrefix, StringRef CppNamespace) { + OS << "\n"; + OS << "bool llvm::" << CppNamespace << "::isAllowedClauseForDirective(" + << "Directive D, Clause C, unsigned Version) {\n"; + OS << " assert(unsigned(D) <= llvm::" << CppNamespace + << "::Directive_enumSize);\n"; + OS << " assert(unsigned(C) <= llvm::" << CppNamespace + << "::Clause_enumSize);\n"; + + for (const auto &D : Directives) { + const auto DirectiveName = D->getValueAsString("name"); + + const auto &AllowedClauses = D->getValueAsListOfDefs("allowedClauses"); + GenerateTestForAllowedClauses(AllowedClauses, OS, DirectiveName, + DirectivePrefix, ClausePrefix); + + const auto &AllowedOnceClauses = + D->getValueAsListOfDefs("allowedOnceClauses"); + GenerateTestForAllowedClauses(AllowedOnceClauses, OS, DirectiveName, + DirectivePrefix, ClausePrefix); + + const auto &RequiredClauses = D->getValueAsListOfDefs("requiredClauses"); + GenerateTestForAllowedClauses(RequiredClauses, OS, DirectiveName, + DirectivePrefix, ClausePrefix); + } + OS << " return false;\n"; OS << "}\n"; } @@ -233,6 +290,11 @@ // getClauseName(Clause Kind) GenerateGetName(Clauses, OS, "Clause", ClausePrefix, LanguageName, CppNamespace); + + GenerateIsAllowedClause(Directives, OS, DirectivePrefix, ClausePrefix, + CppNamespace); + + OS << "\n"; // Empty line at end of file } } // namespace llvm