[flang-commits] [flang] [llvm] [mlir] [flang][OpenMP] Add basic support to lower `loop` directive to MLIR (PR #114199)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Thu Oct 31 08:51:40 PDT 2024


================
@@ -2034,6 +2034,52 @@ static void genStandaloneDo(lower::AbstractConverter &converter,
                 llvm::omp::Directive::OMPD_do, dsp);
 }
 
+static void genLoopClauses(
+    lower::AbstractConverter &converter, semantics::SemanticsContext &semaCtx,
+    const List<Clause> &clauses, mlir::Location loc,
+    mlir::omp::LoopOperands &clauseOps,
+    llvm::SmallVectorImpl<const semantics::Symbol *> &reductionSyms) {
+  ClauseProcessor cp(converter, semaCtx, clauses);
+  cp.processOrder(clauseOps);
+  cp.processReduction(loc, clauseOps, reductionSyms);
+  cp.processTODO<clause::Bind, clause::Lastprivate>(
----------------
skatrak wrote:

Is `lastprivate` not already handled by the call in `createBodyOfOp()` to `DataSharingProcessor::processStep2()`?

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


More information about the flang-commits mailing list