[mlir][tensor][bufferize] Fix deallocation of GenerateOp/FromElementsOp
authorMatthias Springer <springerm@google.com>
Mon, 25 Jul 2022 10:24:24 +0000 (12:24 +0200)
committerMatthias Springer <springerm@google.com>
Mon, 25 Jul 2022 10:25:06 +0000 (12:25 +0200)
commit664ffa46bb5266104d8c8e817d9ae2e885ea3ddd
tree53bc3d5bb5130b33c9b23b48bd401859f464b3e1
parent333ee218ce9b50ef9ded1dbafbb02667e56d18ab
[mlir][tensor][bufferize] Fix deallocation of GenerateOp/FromElementsOp

Both ops allocate a buffer. There were cases in which the buffer was not deallocated.

Differential Revision: https://reviews.llvm.org/D130469
mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
mlir/test/Dialect/Tensor/one-shot-bufferize.mlir