After discussion in D93105 we found that the reduction clause was not following
the common OmpClause convention. This patch makes reduction clause part of OmpClause
with a value of OmpReductionClause in a similar way than task_reduction.
The unparse function for OmpReductionClause is adapted since the keyword and parenthesis
are issued by the corresponding unparse function for parser::OmpClause::Reduction.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Semantics/check-omp-structure.cpp | ||
---|---|---|
498–499 | A quick question on this- |
flang/lib/Semantics/check-omp-structure.cpp | ||
---|---|---|
498–499 | Any clause will have a definition in OMP.td. If they have a flangClass defined it will remove them from OmpClause. I guess we can have a look at all of them and see if there is still a good reason why they are not part of OmpClause. Might be a technical-debt from the refactoring when we switch to TableGen. In OpenACC there is no such clause. Let me know if you want to have a look at this. Otherwise I can do it. |
flang/lib/Semantics/check-omp-structure.cpp | ||
---|---|---|
498–499 | Just mean that the initial approach choose a simple path instead of a generic enough one. So when we refactored it we kept some of it and now it's good time to move everything to the same concept. |
flang/lib/Semantics/check-omp-structure.cpp | ||
---|---|---|
421 | Can we get an Enter function (Enter(const parser::OmpClause::Reduction &x)) to check the restrictions on Reduction clause. |
flang/lib/Semantics/check-omp-structure.cpp | ||
---|---|---|
421 | Can be added when necessary |
Can we get an Enter function (Enter(const parser::OmpClause::Reduction &x)) to check the restrictions on Reduction clause.