[flang-commits] [flang] [Flang][OpenMP]Support for lowering task_reduction and in_reduction to MLIR (PR #111155)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Fri Dec 6 07:22:47 PST 2024


================
@@ -344,8 +344,13 @@ void DataSharingProcessor::collectSymbols(
   // Collect all symbols referenced in the evaluation being processed,
   // that matches 'flag'.
   llvm::SetVector<const semantics::Symbol *> allSymbols;
+  bool collectSymbols = true;
+  for (const omp::Clause &clause : clauses) {
+    if (clause.id == llvm::omp::Clause::OMPC_in_reduction)
+      collectSymbols = false;
+  }
----------------
skatrak wrote:

Nit: This can be simplified with `llvm::find_if()`.

https://github.com/llvm/llvm-project/pull/111155


More information about the flang-commits mailing list