[all-commits] [llvm/llvm-project] c5e8fb: [mlir][bufferization] Add pattern to BufferDealloc...
Martin Erhart via All-commits
all-commits at lists.llvm.org
Thu Aug 10 06:47:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c5e8fbbf7151b0a9ec271f0da13cae7d8f7907fb
https://github.com/llvm/llvm-project/commit/c5e8fbbf7151b0a9ec271f0da13cae7d8f7907fb
Author: Martin Erhart <merhart at google.com>
Date: 2023-08-10 (Thu, 10 Aug 2023)
Changed paths:
M mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocationSimplification.cpp
M mlir/test/Dialect/Bufferization/Transforms/buffer-deallocation-simplification.mlir
Log Message:
-----------
[mlir][bufferization] Add pattern to BufferDeallocationSimplification pass that removes unnecessary retain values
Adds a pattern that removes memrefs from the `retained` list which are
guaranteed to not alias any memref in the `memrefs` list. The corresponding
result value can be replaced with `false` in that case according to the
operation description.
When applied after BufferDeallocation, this can considerably reduce the
overhead that needs to be added during the lowering of the dealloc operation to
check for aliasing (especially when there is only one element in the `memref`
list and all `retained` values can be removed).
Depends on D157398
Reviewed By: springerm
Differential Revision: https://reviews.llvm.org/D157407
More information about the All-commits
mailing list