diff --git a/flang/lib/Semantics/check-omp-structure.h b/flang/lib/Semantics/check-omp-structure.h --- a/flang/lib/Semantics/check-omp-structure.h +++ b/flang/lib/Semantics/check-omp-structure.h @@ -60,13 +60,16 @@ Directive::OMPD_parallel_workshare, Directive::OMPD_parallel_sections, Directive::OMPD_sections, Directive::OMPD_single} | doSet}; -static OmpDirectiveSet taskloopSet{ - Directive::OMPD_taskloop, Directive::OMPD_taskloop_simd}; +static OmpDirectiveSet taskloopSet{Directive::OMPD_taskloop, + Directive::OMPD_taskloop_simd, Directive::OMPD_tile, + Directive::OMPD_unroll}; static OmpDirectiveSet targetSet{Directive::OMPD_target, Directive::OMPD_target_parallel, Directive::OMPD_target_parallel_do, Directive::OMPD_target_parallel_do_simd, Directive::OMPD_target_simd, Directive::OMPD_target_teams, Directive::OMPD_target_teams_distribute, - Directive::OMPD_target_teams_distribute_simd}; + Directive::OMPD_target_teams_distribute_simd, Directive::OMPD_tile, + OMPD_unroll}; +static OmpDirectiveSet tileSet{Directive::OMPD_tile}; static OmpDirectiveSet simdSet{Directive::OMPD_distribute_parallel_do_simd, Directive::OMPD_distribute_simd, Directive::OMPD_parallel_do_simd, Directive::OMPD_do_simd, Directive::OMPD_simd, @@ -85,6 +88,7 @@ Directive::OMPD_teams_distribute_simd}; static OmpDirectiveSet taskGeneratingSet{ OmpDirectiveSet{Directive::OMPD_task} | taskloopSet}; +static OmpDirectiveSet unrollSet{Directive::OMPD_unroll}; static OmpDirectiveSet nestedOrderedErrSet{Directive::OMPD_critical, Directive::OMPD_ordered, Directive::OMPD_atomic, Directive::OMPD_task, Directive::OMPD_taskloop}; @@ -250,6 +254,8 @@ const parser::DefinedOperator::IntrinsicOperator &); void CheckReductionTypeList(const parser::OmpClause::Reduction &); void CheckMasterNesting(const parser::OpenMPBlockConstruct &x); + void CheckTileConstruct(const parser::OpenMPLoopConstruct &x); + void CheckUnrollConstruct(const parser::OpenMPLoopConstruct &x); void ChecksOnOrderedAsBlock(); void CheckBarrierNesting(const parser::OpenMPSimpleStandaloneConstruct &x); void ChecksOnOrderedAsStandalone(); diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp --- a/flang/lib/Semantics/check-omp-structure.cpp +++ b/flang/lib/Semantics/check-omp-structure.cpp @@ -376,7 +376,6 @@ void OmpStructureChecker::Enter(const parser::OpenMPLoopConstruct &x) { const auto &beginLoopDir{std::get(x.t)}; const auto &beginDir{std::get(beginLoopDir.t)}; - // check matching, End directive is optional if (const auto &endLoopDir{ std::get>(x.t)}) { @@ -420,6 +419,13 @@ llvm::omp::teamSet.test(GetContextParent().directive)) { HasInvalidTeamsNesting(beginDir.v, beginDir.source); } + if (beginDir.v == llvm::omp::Directive::OMPD_tile) { + CheckTileConstruct(x); + } + if (beginDir.v == llvm::omp::Directive::OMPD_unroll) { + CheckUnrollConstruct(x); + } + if ((beginDir.v == llvm::omp::Directive::OMPD_distribute_parallel_do_simd) || (beginDir.v == llvm::omp::Directive::OMPD_distribute_simd)) { CheckDistLinear(x); @@ -621,6 +627,7 @@ if (const auto *orderedClause{ std::get_if(&clause.u)}) { if (const auto v{GetIntValue(orderedClause->v)}) { + orderedLevel = *v; } } @@ -640,6 +647,46 @@ parser::Walk(x, ompCycleChecker); } +void OmpStructureChecker::CheckTileConstruct( + const parser::OpenMPLoopConstruct &x) { + + const auto &beginLoopDir{std::get(x.t)}; + const auto &clauseList{std::get(beginLoopDir.t)}; + + for (const auto &clause : clauseList.v) { + if (const auto *sizeClause{ + std::get_if(&clause.u)}) { + for (const auto &s : sizeClause->v) { + const auto u = GetIntValue(s); + if (*u < 0) { + context_.Say(clause.source, + "The parameter value of the Size clause must be greater than " + "zero "_err_en_US); + } + } + } + } +} + +void OmpStructureChecker::CheckUnrollConstruct( + const parser::OpenMPLoopConstruct &x) { + + const auto &beginLoopDir{std::get(x.t)}; + const auto &clauseList{std::get(beginLoopDir.t)}; + + for (const auto &clause : clauseList.v) { + if (const auto *sizeClause{ + std::get_if(&clause.u)}) { + const auto u = GetIntValue(sizeClause->v); + if (*u < 1) { + context_.Say(clause.source, + "The parameter value of the Partial clause must be greater than " + "one "_err_en_US); + } + } + } +} + void OmpStructureChecker::CheckDistLinear( const parser::OpenMPLoopConstruct &x) { diff --git a/flang/test/Parser/omp-tile-size.f90 b/flang/test/Parser/omp-tile-size.f90 --- a/flang/test/Parser/omp-tile-size.f90 +++ b/flang/test/Parser/omp-tile-size.f90 @@ -1,23 +1,29 @@ -! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s -! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s + ! RUN: %flang_fc1 -fdebug-unparse -fopenmp %s | FileCheck --ignore-case %s +! RUN: %flang_fc1 -fdebug-dump-parse-tree -fopenmp %s | FileCheck --check-prefix="PARSE-TREE" %s -subroutine openmp_tiles(x) +subroutine openmp_tiles(x, y, z) - integer, intent(inout)::x +integer, intent(inout)::x, y, z -!CHECK: !$omp tile sizes -!$omp tile sizes(2) -!CHECK: do - do x = 1, 100 - call F1() -!CHECK: end do - end do -!CHECK: !$omp end tile +!CHECK : !$omp tile sizes +!$omp tile sizes(2, 2, 2) +!CHECK : do +do x = 1, 100 +do y = 1, 100 +do z = 1, 100 + call F1() +!CHECK: end do +end do +end do +end do +!CHECK : !$omp end tile !$omp end tile +!PARSE-TREE: OpenMPConstruct->OpenMPLoopConstruct +!PARSE-TREE: OmpBeginLoopDirective +!PARSE-TREE: OmpLoopDirective->llvm::omp::Directive = tile +!PARSE-TREE : OmpClauseList->OmpClause->Sizes->Scalar->Integer->Expr = '2_4' END -!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct -!PARSE-TREE: OmpBeginLoopDirective -!PARSE-TREE: OmpLoopDirective -> llvm::omp::Directive = tile -!PARSE-TREE: OmpClauseList -> OmpClause -> Sizes -> Scalar -> Integer -> Expr = '2_4' -END subroutine openmp_tiles +subroutine openmp_tiles + + diff --git a/flang/test/Semantics/OpenMP/omp-do-tile.f90 b/flang/test/Semantics/OpenMP/omp-do-tile.f90 new file mode 100644 --- /dev/null +++ b/flang/test/Semantics/OpenMP/omp-do-tile.f90 @@ -0,0 +1,19 @@ +!RUN:% python %S/../test_errors.py %s %flang -fopenmp +!OpenMP Version 5.1 +!2.11.9.1 tile Cconstruct + +program omp_doTile + + integer::i, j, k + !ERROR : The parameter value of the Size clause must be greater than zero + !$omp tile size (2, -1, 2) + do i = 1, 10 + do j = 1, 10 + do k = 1, 10 + print *, "hello" + end do + end do + end do + !$omp end tile + +end program omp_doTile diff --git a/flang/test/Semantics/OpenMP/omp-do-unroll.f90 b/flang/test/Semantics/OpenMP/omp-do-unroll.f90 new file mode 100644 --- /dev/null +++ b/flang/test/Semantics/OpenMP/omp-do-unroll.f90 @@ -0,0 +1,13 @@ +!RUN : %python %S/../test_errors.py %s %flang -fopenmp +!OpenMP Version 5.1 +!2.11.9.2 unroll Cconstruct + + program omp_doUnroll + integer::j + !ERROR: The parameter value in the Partial clause must be greater thanone + !$omp unroll partial(-1) + do j = 1,10 + print *,"hello" + end do + !$omp end unroll +end program omp_doUnroll 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 @@ -67,19 +67,17 @@ let clangClass = "OMPPrivateClause"; let flangClass = "OmpObjectList"; } -def OMPC_Sizes: Clause<"sizes"> { - let clangClass = "OMPSizesClause"; +def OMPC_Sizes : Clause<"sizes"> { + let clangClass = "OMPSizesClause"; let flangClass = "ScalarIntExpr"; let isValueList = true; - } -def OMPC_Full: Clause<"full"> { - let clangClass = "OMPFullClause"; } -def OMPC_Partial: Clause<"partial"> { +def OMPC_Full : Clause<"full"> { let clangClass = "OMPFullClause"; } +def OMPC_Partial : Clause<"partial"> { let clangClass = "OMPPartialClause"; - let flangClass = "ScalarIntConstantExpr"; + let flangClass = "ScalarIntConstantExpr"; let isValueOptional = true; - } +} def OMPC_FirstPrivate : Clause<"firstprivate"> { let clangClass = "OMPFirstprivateClause"; let flangClass = "OmpObjectList"; @@ -112,23 +110,19 @@ let clangClass = "OMPCopyprivateClause"; let flangClass = "OmpObjectList"; } -def OMP_PROC_BIND_master : ClauseVal<"master",2,1> {} -def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {} -def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {} -def OMP_PROC_BIND_primary : ClauseVal<"primary",5,1> {} -def OMP_PROC_BIND_default : ClauseVal<"default",6,0> {} -def OMP_PROC_BIND_unknown : ClauseVal<"unknown",7,0> { let isDefault = true; } +def OMP_PROC_BIND_master : ClauseVal<"master", 2, 1> {} +def OMP_PROC_BIND_close : ClauseVal<"close", 3, 1> {} +def OMP_PROC_BIND_spread : ClauseVal<"spread", 4, 1> {} +def OMP_PROC_BIND_primary : ClauseVal<"primary", 5, 1> {} +def OMP_PROC_BIND_default : ClauseVal<"default", 6, 0> {} +def OMP_PROC_BIND_unknown : ClauseVal<"unknown", 7, 0> { let isDefault = true; } def OMPC_ProcBind : Clause<"proc_bind"> { let clangClass = "OMPProcBindClause"; let flangClass = "OmpProcBindClause"; let enumClauseValue = "ProcBindKind"; let allowedClauseValues = [ - OMP_PROC_BIND_primary, - OMP_PROC_BIND_master, - OMP_PROC_BIND_close, - OMP_PROC_BIND_spread, - OMP_PROC_BIND_default, - OMP_PROC_BIND_unknown + OMP_PROC_BIND_primary, OMP_PROC_BIND_master, OMP_PROC_BIND_close, + OMP_PROC_BIND_spread, OMP_PROC_BIND_default, OMP_PROC_BIND_unknown ]; } @@ -144,12 +138,8 @@ let flangClass = "OmpScheduleClause"; let enumClauseValue = "ScheduleKind"; let allowedClauseValues = [ - OMP_SCHEDULE_Static, - OMP_SCHEDULE_Dynamic, - OMP_SCHEDULE_Guided, - OMP_SCHEDULE_Auto, - OMP_SCHEDULE_Runtime, - OMP_SCHEDULE_Default + OMP_SCHEDULE_Static, OMP_SCHEDULE_Dynamic, OMP_SCHEDULE_Guided, + OMP_SCHEDULE_Auto, OMP_SCHEDULE_Runtime, OMP_SCHEDULE_Default ]; } @@ -158,18 +148,12 @@ def OMP_MEMORY_ORDER_Acquire : ClauseVal<"acquire", 3, 1> {} def OMP_MEMORY_ORDER_Release : ClauseVal<"release", 4, 1> {} def OMP_MEMORY_ORDER_Relaxed : ClauseVal<"relaxed", 5, 1> {} -def OMP_MEMORY_ORDER_Default : ClauseVal<"default", 6, 0> { - let isDefault = 1; -} +def OMP_MEMORY_ORDER_Default : ClauseVal<"default", 6, 0> { let isDefault = 1; } def OMPC_MemoryOrder : Clause<"memory_order"> { let enumClauseValue = "MemoryOrderKind"; let allowedClauseValues = [ - OMP_MEMORY_ORDER_SeqCst, - OMP_MEMORY_ORDER_AcqRel, - OMP_MEMORY_ORDER_Acquire, - OMP_MEMORY_ORDER_Release, - OMP_MEMORY_ORDER_Relaxed, - OMP_MEMORY_ORDER_Default + OMP_MEMORY_ORDER_SeqCst, OMP_MEMORY_ORDER_AcqRel, OMP_MEMORY_ORDER_Acquire, + OMP_MEMORY_ORDER_Release, OMP_MEMORY_ORDER_Relaxed, OMP_MEMORY_ORDER_Default ]; } @@ -184,10 +168,8 @@ def OMPC_CancellationConstructType : Clause<"cancellation_construct_type"> { let enumClauseValue = "CancellationConstructType"; let allowedClauseValues = [ - OMP_CANCELLATION_CONSTRUCT_Parallel, - OMP_CANCELLATION_CONSTRUCT_Loop, - OMP_CANCELLATION_CONSTRUCT_Sections, - OMP_CANCELLATION_CONSTRUCT_Taskgroup, + OMP_CANCELLATION_CONSTRUCT_Parallel, OMP_CANCELLATION_CONSTRUCT_Loop, + OMP_CANCELLATION_CONSTRUCT_Sections, OMP_CANCELLATION_CONSTRUCT_Taskgroup, OMP_CANCELLATION_CONSTRUCT_None ]; } @@ -197,9 +179,7 @@ let flangClass = "ScalarIntConstantExpr"; let isValueOptional = true; } -def OMPC_NoWait : Clause<"nowait"> { - let clangClass = "OMPNowaitClause"; -} +def OMPC_NoWait : Clause<"nowait"> { let clangClass = "OMPNowaitClause"; } def OMPC_Untied : Clause<"untied"> { let clangClass = "OMPUntiedClause"; } def OMPC_Mergeable : Clause<"mergeable"> { let clangClass = "OMPMergeableClause"; @@ -248,14 +228,9 @@ let clangClass = "OMPGrainsizeClause"; let flangClass = "ScalarIntExpr"; let enumClauseValue = "GrainsizeType"; - let allowedClauseValues = [ - OMP_GRAINSIZE_Strict, - OMP_GRAINSIZE_Unknown - ]; -} -def OMPC_NoGroup : Clause<"nogroup"> { - let clangClass = "OMPNogroupClause"; + let allowedClauseValues = [OMP_GRAINSIZE_Strict, OMP_GRAINSIZE_Unknown]; } +def OMPC_NoGroup : Clause<"nogroup"> { let clangClass = "OMPNogroupClause"; } def OMP_NUMTASKS_Strict : ClauseVal<"strict", 1, 1> {} def OMP_NUMTASKS_Unknown : ClauseVal<"unkonwn", 2, 0> { let isDefault = 1; } @@ -264,10 +239,7 @@ let clangClass = "OMPNumTasksClause"; let flangClass = "ScalarIntExpr"; let enumClauseValue = "NumTasksType"; - let allowedClauseValues = [ - OMP_NUMTASKS_Strict, - OMP_NUMTASKS_Unknown - ]; + let allowedClauseValues = [OMP_NUMTASKS_Strict, OMP_NUMTASKS_Unknown]; } def OMPC_Hint : Clause<"hint"> { let clangClass = "OMPHintClause"; @@ -329,15 +301,9 @@ let clangClass = "OMPAtomicDefaultMemOrderClause"; let flangClass = "OmpAtomicDefaultMemOrderClause"; } -def OMPC_At : Clause<"at"> { - let clangClass = "OMPAtClause"; -} -def OMPC_Severity : Clause<"severity"> { - let clangClass = "OMPSeverityClause"; -} -def OMPC_Message : Clause<"message"> { - let clangClass = "OMPMessageClause"; -} +def OMPC_At : Clause<"at"> { let clangClass = "OMPAtClause"; } +def OMPC_Severity : Clause<"severity"> { let clangClass = "OMPSeverityClause"; } +def OMPC_Message : Clause<"message"> { let clangClass = "OMPMessageClause"; } def OMPC_Allocate : Clause<"allocate"> { let clangClass = "OMPAllocateClause"; let flangClass = "OmpAllocateClause"; @@ -348,25 +314,16 @@ let isValueList = true; } -def OMP_ORDER_concurrent : ClauseVal<"concurrent",1,1> {} -def OMP_ORDER_unknown : ClauseVal<"unknown",2,0> { let isDefault = 1; } +def OMP_ORDER_concurrent : ClauseVal<"concurrent", 1, 1> {} +def OMP_ORDER_unknown : ClauseVal<"unknown", 2, 0> { let isDefault = 1; } def OMPC_Order : Clause<"order"> { let clangClass = "OMPOrderClause"; let enumClauseValue = "OrderKind"; - let allowedClauseValues = [ - OMP_ORDER_unknown, - OMP_ORDER_concurrent - ]; -} -def OMPC_Init : Clause<"init"> { - let clangClass = "OMPInitClause"; -} -def OMPC_Use : Clause<"use"> { - let clangClass = "OMPUseClause"; -} -def OMPC_Destroy : Clause<"destroy"> { - let clangClass = "OMPDestroyClause"; + let allowedClauseValues = [OMP_ORDER_unknown, OMP_ORDER_concurrent]; } +def OMPC_Init : Clause<"init"> { let clangClass = "OMPInitClause"; } +def OMPC_Use : Clause<"use"> { let clangClass = "OMPUseClause"; } +def OMPC_Destroy : Clause<"destroy"> { let clangClass = "OMPDestroyClause"; } def OMPC_Novariants : Clause<"novariants"> { let clangClass = "OMPNovariantsClause"; let flangClass = "ScalarLogicalExpr"; @@ -375,9 +332,7 @@ let clangClass = "OMPNocontextClause"; let flangClass = "ScalarLogicalExpr"; } -def OMPC_Detach : Clause<"detach"> { - let clangClass = "OMPDetachClause"; -} +def OMPC_Detach : Clause<"detach"> { let clangClass = "OMPDetachClause"; } def OMPC_Inclusive : Clause<"inclusive"> { let clangClass = "OMPInclusiveClause"; } @@ -387,9 +342,7 @@ def OMPC_UsesAllocators : Clause<"uses_allocators"> { let clangClass = "OMPUsesAllocatorsClause"; } -def OMPC_Affinity : Clause<"affinity"> { - let clangClass = "OMPAffinityClause"; -} +def OMPC_Affinity : Clause<"affinity"> { let clangClass = "OMPAffinityClause"; } def OMPC_UseDeviceAddr : Clause<"use_device_addr"> { let clangClass = "OMPUseDeviceAddrClause"; } @@ -399,8 +352,8 @@ } def OMPC_DeviceType : Clause<"device_type"> {} def OMPC_Match : Clause<"match"> {} -def OMPC_AdjustArgs : Clause<"adjust_args"> { } -def OMPC_AppendArgs : Clause<"append_args"> { } +def OMPC_AdjustArgs : Clause<"adjust_args"> {} +def OMPC_AppendArgs : Clause<"append_args"> {} def OMPC_Depobj : Clause<"depobj"> { let clangClass = "OMPDepobjClause"; let isImplicit = true; @@ -417,9 +370,7 @@ let isImplicit = true; let isDefault = true; } -def OMPC_Link : Clause<"link"> { - let flangClass = "OmpObjectList"; -} +def OMPC_Link : Clause<"link"> { let flangClass = "OmpObjectList"; } def OMPC_Indirect : Clause<"indirect"> {} def OMPC_Inbranch : Clause<"inbranch"> {} def OMPC_Notinbranch : Clause<"notinbranch"> {} @@ -427,14 +378,10 @@ let clangClass = "OMPFilterClause"; let flangClass = "ScalarIntExpr"; } -def OMPC_Align : Clause<"align"> { - let clangClass = "OMPAlignClause"; -} -def OMPC_When: Clause<"when"> {} +def OMPC_Align : Clause<"align"> { let clangClass = "OMPAlignClause"; } +def OMPC_When : Clause<"when"> {} -def OMPC_Bind : Clause<"bind"> { - let clangClass = "OMPBindClause"; -} +def OMPC_Bind : Clause<"bind"> { let clangClass = "OMPBindClause"; } def OMPC_OMPX_DynCGroupMem : Clause<"ompx_dyn_cgroup_mem"> { let clangClass = "OMPXDynCGroupMemClause"; @@ -448,12 +395,9 @@ def OMP_ThreadPrivate : Directive<"threadprivate"> {} def OMP_Parallel : Directive<"parallel"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -464,34 +408,23 @@ } def OMP_Task : Directive<"task"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_Simd : Directive<"simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -513,85 +446,64 @@ } def OMP_For : Directive<"for"> { 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_Do : Directive<"do"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_Sections : Directive<"sections"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_Section : Directive<"section"> {} def OMP_Single : Directive<"single"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_Master : Directive<"master"> {} def OMP_Critical : Directive<"critical"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; } def OMP_TaskYield : Directive<"taskyield"> {} def OMP_Barrier : Directive<"barrier"> {} def OMP_Error : Directive<"error"> { let allowedClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_TaskWait : Directive<"taskwait"> { - let allowedClauses = [ - VersionedClause, - VersionedClause - ]; + let allowedClauses = + [VersionedClause, VersionedClause]; } def OMP_TaskGroup : Directive<"taskgroup"> { let allowedClauses = [ - VersionedClause, - VersionedClause + VersionedClause, VersionedClause ]; } def OMP_Flush : Directive<"flush"> { let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause, // TODO This should ne `none` instead. Comment carried over from // OMPKinds.def. @@ -599,43 +511,29 @@ ]; } def OMP_Ordered : Directive<"ordered"> { - let allowedClauses = [ - VersionedClause - ]; - let allowedOnceClauses = [ - VersionedClause, - VersionedClause - ]; + let allowedClauses = [VersionedClause]; + let allowedOnceClauses = + [VersionedClause, VersionedClause]; } def OMP_Atomic : Directive<"atomic"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_Target : Directive<"target"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ @@ -648,22 +546,17 @@ } def OMP_Teams : Directive<"teams"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_Cancel : Directive<"cancel"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; } def OMP_Requires : Directive<"requires"> { let allowedOnceClauses = [ @@ -685,57 +578,36 @@ def OMP_Nothing : Directive<"nothing"> {} def OMP_TargetData : Directive<"target data"> { let allowedClauses = [ - VersionedClause, - VersionedClause - ]; - let allowedOnceClauses = [ - VersionedClause, - VersionedClause - ]; - let requiredClauses = [ - VersionedClause + VersionedClause, VersionedClause ]; + let allowedOnceClauses = + [VersionedClause, VersionedClause]; + let requiredClauses = [VersionedClause]; } def OMP_TargetEnterData : Directive<"target enter data"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; - let requiredClauses = [ - VersionedClause - ]; + let requiredClauses = [VersionedClause]; } def OMP_TargetExitData : Directive<"target exit data"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; - let requiredClauses = [ - VersionedClause - ]; + let requiredClauses = [VersionedClause]; } def OMP_TargetParallel : Directive<"target parallel"> { 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 ]; let allowedOnceClauses = [ VersionedClause, @@ -778,84 +650,56 @@ } def OMP_TargetParallelDo : Directive<"target parallel do"> { 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, VersionedClause ]; let allowedOnceClauses = [ - 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 = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_ParallelFor : Directive<"parallel for"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_ParallelDo : Directive<"parallel do"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_ParallelForSimd : Directive<"parallel for simd"> { @@ -884,75 +728,48 @@ } def OMP_ParallelDoSimd : Directive<"parallel do simd"> { 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 ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_ParallelMaster : Directive<"parallel master"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_ParallelMasked : Directive<"parallel masked"> { 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_ParallelSections : Directive<"parallel sections"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause - ]; - let allowedOnceClauses = [ - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; + let allowedOnceClauses = [VersionedClause]; } def OMP_ForSimd : Directive<"for simd"> { let allowedClauses = [ @@ -976,55 +793,37 @@ } def OMP_DoSimd : Directive<"do simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - 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 = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; } def OMP_DeclareSimd : Directive<"declare simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; - let allowedOnceClauses = [ - VersionedClause - ]; - let allowedExclusiveClauses = [ - VersionedClause, - VersionedClause - ]; + let allowedOnceClauses = [VersionedClause]; + let allowedExclusiveClauses = + [VersionedClause, VersionedClause]; } def OMP_TaskLoop : Directive<"taskloop"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -1033,109 +832,73 @@ VersionedClause, VersionedClause, ]; - let allowedExclusiveClauses = [ - VersionedClause, - VersionedClause - ]; + let allowedExclusiveClauses = + [VersionedClause, VersionedClause]; } def OMP_TaskLoopSimd : Directive<"taskloop simd"> { 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, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause - ]; - let allowedExclusiveClauses = [ - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; + let allowedExclusiveClauses = + [VersionedClause, VersionedClause]; } def OMP_Distribute : Directive<"distribute"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause - ]; - let allowedOnceClauses = [ - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; + let allowedOnceClauses = + [VersionedClause, VersionedClause]; } def OMP_BeginDeclareTarget : Directive<"begin declare target"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_DeclareTarget : Directive<"declare target"> { let allowedClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_EndDeclareTarget : Directive<"end declare target"> {} def OMP_DistributeParallelFor : Directive<"distribute parallel for"> { 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, VersionedClause ]; } def OMP_DistributeParallelDo : Directive<"distribute parallel do"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } @@ -1165,51 +928,32 @@ } def OMP_DistributeParallelDoSimd : Directive<"distribute parallel do simd"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_DistributeSimd : Directive<"distribute simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } @@ -1281,22 +1025,14 @@ } def OMP_TargetSimd : Directive<"target simd"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -1313,83 +1049,54 @@ } def OMP_TeamsDistribute : Directive<"teams distribute"> { 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_TeamsDistributeSimd : Directive<"teams distribute simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - 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 = [ - VersionedClause, - VersionedClause, - 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 = [ + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } -def OMP_TeamsDistributeParallelDoSimd : - Directive<"teams distribute parallel do simd"> { +def OMP_TeamsDistributeParallelDoSimd + : Directive<"teams distribute parallel do simd"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -1405,66 +1112,43 @@ VersionedClause, ]; } -def OMP_TeamsDistributeParallelFor : - Directive<"teams distribute parallel for"> { +def OMP_TeamsDistributeParallelFor + : Directive<"teams distribute parallel for"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } -def OMP_TeamsDistributeParallelDo : - Directive<"teams distribute parallel do"> { +def OMP_TeamsDistributeParallelDo : Directive<"teams distribute parallel do"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; -let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + let allowedOnceClauses = [ + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_TargetTeams : Directive<"target teams"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; @@ -1480,18 +1164,12 @@ } def OMP_TargetTeamsDistribute : Directive<"target teams distribute"> { 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 ]; let allowedOnceClauses = [ VersionedClause, @@ -1506,8 +1184,8 @@ ]; } -def OMP_TargetTeamsDistributeParallelFor : - Directive<"target teams distribute parallel for"> { +def OMP_TargetTeamsDistributeParallelFor + : Directive<"target teams distribute parallel for"> { let allowedClauses = [ VersionedClause, VersionedClause, @@ -1538,25 +1216,17 @@ VersionedClause, ]; } -def OMP_TargetTeamsDistributeParallelDo : - Directive<"target teams distribute parallel do"> { +def OMP_TargetTeamsDistributeParallelDo + : Directive<"target teams distribute parallel do"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -1572,8 +1242,8 @@ VersionedClause, ]; } -def OMP_TargetTeamsDistributeParallelForSimd : - Directive<"target teams distribute parallel for simd"> { +def OMP_TargetTeamsDistributeParallelForSimd + : Directive<"target teams distribute parallel for simd"> { let allowedClauses = [ VersionedClause, VersionedClause, @@ -1609,63 +1279,39 @@ VersionedClause, ]; } -def OMP_TargetTeamsDistributeParallelDoSimd : - Directive<"target teams distribute parallel do simd"> { +def OMP_TargetTeamsDistributeParallelDoSimd + : Directive<"target teams distribute parallel do simd"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause - ]; -} -def OMP_TargetTeamsDistributeSimd : - Directive<"target teams distribute simd"> { - 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, + VersionedClause, VersionedClause + ]; +} +def OMP_TargetTeamsDistributeSimd : Directive<"target teams distribute simd"> { + let allowedClauses = [ + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; let allowedOnceClauses = [ VersionedClause, @@ -1681,232 +1327,140 @@ ]; } def OMP_Allocate : Directive<"allocate"> { - let allowedOnceClauses = [ - VersionedClause, - VersionedClause - ]; + let allowedOnceClauses = + [VersionedClause, VersionedClause]; } def OMP_DeclareVariant : Directive<"declare variant"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; let allowedExclusiveClauses = [ - VersionedClause, - VersionedClause + VersionedClause, VersionedClause ]; } def OMP_MasterTaskloop : Directive<"master taskloop"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_MaskedTaskloop : Directive<"masked taskloop"> { let allowedClauses = [ - VersionedClause, - 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 = [ - 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause + ]; +} +def OMP_ParallelMasterTaskloop : Directive<"parallel master taskloop"> { + let allowedClauses = [ + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } -def OMP_ParallelMaskedTaskloop : - Directive<"parallel masked taskloop"> { +def OMP_ParallelMaskedTaskloop : Directive<"parallel masked taskloop"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause ]; } def OMP_MasterTaskloopSimd : Directive<"master taskloop simd"> { 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, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_MaskedTaskloopSimd : Directive<"masked taskloop simd"> { 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_ParallelMasterTaskloopSimd : - Directive<"parallel master taskloop simd"> { - 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, + 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 = [ + 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_ParallelMaskedTaskloopSimd : - Directive<"parallel masked taskloop simd"> { +def OMP_ParallelMaskedTaskloopSimd + : Directive<"parallel masked taskloop simd"> { 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, + 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 = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause, // TODO This should ne `none` instead. Comment carried over from // OMPKinds.def. @@ -1915,8 +1469,7 @@ } def OMP_Scan : Directive<"scan"> { let allowedClauses = [ - VersionedClause, - VersionedClause + VersionedClause, VersionedClause ]; } def OMP_Assumes : Directive<"assumes"> {} @@ -1926,17 +1479,13 @@ def OMP_EndDeclareVariant : Directive<"end declare variant"> {} def OMP_ParallelWorkshare : Directive<"parallel workshare"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; let allowedOnceClauses = [ - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } @@ -1944,22 +1493,14 @@ def OMP_EndDo : Directive<"end do"> {} def OMP_EndDoSimd : Directive<"end do simd"> {} def OMP_EndSections : Directive<"end sections"> { - let allowedOnceClauses = [ - VersionedClause - ]; + let allowedOnceClauses = [VersionedClause]; } def OMP_EndSingle : Directive<"end single"> { - let allowedClauses = [ - VersionedClause - ]; - let allowedOnceClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; + let allowedOnceClauses = [VersionedClause]; } def OMP_EndWorkshare : Directive<"end workshare"> { - let allowedClauses = [ - VersionedClause - ]; + let allowedClauses = [VersionedClause]; } def OMP_interop : Directive<"interop"> { let allowedClauses = [ @@ -1973,19 +1514,14 @@ } def OMP_dispatch : Directive<"dispatch"> { let allowedClauses = [ - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, - VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, + VersionedClause, VersionedClause, VersionedClause ]; } def OMP_masked : Directive<"masked"> { - let allowedOnceClauses = [ - VersionedClause - ]; + let allowedOnceClauses = [VersionedClause]; } def OMP_loop : Directive<"loop"> { let allowedClauses = [ @@ -2019,18 +1555,12 @@ } def OMP_target_teams_loop : Directive<"target teams loop"> { 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 ]; let allowedOnceClauses = [ @@ -2098,6 +1628,4 @@ let allowedClauses = [VersionedClause]; let allowedOnceClauses = [VersionedClause]; } -def OMP_Unknown : Directive<"unknown"> { - let isDefault = true; -} +def OMP_Unknown : Directive<"unknown"> { let isDefault = true; }