[mlir] Add canonicalization for tensor_cast + tensor_to_memref
authorThomas Raoux <thomasraoux@google.com>
Tue, 16 Feb 2021 05:10:07 +0000 (21:10 -0800)
committerThomas Raoux <thomasraoux@google.com>
Tue, 16 Feb 2021 15:11:09 +0000 (07:11 -0800)
commit807e5467f3e1b115f53377ea36ecad5625ce8280
tree50e78a57d50537bbb3f46a75d1acd6553b3b0c5f
parentcb1a42359bff2ba49d072df88ad3ffb4c66c16d8
[mlir] Add canonicalization for tensor_cast + tensor_to_memref

This helps bufferization passes by removing tensor_cast operations.

Differential Revision: https://reviews.llvm.org/D96745
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Dialect/Standard/canonicalize.mlir