[flang-commits] [PATCH] D94087: [flang][openmp]At most one threads, simd and depend clause can appear on OpenMP ORDERED construct.
Valentin Clement via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Jan 5 12:44:29 PST 2021
clementval added inline comments.
================
Comment at: flang/test/Semantics/omp-clause-validity01.f90:489
+ !ERROR: At most one DEPEND clause can appear on the ORDERED directive
+ !$omp ordered depend(source) depend(source)
+ !ERROR: At most one THREADS clause can appear on the ORDERED directive
----------------
kiranchandramohan wrote:
> Will this catch two or more depend(sink: v) clauses accidentally?
> ```
> At most one depend(source) clause can appear on an ordered construct.
> ```
>
> Can threads, simd occur with depend? Is that handled by the parser?
According to the standard multiple `depend(sink: vec)` are allowed so you will need to make a specific check for the depend clause since the general allowedOnce check does not support this.
@kiranchandramohan With the current patch `threads`, `simd` and `depend` are allowed together. The parser is not limiting clauses.
================
Comment at: llvm/include/llvm/Frontend/OpenMP/OMP.td:461
VersionedClause<OMPC_Simd>,
VersionedClause<OMPC_Depend>
];
----------------
`OMPC_Depend` should probably be in `allowedClauses` and specific check done in `check-omp-structure` for the difference between `depend(source)` and `depend(sink:vec)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94087/new/
https://reviews.llvm.org/D94087
More information about the flang-commits
mailing list