[all-commits] [llvm/llvm-project] 82ea0d: [mlir][bufferize] Support alloc hoisting across fu...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu May 12 00:47:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82ea0d8b824892fd04f82416782369cd77da836a
      https://github.com/llvm/llvm-project/commit/82ea0d8b824892fd04f82416782369cd77da836a
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
    M mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
    A mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-out-params.mlir

  Log Message:
  -----------
  [mlir][bufferize] Support alloc hoisting across function boundaries

This change integrates the BufferResultsToOutParamsPass into One-Shot Module Bufferization. This improves memory management (deallocation) when buffers are returned from a function.

Note: This currently only works with statically-sized tensors. The generated code is not very efficient yet and there are opportunities for improvment (fewer copies). By default, this new functionality is deactivated.

Differential Revision: https://reviews.llvm.org/D125376




More information about the All-commits mailing list