[PATCH] D100224: [flang][OpenMP] Add semantic check for occurrence of variables other than loop iteration variable in a `linear` clause associated with a `distribute` construct.

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 30 06:11:27 PDT 2021


kiranchandramohan added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:341
+  const auto &clauses{std::get<parser::OmpClauseList>(beginLoopDir.t)};
+
+  // Get collapse level, if given, to find which loops are "associated."
----------------
kiranchandramohan wrote:
> Would it be possible to go through the linear clause first? If there is no linear clause there is no need to go through the iteration variables.
If you do this check in Leave then you can probably use FindClause/FindClauses.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100224/new/

https://reviews.llvm.org/D100224



More information about the llvm-commits mailing list