Revert "[Flang][openmp][5.0] Add task_reduction clause."

This reverts commit 9a7895dc20.
Reverting due to missing Co-author attribution.

https://reviews.llvm.org/D93105
This commit is contained in:
sameeran joshi 2020-12-22 23:46:51 +05:30 committed by Sameeran joshi
parent 34e72a1461
commit 1aa10ab2e1
7 changed files with 5 additions and 13 deletions

View File

@ -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)

View File

@ -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>(

View File

@ -2016,7 +2016,7 @@ public:
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) {

View File

@ -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)

View File

@ -155,7 +155,6 @@ public:
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 &);

View File

@ -349,8 +349,7 @@ use omp_lib
! 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 @@ use omp_lib
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

View File

@ -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";