[all-commits] [llvm/llvm-project] 058af6: [mlir][bufferization] Decouple buffer-deallocation...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jun 9 09:24:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 058af65e786fed26fc7bf509aec3e45aba95f9e1
      https://github.com/llvm/llvm-project/commit/058af65e786fed26fc7bf509aec3e45aba95f9e1
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M mlir/docs/Bufferization.md
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
    M mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-allow-return-allocs.mlir
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-out-params.mlir
    M mlir/test/Dialect/SCF/one-shot-bufferize.mlir

  Log Message:
  -----------
  [mlir][bufferization] Decouple buffer-deallocation from One-Shot Bufferize

The buffer deallocation pass must now be run explicitly when `allow-return-alloc` is set.

This results in a few extra buffer copies in unoptimized test cases. The proper way to avoid such copies is to relax the OpOperand/OpResult aliasing contract on ops such as scf.for. Some of these copies can also be avoided by improving the buffer deallocation pass.

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




More information about the All-commits mailing list