llvm-project
8906b7be - Enable custom alloc-like ops in `promoteBufferResultsToOutParams` (#120288)

Commit
278 days ago
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.
Author
Parents
Loading