[MLIR] Add affine.parallel folder and normalizer
authorFrank Laub <frank.laub@intel.com>
Thu, 20 Aug 2020 22:19:37 +0000 (22:19 +0000)
committerFrank Laub <frank.laub@intel.com>
Thu, 20 Aug 2020 22:23:21 +0000 (22:23 +0000)
commitcca3f3dd2681877cae3dc601779e268ed2341fa3
tree4ef6a01340d215423632105ae1546444915b15e4
parent4e266eaf132fa7e16eb6593dcfe4f4b9f55ea092
[MLIR] Add affine.parallel folder and normalizer

Add a folder to the affine.parallel op so that loop bounds expressions are canonicalized.

Additionally, a new AffineParallelNormalizePass is added to adjust affine.parallel ops so that the lower bound is always 0 and the upper bound always represents a range with a step size of 1.

Differential Revision: https://reviews.llvm.org/D84998
mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
mlir/include/mlir/Dialect/Affine/IR/AffineValueMap.h
mlir/include/mlir/Dialect/Affine/Passes.h
mlir/include/mlir/Dialect/Affine/Passes.td
mlir/include/mlir/Dialect/Affine/Utils.h
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
mlir/lib/Dialect/Affine/Transforms/AffineParallelNormalize.cpp [new file with mode: 0644]
mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
mlir/test/Dialect/Affine/affine-parallel-normalize.mlir [new file with mode: 0644]
mlir/test/Dialect/Affine/canonicalize.mlir