commit | 324ae0bd05afeaa18ac7e264b938b823e369dd99 | [log] [tgz] |
---|---|---|
author | Ivan Butygin <ivan.butygin@gmail.com> | Mon Apr 15 22:16:59 2024 +0300 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Apr 15 12:23:21 2024 -0700 |
tree | 3270d684d9fa2d473ea4a43fd75419755413bb65 | |
parent | 85b95fe99564cbc8b37c66e050a49b8baef06f16 [diff] |
[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 GitOrigin-RevId: b153c05cba9be7f009b8ad8413c5840baf7d278c
See https://mlir.llvm.org/ for more information.