[mlir][tensor] Add some folders for insert/extract slice ops
authorLei Zhang <antiagainst@google.com>
Tue, 12 Oct 2021 12:35:16 +0000 (08:35 -0400)
committerLei Zhang <antiagainst@google.com>
Tue, 12 Oct 2021 12:40:54 +0000 (08:40 -0400)
commitbdd37c9f494420aef954e63ab0315cc787d658b4
treeb71a2329a0594b24e2a8709c96f8499d018e6814
parent0c74b12a2e819902db0615d2c5c8123e05e084c7
[mlir][tensor] Add some folders for insert/extract slice ops

* Fold extract_slice immediately after insert_slice.
* Fold overlapping insert_slice.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D111439
mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
mlir/test/Dialect/Linalg/hoisting.mlir
mlir/test/Dialect/Tensor/canonicalize.mlir