diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:16:04 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:16:04 +0900 |
commit | 0aa930a41f2d1ebf1fa90ec42da8f96d15a4dcbb (patch) | |
tree | 6a77b463f700e090df586672c26b9fe765fd115b /flang/lib/Parser/openmp-parsers.cpp | |
parent | ec6892d1c979ce0b84c86918d5cdbb03037b409a (diff) | |
parent | 6d16b1c5c468a79ecf867293023c89ac518ecdda (diff) | |
download | llvm-users/chapuni/cov/single/nextcount-base.zip llvm-users/chapuni/cov/single/nextcount-base.tar.gz llvm-users/chapuni/cov/single/nextcount-base.tar.bz2 |
Merge branch 'users/chapuni/cov/single/pair' into users/chapuni/cov/single/nextcount-baseusers/chapuni/cov/single/nextcount-base
Diffstat (limited to 'flang/lib/Parser/openmp-parsers.cpp')
-rw-r--r-- | flang/lib/Parser/openmp-parsers.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp index 67385c0..894c458 100644 --- a/flang/lib/Parser/openmp-parsers.cpp +++ b/flang/lib/Parser/openmp-parsers.cpp @@ -567,6 +567,8 @@ TYPE_PARSER(construct<OmpBindClause>( "TEAMS" >> pure(OmpBindClause::Binding::Teams) || "THREAD" >> pure(OmpBindClause::Binding::Thread))) +TYPE_PARSER(construct<OmpAlignClause>(scalarIntExpr)) + TYPE_PARSER(construct<OmpAtClause>( "EXECUTION" >> pure(OmpAtClause::ActionTime::Execution) || "COMPILATION" >> pure(OmpAtClause::ActionTime::Compilation))) @@ -582,6 +584,8 @@ TYPE_PARSER( "ACQ_REL" >> construct<OmpClause>(construct<OmpClause::AcqRel>()) || "AFFINITY" >> construct<OmpClause>(construct<OmpClause::Affinity>( parenthesized(Parser<OmpAffinityClause>{}))) || + "ALIGN" >> construct<OmpClause>(construct<OmpClause::Align>( + parenthesized(Parser<OmpAlignClause>{}))) || "ALIGNED" >> construct<OmpClause>(construct<OmpClause::Aligned>( parenthesized(Parser<OmpAlignedClause>{}))) || "ALLOCATE" >> construct<OmpClause>(construct<OmpClause::Allocate>( @@ -737,9 +741,20 @@ TYPE_PARSER( TYPE_PARSER(sourced(construct<OmpClauseList>( many(maybe(","_tok) >> sourced(Parser<OmpClause>{}))))) -// 2.1 (variable | /common-block | array-sections) +// 2.1 (variable | /common-block/ | array-sections) TYPE_PARSER(construct<OmpObjectList>(nonemptyList(Parser<OmpObject>{}))) +TYPE_PARSER(sourced(construct<OmpErrorDirective>( + verbatim("ERROR"_tok), Parser<OmpClauseList>{}))) + +TYPE_PARSER(sourced(construct<OmpNothingDirective>("NOTHING" >> ok))) + +TYPE_PARSER(sourced(construct<OpenMPUtilityConstruct>( + sourced(construct<OpenMPUtilityConstruct>( + sourced(Parser<OmpErrorDirective>{}))) || + sourced(construct<OpenMPUtilityConstruct>( + sourced(Parser<OmpNothingDirective>{})))))) + // Omp directives enclosing do loop TYPE_PARSER(sourced(construct<OmpLoopDirective>(first( "DISTRIBUTE PARALLEL DO SIMD" >> @@ -1027,9 +1042,6 @@ TYPE_PARSER(sourced(construct<OmpCriticalDirective>(verbatim("CRITICAL"_tok), TYPE_PARSER(construct<OpenMPCriticalConstruct>( Parser<OmpCriticalDirective>{}, block, Parser<OmpEndCriticalDirective>{})) -TYPE_PARSER(sourced(construct<OpenMPErrorConstruct>( - verbatim("ERROR"_tok), Parser<OmpClauseList>{}))) - // 2.11.3 Executable Allocate directive TYPE_PARSER( sourced(construct<OpenMPExecutableAllocate>(verbatim("ALLOCATE"_tok), @@ -1082,7 +1094,9 @@ TYPE_PARSER(startOmpLine >> construct<OpenMPDeclarativeConstruct>( Parser<OpenMPRequiresConstruct>{}) || construct<OpenMPDeclarativeConstruct>( - Parser<OpenMPThreadprivate>{})) / + Parser<OpenMPThreadprivate>{}) || + construct<OpenMPDeclarativeConstruct>( + Parser<OpenMPUtilityConstruct>{})) / endOmpLine)) // Block Construct @@ -1127,7 +1141,7 @@ TYPE_CONTEXT_PARSER("OpenMP construct"_en_US, // OpenMPStandaloneConstruct to resolve !$OMP ORDERED construct<OpenMPConstruct>(Parser<OpenMPStandaloneConstruct>{}), construct<OpenMPConstruct>(Parser<OpenMPAtomicConstruct>{}), - construct<OpenMPConstruct>(Parser<OpenMPErrorConstruct>{}), + construct<OpenMPConstruct>(Parser<OpenMPUtilityConstruct>{}), construct<OpenMPConstruct>(Parser<OpenMPExecutableAllocate>{}), construct<OpenMPConstruct>(Parser<OpenMPAllocatorsConstruct>{}), construct<OpenMPConstruct>(Parser<OpenMPDeclarativeAllocate>{}), |