[all-commits] [llvm/llvm-project] 8906b7: Enable custom alloc-like ops in `promoteBufferResu...

srcarroll via All-commits all-commits at lists.llvm.org
Thu Dec 26 09:33:13 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8906b7be918be653d3c5f2ef3dbd923561603969
      https://github.com/llvm/llvm-project/commit/8906b7be918be653d3c5f2ef3dbd923561603969
  Author: srcarroll <50210727+srcarroll at users.noreply.github.com>
  Date:   2024-12-26 (Thu, 26 Dec 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
    M mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp

  Log Message:
  -----------
  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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list