Skip to content
Commit c5e8fbbf authored by Martin Erhart's avatar Martin Erhart
Browse files

[mlir][bufferization] Add pattern to BufferDeallocationSimplification pass...

[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
parent 42b3925d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment