[llvm-branch-commits] [llvm] 1aa10ab - Revert "[Flang][openmp][5.0] Add task_reduction clause."
Sameeran joshi via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Dec 22 10:28:10 PST 2020
Author: sameeran joshi
Date: 2020-12-22T23:53:51+05:30
New Revision: 1aa10ab2e1ddc863a944fb181b2b8ed633864bab
URL: https://github.com/llvm/llvm-project/commit/1aa10ab2e1ddc863a944fb181b2b8ed633864bab
DIFF: https://github.com/llvm/llvm-project/commit/1aa10ab2e1ddc863a944fb181b2b8ed633864bab.diff
LOG: Revert "[Flang][openmp][5.0] Add task_reduction clause."
This reverts commit 9a7895dc20852b662a66976d06871ec2a0b968c8.
Reverting due to missing Co-author attribution.
https://reviews.llvm.org/D93105
Added:
Modified:
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/openmp-parsers.cpp
flang/lib/Parser/unparse.cpp
flang/lib/Semantics/check-omp-structure.cpp
flang/lib/Semantics/check-omp-structure.h
flang/test/Semantics/omp-clause-validity01.f90
llvm/include/llvm/Frontend/OpenMP/OMP.td
Removed:
################################################################################
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 119a92bee211..7e258b668576 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -3415,7 +3415,7 @@ struct OmpReductionOperator {
// variable-name-list)
struct OmpReductionClause {
TUPLE_CLASS_BOILERPLATE(OmpReductionClause);
- std::tuple<OmpReductionOperator, OmpObjectList> t;
+ std::tuple<OmpReductionOperator, std::list<Designator>> t;
};
// OMP 5.0 2.11.4 allocate-clause -> ALLOCATE ([allocator:] variable-name-list)
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index 3a0d28cd9c12..1386b2b16a78 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -102,7 +102,7 @@ TYPE_PARSER(construct<OmpReductionOperator>(Parser<DefinedOperator>{}) ||
construct<OmpReductionOperator>(Parser<ProcedureDesignator>{}))
TYPE_PARSER(construct<OmpReductionClause>(
- Parser<OmpReductionOperator>{} / ":", Parser<OmpObjectList>{}))
+ Parser<OmpReductionOperator>{} / ":", nonemptyList(designator)))
// OMP 5.0 2.11.4 ALLOCATE ([allocator:] variable-name-list)
TYPE_PARSER(construct<OmpAllocateClause>(
@@ -220,9 +220,6 @@ TYPE_PARSER(
parenthesized(Parser<OmpProcBindClause>{}))) ||
"REDUCTION" >>
construct<OmpClause>(parenthesized(Parser<OmpReductionClause>{})) ||
- "TASK_REDUCTION" >>
- construct<OmpClause>(construct<OmpClause::TaskReduction>(
- parenthesized(Parser<OmpReductionClause>{}))) ||
"RELAXED" >> construct<OmpClause>(construct<OmpClause::Relaxed>()) ||
"RELEASE" >> construct<OmpClause>(construct<OmpClause::Release>()) ||
"SAFELEN" >> construct<OmpClause>(construct<OmpClause::Safelen>(
diff --git a/flang/lib/Parser/unparse.cpp b/flang/lib/Parser/unparse.cpp
index ba54a0a84fa7..fdb694f3d26f 100644
--- a/flang/lib/Parser/unparse.cpp
+++ b/flang/lib/Parser/unparse.cpp
@@ -2016,7 +2016,7 @@ class UnparseVisitor {
Word("REDUCTION(");
Walk(std::get<OmpReductionOperator>(x.t));
Put(":");
- Walk(std::get<OmpObjectList>(x.t));
+ Walk(std::get<std::list<Designator>>(x.t), ",");
Put(")");
}
void Unparse(const OmpAllocateClause &x) {
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index a144c7a2b57b..e2c8333ce7ee 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -419,7 +419,6 @@ CHECK_SIMPLE_CLAUSE(Mergeable, OMPC_mergeable)
CHECK_SIMPLE_CLAUSE(Nogroup, OMPC_nogroup)
CHECK_SIMPLE_CLAUSE(Notinbranch, OMPC_notinbranch)
CHECK_SIMPLE_CLAUSE(Nowait, OMPC_nowait)
-CHECK_SIMPLE_CLAUSE(TaskReduction, OMPC_task_reduction)
CHECK_SIMPLE_CLAUSE(To, OMPC_to)
CHECK_SIMPLE_CLAUSE(Uniform, OMPC_uniform)
CHECK_SIMPLE_CLAUSE(Untied, OMPC_untied)
diff --git a/flang/lib/Semantics/check-omp-structure.h b/flang/lib/Semantics/check-omp-structure.h
index ccd0e08a8c08..a966eaf8c4a7 100644
--- a/flang/lib/Semantics/check-omp-structure.h
+++ b/flang/lib/Semantics/check-omp-structure.h
@@ -155,7 +155,6 @@ class OmpStructureChecker
void Enter(const parser::OmpClause::Safelen &);
void Enter(const parser::OmpClause::Shared &);
void Enter(const parser::OmpClause::Simdlen &);
- void Enter(const parser::OmpClause::TaskReduction &);
void Enter(const parser::OmpClause::ThreadLimit &);
void Enter(const parser::OmpClause::To &);
void Enter(const parser::OmpClause::Link &);
diff --git a/flang/test/Semantics/omp-clause-validity01.f90 b/flang/test/Semantics/omp-clause-validity01.f90
index 1d689ea91699..3f5345137866 100644
--- a/flang/test/Semantics/omp-clause-validity01.f90
+++ b/flang/test/Semantics/omp-clause-validity01.f90
@@ -349,8 +349,7 @@
! collapse-clause
a = 0.0
- !ERROR: TASK_REDUCTION clause is not allowed on the SIMD directive
- !$omp simd private(b) reduction(+:a) task_reduction(+:a)
+ !$omp simd private(b) reduction(+:a)
do i = 1, N
a = a + b + 3.14
enddo
@@ -450,8 +449,7 @@
enddo
!ERROR: At most one NUM_TASKS clause can appear on the TASKLOOP directive
- !ERROR: TASK_REDUCTION clause is not allowed on the TASKLOOP directive
- !$omp taskloop num_tasks(3) num_tasks(2) task_reduction(*:a)
+ !$omp taskloop num_tasks(3) num_tasks(2)
do i = 1,N
a = 3.14
enddo
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td
index 9fd14cb03a47..fa67a64fa997 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMP.td
+++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td
@@ -231,7 +231,6 @@ def OMPC_IsDevicePtr : Clause<"is_device_ptr"> {
}
def OMPC_TaskReduction : Clause<"task_reduction"> {
let clangClass = "OMPTaskReductionClause";
- let flangClassValue = "OmpReductionClause";
}
def OMPC_InReduction : Clause<"in_reduction"> {
let clangClass = "OMPInReductionClause";
More information about the llvm-branch-commits
mailing list