[mlir][linalg] Include InitTensorOp in tiling canonicalization
authorLei Zhang <antiagainst@google.com>
Fri, 1 Oct 2021 18:12:54 +0000 (14:12 -0400)
committerLei Zhang <antiagainst@google.com>
Fri, 1 Oct 2021 18:13:19 +0000 (14:13 -0400)
commita3f425946d33d605c142ef39edf522d9455a4fe5
tree62a67ab5fa41c9524602eeda682923b3a8018e8a
parenta7b4ce9cfd110db56d89fa8d76b39023d038de11
[mlir][linalg] Include InitTensorOp in tiling canonicalization

Tiling can create dim ops and those dim ops can take `InitTensorOp`
as input. Including it in the tiling canonicalization patterns
allows us to fold those dim ops away.

Also sorted the existing ops along the way.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D110876
mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp