[mlir][SCF] Generalize AffineMinSCFCanonicalization to min/max ops
authorMatthias Springer <springerm@google.com>
Wed, 25 Aug 2021 01:28:01 +0000 (10:28 +0900)
committerMatthias Springer <springerm@google.com>
Wed, 25 Aug 2021 01:40:34 +0000 (10:40 +0900)
commita9cff97f94be6778265d225cb9f71db1fefed2d0
tree59c30e2dccf1d6dfeed937569d4ad1224df5d8fc
parent90e0c657b7cb3e4dd87229e338061d3cc27f6977
[mlir][SCF] Generalize AffineMinSCFCanonicalization to min/max ops

* Add support for affine.max ops to SCF loop peeling pattern.
* Add support for affine.max ops to `AffineMinSCFCanonicalizationPattern`.
* Rename `AffineMinSCFCanonicalizationPattern` to `AffineOpSCFCanonicalizationPattern`.
* Rename `AffineMinSCFCanonicalization` pass to `SCFAffineOpCanonicalization`.

Differential Revision: https://reviews.llvm.org/D108009
mlir/include/mlir/Dialect/SCF/Passes.h
mlir/include/mlir/Dialect/SCF/Passes.td
mlir/include/mlir/Dialect/SCF/Transforms.h
mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
mlir/test/Dialect/SCF/canonicalize-affine-op.mlir [moved from mlir/test/Dialect/SCF/canonicalize-scf-affine-min.mlir with 83% similarity]
mlir/test/Dialect/SCF/for-loop-peeling.mlir