[mlir][bufferize] Do not run the buffer deallocation pass if no allocs escape block...
authorMatthias Springer <springerm@google.com>
Wed, 23 Mar 2022 11:07:23 +0000 (20:07 +0900)
committerMatthias Springer <springerm@google.com>
Wed, 23 Mar 2022 12:07:35 +0000 (21:07 +0900)
commit3b74aac29c97b587c30d940e00b338af384ede59
tree626459ca5df76e778f60aa97f0f4b8bb1d552bd4
parentb26466d0019582f9b3dc65587cf8043da144b45d
[mlir][bufferize] Do not run the buffer deallocation pass if no allocs escape block boundaries

This fixes a bufferization issue with ops that are not supported by the buffer deallocation pass when `allow-return-allocs=0`.

Differential Revision: https://reviews.llvm.org/D122304
mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp