[flang-commits] [flang] a7d352c - [flang][OpenMP] Add parser support for order clause
Kavitha Natarajan via flang-commits
flang-commits at lists.llvm.org
Tue Feb 21 06:01:36 PST 2023
Author: Kavitha Natarajan
Date: 2023-02-21T19:31:19+05:30
New Revision: a7d352c76d3c4b7ec8bce5f64b42e62e5771a347
URL: https://github.com/llvm/llvm-project/commit/a7d352c76d3c4b7ec8bce5f64b42e62e5771a347
DIFF: https://github.com/llvm/llvm-project/commit/a7d352c76d3c4b7ec8bce5f64b42e62e5771a347.diff
LOG: [flang][OpenMP] Add parser support for order clause
Added parser support for OpenMP 5.0 & 5.1 feature
ORDER([order-modifier :]concurrent) clause for all
applicable and supported OpenMP directives.
Reviewed By: kiranchandramohan, abidmalikwaterloo
Differential Revision: https://reviews.llvm.org/D142524
Added:
flang/test/Examples/omp-order-clause.f90
flang/test/Parser/omp-order-clause01.f90
flang/test/Semantics/OpenMP/omp-order-clause01.f90
Modified:
flang/include/flang/Parser/dump-parse-tree.h
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/openmp-parsers.cpp
flang/lib/Parser/unparse.cpp
llvm/include/llvm/Frontend/OpenMP/OMP.td
Removed:
################################################################################
diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h
index 46e426942ca7..7bc1d08c1d5a 100644
--- a/flang/include/flang/Parser/dump-parse-tree.h
+++ b/flang/include/flang/Parser/dump-parse-tree.h
@@ -514,6 +514,10 @@ class ParseTreeDumper {
}
NODE(parser, OmpObject)
NODE(parser, OmpObjectList)
+ NODE(parser, OmpOrderClause)
+ NODE_ENUM(OmpOrderClause, Type)
+ NODE(parser, OmpOrderModifier)
+ NODE_ENUM(OmpOrderModifier, Kind)
NODE(parser, OmpProcBindClause)
NODE_ENUM(OmpProcBindClause, Type)
NODE(parser, OmpReductionClause)
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index c439e3c7d9f6..60c7f695ad66 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -3417,6 +3417,19 @@ struct OmpAlignedClause {
std::tuple<std::list<Name>, std::optional<ScalarIntConstantExpr>> t;
};
+// 2.9.5 order-clause -> ORDER ([order-modifier :]concurrent)
+struct OmpOrderModifier {
+ UNION_CLASS_BOILERPLATE(OmpOrderModifier);
+ ENUM_CLASS(Kind, Reproducible, Unconstrained)
+ std::variant<Kind> u;
+};
+
+struct OmpOrderClause {
+ TUPLE_CLASS_BOILERPLATE(OmpOrderClause);
+ ENUM_CLASS(Type, Concurrent)
+ std::tuple<std::optional<OmpOrderModifier>, Type> t;
+};
+
// 2.15.3.7 linear-modifier -> REF | VAL | UVAL
struct OmpLinearModifier {
ENUM_CLASS(Type, Ref, Val, Uval)
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index a89e9f0d1964..e7d628d4c428 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -185,6 +185,16 @@ TYPE_CONTEXT_PARSER("Omp LINEAR clause"_en_US,
TYPE_PARSER(construct<OmpAlignedClause>(
nonemptyList(name), maybe(":" >> scalarIntConstantExpr)))
+// 2.9.5 ORDER ([order-modifier :]concurrent)
+TYPE_PARSER(construct<OmpOrderModifier>(
+ "REPRODUCIBLE" >> pure(OmpOrderModifier::Kind::Reproducible)) ||
+ construct<OmpOrderModifier>(
+ "UNCONSTRAINED" >> pure(OmpOrderModifier::Kind::Unconstrained)))
+
+TYPE_PARSER(construct<OmpOrderClause>(
+ maybe(Parser<OmpOrderModifier>{} / ":"),
+ "CONCURRENT" >> pure(OmpOrderClause::Type::Concurrent)))
+
TYPE_PARSER(
construct<OmpObject>(designator) || construct<OmpObject>("/" >> name / "/"))
@@ -258,6 +268,8 @@ TYPE_PARSER(
parenthesized(scalarIntExpr))) ||
"NUM_THREADS" >> construct<OmpClause>(construct<OmpClause::NumThreads>(
parenthesized(scalarIntExpr))) ||
+ "ORDER" >> construct<OmpClause>(construct<OmpClause::Order>(
+ parenthesized(Parser<OmpOrderClause>{}))) ||
"ORDERED" >> construct<OmpClause>(construct<OmpClause::Ordered>(
maybe(parenthesized(scalarIntConstantExpr)))) ||
"PARTIAL" >> construct<OmpClause>(construct<OmpClause::Partial>(
diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp
index 581496610c3d..c70dc56b2ec5 100644
--- a/flang/lib/Parser/unparse.cpp
+++ b/flang/lib/Parser/unparse.cpp
@@ -2046,6 +2046,10 @@ class UnparseVisitor {
Put(":");
Walk(std::get<OmpObjectList>(x.t));
}
+ void Unparse(const OmpOrderClause &x) {
+ Walk(std::get<std::optional<OmpOrderModifier>>(x.t), ":");
+ Walk(std::get<OmpOrderClause::Type>(x.t));
+ }
void Unparse(const OmpDependSinkVecLength &x) {
Walk(std::get<DefinedOperator>(x.t));
Walk(std::get<ScalarIntConstantExpr>(x.t));
@@ -2619,6 +2623,8 @@ class UnparseVisitor {
WALK_NESTED_ENUM(OmpDeviceTypeClause, Type) // OMP DEVICE_TYPE
WALK_NESTED_ENUM(OmpIfClause, DirectiveNameModifier) // OMP directive-modifier
WALK_NESTED_ENUM(OmpCancelType, Type) // OMP cancel-type
+ WALK_NESTED_ENUM(OmpOrderClause, Type) // OMP order-type
+ WALK_NESTED_ENUM(OmpOrderModifier, Kind) // OMP order-modifier
#undef WALK_NESTED_ENUM
void Done() const { CHECK(indent_ == 0); }
diff --git a/flang/test/Examples/omp-order-clause.f90 b/flang/test/Examples/omp-order-clause.f90
new file mode 100644
index 000000000000..97c0707b1881
--- /dev/null
+++ b/flang/test/Examples/omp-order-clause.f90
@@ -0,0 +1,53 @@
+! REQUIRES: plugins, examples, shell
+
+! RUN: %flang_fc1 -load %llvmshlibdir/flangOmpReport.so -plugin flang-omp-report -fopenmp %s -o - | FileCheck %s
+
+! Check for ORDER([order-modifier :]concurrent) clause on OpenMP constructs
+
+subroutine test_order()
+ integer :: i, j = 1
+ !$omp do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end do
+end subroutine
+
+!CHECK: - file: {{.*}}
+!CHECK: line: 9
+!CHECK: construct: do
+!CHECK: clauses:
+!CHECK: - clause: order
+!CHECK: details: concurrent
+
+subroutine test_order_reproducible()
+ integer :: i, j = 1
+ !$omp simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end simd
+end subroutine
+
+!CHECK: - file: {{.*}}
+!CHECK: line: 25
+!CHECK: construct: simd
+!CHECK: clauses:
+!CHECK: - clause: order
+!CHECK: details: 'reproducible:concurrent'
+
+subroutine test_order_unconstrained()
+ integer :: i, j = 1
+ !$omp target teams distribute parallel do simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target teams distribute parallel do simd
+end subroutine
+
+!CHECK: - file: {{.*}}
+!CHECK: line: 41
+!CHECK: construct: target teams distribute parallel do simd
+!CHECK: clauses:
+!CHECK: - clause: order
+!CHECK: details: 'unconstrained:concurrent'
diff --git a/flang/test/Parser/omp-order-clause01.f90 b/flang/test/Parser/omp-order-clause01.f90
new file mode 100644
index 000000000000..d7efaf0f67c2
--- /dev/null
+++ b/flang/test/Parser/omp-order-clause01.f90
@@ -0,0 +1,254 @@
+! 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
+
+! Check for ORDER([order-modifier :]concurrent) clause on OpenMP constructs
+
+subroutine test_do_order()
+ integer :: i, j = 1
+ !CHECK: !$omp do order(concurrent)
+ !$omp do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end do
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = do
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_simd_order_reproducible()
+ integer :: i, j = 1
+ !CHECK: !$omp simd order(reproducible:concurrent)
+ !$omp simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Reproducible
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_do_simd_order_unconstrained()
+ integer :: i, j = 1
+ !CHECK: !$omp do simd order(unconstrained:concurrent)
+ !$omp do simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end do simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = do simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Unconstrained
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_parallel_do_order()
+ integer :: i, j = 1
+ !CHECK: !$omp parallel do order(concurrent)
+ !$omp parallel do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end parallel do
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = parallel do
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_parallel_do_simd_order_reproducible()
+ integer :: i, j = 1
+ !CHECK: !$omp parallel do simd order(reproducible:concurrent)
+ !$omp parallel do simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end parallel do simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = parallel do simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Reproducible
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_simd_order_unconstrained()
+ integer :: i, j = 1
+ !CHECK: !$omp target simd order(unconstrained:concurrent)
+ !$omp target simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Unconstrained
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_parallel_do_order()
+ integer :: i, j = 1
+ !CHECK: !$omp target parallel do order(concurrent)
+ !$omp target parallel do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target parallel do
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target parallel do
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_parallel_do_simd_order_reproducible()
+ integer :: i, j = 1
+ !CHECK: !$omp target parallel do simd order(reproducible:concurrent)
+ !$omp target parallel do simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target parallel do simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target parallel do simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Reproducible
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_teams_distribute_simd_order_unconstrained()
+ integer :: i, j = 1
+ !CHECK: !$omp teams distribute simd order(unconstrained:concurrent)
+ !$omp teams distribute simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end teams distribute simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = teams distribute simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Unconstrained
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_teams_distribute_parallel_do_order()
+ integer :: i, j = 1
+ !CHECK: !$omp teams distribute parallel do order(concurrent)
+ !$omp teams distribute parallel do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end teams distribute parallel do
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = teams distribute parallel do
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_teams_distribute_parallel_do_simd_order_reproducible()
+ integer :: i, j = 1
+ !CHECK: !$omp teams distribute parallel do simd order(reproducible:concurrent)
+ !$omp teams distribute parallel do simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end teams distribute parallel do simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = teams distribute parallel do simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Reproducible
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_teams_distribute_simd_order_unconstrained()
+ integer :: i, j = 1
+ !CHECK: !$omp target teams distribute simd order(unconstrained:concurrent)
+ !$omp target teams distribute simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target teams distribute simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target teams distribute simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Unconstrained
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_teams_distribute_parallel_do_order()
+ integer :: i, j = 1
+ !CHECK: !$omp target teams distribute parallel do order(concurrent)
+ !$omp target teams distribute parallel do order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target teams distribute parallel do
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target teams distribute parallel do
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_target_teams_distribute_parallel_do_simd_order_reproducible()
+ integer :: i, j = 1
+ !CHECK: !$omp target teams distribute parallel do simd order(reproducible:concurrent)
+ !$omp target teams distribute parallel do simd order(reproducible:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end target teams distribute parallel do simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = target teams distribute parallel do simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Reproducible
+!PARSE-TREE-NEXT: Type = Concurrent
+
+subroutine test_taskloop_simd_order_unconstrained()
+ integer :: i, j = 1
+ !CHECK: !$omp taskloop simd order(unconstrained:concurrent)
+ !$omp taskloop simd order(unconstrained:concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+ !$omp end taskloop simd
+end subroutine
+
+!PARSE-TREE: OpenMPConstruct -> OpenMPLoopConstruct
+!PARSE-TREE-NEXT: OmpBeginLoopDirective
+!PARSE-TREE-NEXT: OmpLoopDirective -> llvm::omp::Directive = taskloop simd
+!PARSE-TREE-NEXT: OmpClauseList -> OmpClause -> Order -> OmpOrderClause
+!PARSE-TREE-NEXT: Kind = Unconstrained
+!PARSE-TREE-NEXT: Type = Concurrent
diff --git a/flang/test/Semantics/OpenMP/omp-order-clause01.f90 b/flang/test/Semantics/OpenMP/omp-order-clause01.f90
new file mode 100644
index 000000000000..247791fac15b
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/omp-order-clause01.f90
@@ -0,0 +1,10 @@
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
+
+subroutine omp_order()
+ integer :: i, j = 1
+ !ERROR: At most one ORDER clause can appear on the SIMD directive
+ !$omp simd order(concurrent) order(concurrent)
+ do i=1,10
+ j = j + 1
+ end do
+end subroutine omp_order
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index a01d38327b7c..fe5af4cb0c42 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -355,6 +355,7 @@ 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 flangClass = "OmpOrderClause";
let enumClauseValue = "OrderKind";
let allowedClauseValues = [
OMP_ORDER_unknown,
@@ -493,13 +494,13 @@ def OMP_Simd : Directive<"simd"> {
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Allocate>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>
];
let allowedOnceClauses = [
VersionedClause<OMPC_Collapse>,
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
VersionedClause<OMPC_If, 50>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_Tile : Directive<"tile"> {
@@ -540,7 +541,8 @@ def OMP_Do : Directive<"do"> {
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_Collapse>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_NoWait>
+ VersionedClause<OMPC_NoWait>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_Sections : Directive<"sections"> {
@@ -791,7 +793,6 @@ def OMP_TargetParallelDo : Directive<"target parallel do"> {
VersionedClause<OMPC_IsDevicePtr>,
VersionedClause<OMPC_HasDeviceAddr, 51>,
VersionedClause<OMPC_Allocator>,
- VersionedClause<OMPC_Order>,
VersionedClause<OMPC_UsesAllocators>,
VersionedClause<OMPC_Default>,
VersionedClause<OMPC_Copyin>
@@ -805,7 +806,8 @@ def OMP_TargetParallelDo : Directive<"target parallel do"> {
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_Collapse>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_NoWait>
+ VersionedClause<OMPC_NoWait>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TargetUpdate : Directive<"target update"> {
@@ -857,7 +859,8 @@ def OMP_ParallelDo : Directive<"parallel do"> {
VersionedClause<OMPC_ProcBind>,
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_Collapse>
+ VersionedClause<OMPC_Collapse>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_ParallelForSimd : Directive<"parallel for simd"> {
@@ -897,7 +900,6 @@ def OMP_ParallelDoSimd : Directive<"parallel do simd"> {
VersionedClause<OMPC_Aligned>,
VersionedClause<OMPC_Allocate>,
VersionedClause<OMPC_NonTemporal>,
- VersionedClause<OMPC_Order>
];
let allowedOnceClauses = [
VersionedClause<OMPC_If>,
@@ -907,7 +909,8 @@ def OMP_ParallelDoSimd : Directive<"parallel do simd"> {
VersionedClause<OMPC_Ordered>,
VersionedClause<OMPC_Collapse>,
VersionedClause<OMPC_SafeLen>,
- VersionedClause<OMPC_SimdLen>
+ VersionedClause<OMPC_SimdLen>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_ParallelMaster : Directive<"parallel master"> {
@@ -973,7 +976,7 @@ def OMP_ForSimd : Directive<"for simd"> {
VersionedClause<OMPC_Allocate>,
VersionedClause<OMPC_If, 50>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_DoSimd : Directive<"do simd"> {
@@ -991,7 +994,8 @@ def OMP_DoSimd : Directive<"do simd"> {
VersionedClause<OMPC_Ordered>,
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
- VersionedClause<OMPC_NoWait>
+ VersionedClause<OMPC_NoWait>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_CancellationPoint : Directive<"cancellation point"> {}
@@ -1052,7 +1056,6 @@ def OMP_TaskLoopSimd : Directive<"taskloop simd"> {
VersionedClause<OMPC_Mergeable>,
VersionedClause<OMPC_NoGroup>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_Private>,
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Shared>,
@@ -1064,7 +1067,8 @@ def OMP_TaskLoopSimd : Directive<"taskloop simd"> {
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
VersionedClause<OMPC_Final>,
- VersionedClause<OMPC_Priority>
+ VersionedClause<OMPC_Priority>,
+ VersionedClause<OMPC_Order, 50>
];
let allowedExclusiveClauses = [
VersionedClause<OMPC_GrainSize>,
@@ -1127,7 +1131,6 @@ def OMP_DistributeParallelDo : Directive<"distribute parallel do"> {
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Allocate>,
- VersionedClause<OMPC_Order>,
VersionedClause<OMPC_Default>,
VersionedClause<OMPC_Shared>,
VersionedClause<OMPC_Reduction>,
@@ -1141,7 +1144,8 @@ def OMP_DistributeParallelDo : Directive<"distribute parallel do"> {
VersionedClause<OMPC_NumThreads>,
VersionedClause<OMPC_ProcBind>,
VersionedClause<OMPC_Schedule>,
- VersionedClause<OMPC_Ordered>
+ VersionedClause<OMPC_Ordered>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_DistributeParallelForSimd : Directive<"distribute parallel for simd"> {
@@ -1189,7 +1193,7 @@ def OMP_DistributeParallelDoSimd : Directive<"distribute parallel do simd"> {
VersionedClause<OMPC_SimdLen>,
VersionedClause<OMPC_Allocate>,
VersionedClause<OMPC_NonTemporal>,
- VersionedClause<OMPC_Order>
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_DistributeSimd : Directive<"distribute simd"> {
@@ -1202,7 +1206,6 @@ def OMP_DistributeSimd : Directive<"distribute simd"> {
VersionedClause<OMPC_FirstPrivate>,
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_Private>,
VersionedClause<OMPC_Reduction>
];
@@ -1215,7 +1218,8 @@ def OMP_DistributeSimd : Directive<"distribute simd"> {
VersionedClause<OMPC_ProcBind>,
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_SafeLen>,
- VersionedClause<OMPC_SimdLen>
+ VersionedClause<OMPC_SimdLen>,
+ VersionedClause<OMPC_Order, 50>
];
}
@@ -1280,7 +1284,7 @@ def OMP_TargetParallelDoSimd : Directive<"target parallel do simd"> {
VersionedClause<OMPC_HasDeviceAddr, 51>,
VersionedClause<OMPC_Allocate>,
VersionedClause<OMPC_NonTemporal>,
- VersionedClause<OMPC_Order>,
+ VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_UsesAllocators>
];
}
@@ -1297,7 +1301,6 @@ def OMP_TargetSimd : Directive<"target simd"> {
VersionedClause<OMPC_Map>,
VersionedClause<OMPC_NonTemporal, 50>,
VersionedClause<OMPC_NoWait>,
- VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_Private>,
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Shared>,
@@ -1314,6 +1317,7 @@ def OMP_TargetSimd : Directive<"target simd"> {
VersionedClause<OMPC_DefaultMap>,
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_OMPX_DynCGroupMem>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TeamsDistribute : Directive<"teams distribute"> {
@@ -1339,7 +1343,6 @@ def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> {
VersionedClause<OMPC_LastPrivate>,
VersionedClause<OMPC_Linear>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_Private>,
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Shared>
@@ -1352,7 +1355,8 @@ def OMP_TeamsDistributeSimd : Directive<"teams distribute simd"> {
VersionedClause<OMPC_NumTeams>,
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
- VersionedClause<OMPC_ThreadLimit>
+ VersionedClause<OMPC_ThreadLimit>,
+ VersionedClause<OMPC_Order, 50>
];
}
@@ -1392,7 +1396,6 @@ def OMP_TeamsDistributeParallelDoSimd :
VersionedClause<OMPC_Shared>,
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Linear>,
- VersionedClause<OMPC_Order>,
VersionedClause<OMPC_Aligned>,
VersionedClause<OMPC_NonTemporal>
];
@@ -1408,6 +1411,7 @@ def OMP_TeamsDistributeParallelDoSimd :
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
VersionedClause<OMPC_If>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TeamsDistributeParallelFor :
@@ -1451,11 +1455,11 @@ let allowedOnceClauses = [
VersionedClause<OMPC_Collapse>,
VersionedClause<OMPC_DistSchedule>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_Order>,
VersionedClause<OMPC_If>,
VersionedClause<OMPC_NumThreads>,
VersionedClause<OMPC_ProcBind>,
- VersionedClause<OMPC_Schedule>
+ VersionedClause<OMPC_Schedule>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TargetTeams : Directive<"target teams"> {
@@ -1561,7 +1565,6 @@ def OMP_TargetTeamsDistributeParallelDo :
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_Linear>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_Order>
];
let allowedOnceClauses = [
VersionedClause<OMPC_Device>,
@@ -1575,6 +1578,7 @@ def OMP_TargetTeamsDistributeParallelDo :
VersionedClause<OMPC_NumThreads>,
VersionedClause<OMPC_ProcBind>,
VersionedClause<OMPC_Schedule>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TargetTeamsDistributeParallelForSimd :
@@ -1631,7 +1635,6 @@ def OMP_TargetTeamsDistributeParallelDoSimd :
VersionedClause<OMPC_Copyin>,
VersionedClause<OMPC_Linear>,
VersionedClause<OMPC_Ordered>,
- VersionedClause<OMPC_Order>,
VersionedClause<OMPC_Aligned>,
VersionedClause<OMPC_NonTemporal>
];
@@ -1649,7 +1652,8 @@ def OMP_TargetTeamsDistributeParallelDoSimd :
VersionedClause<OMPC_ProcBind>,
VersionedClause<OMPC_Schedule>,
VersionedClause<OMPC_SafeLen>,
- VersionedClause<OMPC_SimdLen>
+ VersionedClause<OMPC_SimdLen>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_TargetTeamsDistributeSimd :
@@ -1666,7 +1670,6 @@ def OMP_TargetTeamsDistributeSimd :
VersionedClause<OMPC_Linear>,
VersionedClause<OMPC_Map>,
VersionedClause<OMPC_NonTemporal, 50>,
- VersionedClause<OMPC_Order, 50>,
VersionedClause<OMPC_Private>,
VersionedClause<OMPC_Reduction>,
VersionedClause<OMPC_Shared>,
@@ -1683,6 +1686,7 @@ def OMP_TargetTeamsDistributeSimd :
VersionedClause<OMPC_SafeLen>,
VersionedClause<OMPC_SimdLen>,
VersionedClause<OMPC_OMPX_DynCGroupMem>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_Allocate : Directive<"allocate"> {
@@ -2001,7 +2005,7 @@ def OMP_loop : Directive<"loop"> {
let allowedOnceClauses = [
VersionedClause<OMPC_Bind, 50>,
VersionedClause<OMPC_Collapse>,
- VersionedClause<OMPC_Order>,
+ VersionedClause<OMPC_Order, 50>
];
}
def OMP_teams_loop : Directive<"teams loop"> {
More information about the flang-commits
mailing list