[all-commits] [llvm/llvm-project] dbd981: [mlir][scf] Add parallelLoopUnrollByFactors() (#16...

fabrizio-indirli via All-commits all-commits at lists.llvm.org
Mon Oct 27 07:52:12 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbd9818db320abc02a055201ba6b069069c09e58
      https://github.com/llvm/llvm-project/commit/dbd9818db320abc02a055201ba6b069069c09e58
  Author: fabrizio-indirli <fabrizio.indirli at arm.com>
  Date:   2025-10-27 (Mon, 27 Oct 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/SCF/IR/SCF.h
    M mlir/include/mlir/Dialect/SCF/Utils/Utils.h
    M mlir/lib/Dialect/SCF/IR/SCF.cpp
    M mlir/lib/Dialect/SCF/Utils/Utils.cpp
    A mlir/test/Dialect/SCF/parallel-loop-unroll.mlir
    M mlir/test/lib/Dialect/SCF/CMakeLists.txt
    A mlir/test/lib/Dialect/SCF/TestParallelLoopUnrolling.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][scf] Add parallelLoopUnrollByFactors() (#164958)

- In the SCF Utils, add the `parallelLoopUnrollByFactors()` function to
unroll scf::ParallelOp loops according to the specified unroll factors
- Add a test pass "TestParallelLoopUnrolling" and the related LIT test
- Expose `mlir::parallelLoopUnrollByFactors()`,
`mlir::generateUnrolledLoop()`, and `mlir::scf::computeUbMinusLb()`
functions in the mlir/Dialect/SCF/Utils/Utils.h and /IR/SCF.h headers to
make them available to other passes.
- In `mlir::generateUnrolledLoop()`, add an optional `IRMapping *clonedToSrcOpsMap` 
argument to map the new cloned operations to their
original ones. In the function body, change the default `AnnotateFn`
type to `static const` to silence potential warnings about dangling
references when a function_ref is assigned to a variable with automatic
storage.

Signed-off-by: Fabrizio Indirli <Fabrizio.Indirli at arm.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list