[all-commits] [llvm/llvm-project] b153c0: [mlir][scf] Uplift `scf.while` to `scf.for` (#76108)
Ivan Butygin via All-commits
all-commits at lists.llvm.org
Mon Apr 15 12:17:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b153c05cba9be7f009b8ad8413c5840baf7d278c
https://github.com/llvm/llvm-project/commit/b153c05cba9be7f009b8ad8413c5840baf7d278c
Author: Ivan Butygin <ivan.butygin at gmail.com>
Date: 2024-04-15 (Mon, 15 Apr 2024)
Changed paths:
M mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
M mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h
M mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
A mlir/lib/Dialect/SCF/Transforms/UpliftWhileToFor.cpp
A mlir/test/Dialect/SCF/uplift-while.mlir
M mlir/test/lib/Dialect/SCF/CMakeLists.txt
A mlir/test/lib/Dialect/SCF/TestUpliftWhileToFor.cpp
M mlir/tools/mlir-opt/mlir-opt.cpp
Log Message:
-----------
[mlir][scf] Uplift `scf.while` to `scf.for` (#76108)
Add uplifting from `scf.while` to `scf.for`.
This uplifting expects a very specific ops pattern:
* `before` block consisting of single `arith.cmp` op
* `after` block containing `arith.addi`
We also have a set of patterns to cleanup `scf.while` loops to get them
close to the desired form, they will be added in separate PRs.
This is part of upstreaming `numba-mlir` scf uplifting pipeline: `cf ->
scf.while -> scf.for -> scf.parallel`
Original code:
https://github.com/numba/numba-mlir/blob/main/mlir/lib/Transforms/PromoteToParallel.cpp
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