Files
clang-p2996/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
srcarroll 8906b7be91 Enable custom alloc-like ops in promoteBufferResultsToOutParams (#120288)
In `buffer-results-to-out-params`, when `hoist-static-allocs` option is
enabled the pass was looking for `memref.alloc`s in order to attempt to
avoid copies when it can. Which makes it not extensible to external ops
that have allocation like properties. This patch simply changes
`memref::AllocOp` to `AllocationOpInterface` in the check to enable for
any allocation op.
Moreover, for function call updates, we enable setting an allocation
function callback in `BufferResultsToOutParamsOpts` to allow users to
emit their own alloc-like op.
2024-12-26 11:32:51 -06:00

9.8 KiB