[all-commits] [llvm/llvm-project] 660fde: [mlir][bufferization] Add specialized lowering for...
Martin Erhart via All-commits
all-commits at lists.llvm.org
Mon Aug 14 01:59:15 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 660fdedec9d6ddcd4dcd311edd60cfc27d74ef55
https://github.com/llvm/llvm-project/commit/660fdedec9d6ddcd4dcd311edd60cfc27d74ef55
Author: Martin Erhart <merhart at google.com>
Date: 2023-08-14 (Mon, 14 Aug 2023)
Changed paths:
M mlir/lib/Conversion/BufferizationToMemRef/BufferizationToMemRef.cpp
M mlir/test/Conversion/BufferizationToMemRef/bufferization-to-memref.mlir
Log Message:
-----------
[mlir][bufferization] Add specialized lowering for deallocs with one memref but arbitrary retains
It is often the case that many values in the `memrefs` operand list can be
split off to speparate dealloc operations by the
`--buffer-deallocation-simplification` pass, however, the retain list has to be
preserved initially. Further canonicalization can often trim it down
considerable, but some retains may remain. In those cases, the general lowering
would be chosen, but is very inefficient. This commit adds another lowering for
those cases which avoids allocation of auxillary memrefs and the helper
function while still producing code that is linear in the number of operands of
the dealloc operation.
Reviewed By: springerm
Differential Revision: https://reviews.llvm.org/D157692
More information about the All-commits
mailing list