[Mlir-commits] [flang] [mlir] [openmp] [MLIR][OpenMP] Add scan reduction lowering to llvm (PR #167031)
Sergio Afonso
llvmlistbot at llvm.org
Thu Apr 9 08:15:58 PDT 2026
================
@@ -2471,12 +2446,59 @@ genParallelOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
static mlir::omp::ScanOp
genScanOp(lower::AbstractConverter &converter, lower::SymMap &symTable,
- semantics::SemanticsContext &semaCtx, mlir::Location loc,
- const ConstructQueue &queue, ConstructQueue::const_iterator item) {
+ semantics::SemanticsContext &semaCtx, lower::pft::Evaluation &eval,
+ mlir::Location loc, const ConstructQueue &queue,
+ ConstructQueue::const_iterator item) {
mlir::omp::ScanOperands clauseOps;
genScanClauses(converter, semaCtx, item->clauses, loc, clauseOps);
- return mlir::omp::ScanOp::create(converter.getFirOpBuilder(),
- converter.getCurrentLocation(), clauseOps);
+ mlir::omp::ScanOp scanOp = mlir::omp::ScanOp::create(
+ converter.getFirOpBuilder(), converter.getCurrentLocation(), clauseOps);
+
+ /// Scan reduction is not implemented with nested workshare loops, linear
+ /// clause, tiling
----------------
skatrak wrote:
```suggestion
// TODO: Nested workshare loops (or nested scan loops), simd loops, composite loops, linear clauses, tiled loops and collapsed loops.
```
https://github.com/llvm/llvm-project/pull/167031
More information about the Mlir-commits
mailing list