[Mlir-commits] [flang] [llvm] [mlir] [flang][OpenMP] Enable tiling (PR #143715)
Sergio Afonso
llvmlistbot at llvm.org
Wed Aug 27 05:57:50 PDT 2025
================
@@ -1660,6 +1687,30 @@ genLoopNestClauses(lower::AbstractConverter &converter,
cp.processCollapse(loc, eval, clauseOps, iv);
clauseOps.loopInclusive = converter.getFirOpBuilder().getUnitAttr();
+
+ fir::FirOpBuilder &firOpBuilder = converter.getFirOpBuilder();
+ for (auto &clause : clauses) {
+ if (clause.id == llvm::omp::Clause::OMPC_collapse) {
+ const auto &collapse = std::get<clause::Collapse>(clause.u);
+ int64_t collapseValue = evaluate::ToInt64(collapse.v).value();
+ clauseOps.numCollapse = firOpBuilder.getI64IntegerAttr(collapseValue);
----------------
skatrak wrote:
This should be moved to `ClauseProcessor::processCollapse`. It probably now needs to take an `mlir::omp::LoopRelatedClause &` and an `mlir::omp::CollapseClause &` (`clauseOps` for both, in this case).
https://github.com/llvm/llvm-project/pull/143715
More information about the Mlir-commits
mailing list