Add canonicalization pattern for linalg.dim
authorNicolas Vasilache <ntv@google.com>
Thu, 8 Aug 2019 16:09:29 +0000 (09:09 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 8 Aug 2019 16:09:58 +0000 (09:09 -0700)
commitb0ea33a7c62654a6aec8de37156755abb3021da9
treeea3436893f008b8d6cc4f2af263cec499065b19b
parent881b238d7e9d78d660a8f7b4c534077af164a03d
Add canonicalization pattern for linalg.dim

This CL introduces canonicalization patterns for linalg.dim.
This allows the dimenions of chains of view, slice and subview operations to simplify.
Down the line, when mixed with cse, this also allows better composition of linalg tiling and fusion by tracking operations that give the same result (not in this CL).

PiperOrigin-RevId: 262365865
mlir/include/mlir/Linalg/IR/LinalgOps.td
mlir/lib/Linalg/IR/LinalgOps.cpp
mlir/test/Linalg/canonicalize.mlir [new file with mode: 0644]