[PATCH] D90697: [Flang][OpenMP 4.5] Add semantic check for OpenMP Reduction Clause
Valentin Clement via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 12:20:42 PST 2020
clementval added a comment.
Couple of comments and questions.
================
Comment at: flang/lib/Semantics/check-directive-structure.h:210
+ context_.Say(GetContext().clauseSource,
+ "A list item that appears in a REDUCTION clause"
+ " of a worksharing construct must be shared in"
----------------
The check and the error message seem very OpenMP specific. It would be better to move this to the OpenMP specific file. If it is reusable by OpenACC the error message should be passed to the function.
================
Comment at: flang/test/Semantics/omp-reduction01.f90:11
+ !$omp parallel do reduction(**:k)
+ do i = 1, 10
+ k = k ** 1
----------------
Indent does not follows other tests already upstreamed.
================
Comment at: flang/test/Semantics/omp-reduction02.f90:12
+ !$omp parallel do reduction(+:k), reduction(-:k)
+ do i = 1, 10
+ k = k + 1
----------------
Same comment for the indentation.
================
Comment at: flang/test/Semantics/omp-reduction03.f90:13
+ !$omp parallel do reduction(+:p)
+ do i = 1, 10
+ k= k + 1
----------------
Indentation
================
Comment at: flang/test/Semantics/omp-reduction04.f90:11
+ !$omp parallel do reduction(+:k)
+ do i = 1, 10
+ l = k + 1
----------------
Indentation
================
Comment at: flang/test/Semantics/omp-reduction05.f90:13
+ !$omp parallel do reduction(+:a(1:0:2))
+ do i = 1, 10
+ k = k + 1
----------------
Indentation
================
Comment at: flang/test/Semantics/omp-reduction06.f90:13
+ !$omp parallel do reduction(+:a(1:10:3))
+ do i = 1, 10
+ k = k + 1
----------------
Indentation
================
Comment at: flang/test/Semantics/omp-reduction07.f90:10
+ !$omp parallel do reduction(+:k), private(k)
+ do i = 1, 10
+ k = k + 1
----------------
Indentation
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90697/new/
https://reviews.llvm.org/D90697
More information about the llvm-commits
mailing list