[all-commits] [llvm/llvm-project] 00a5ae: [mlir][bufferization] Better propagation of buffer...

Matthias Springer via All-commits all-commits at lists.llvm.org
Mon Feb 13 07:56:22 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00a5ae12448e6f33e40c38afd640eafdb7dab212
      https://github.com/llvm/llvm-project/commit/00a5ae12448e6f33e40c38afd640eafdb7dab212
  Author: Matthias Springer <springerm at google.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.td
    M mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
    M mlir/test/Dialect/SCF/one-shot-bufferize.mlir

  Log Message:
  -----------
  [mlir][bufferization] Better propagation of bufferizesToMemoryWrite through regions

`bufferizesToMemoryWrite(OpResult)` looks for OpOperands that bufferize to memory writes inside the region of the defining op (if it has one). Currently, if the reverse use-def chain stops at any value inside of the region, the OpResult is considered to bufferize to a memory write.

It is always safe to have false positives among `bufferizesToMemoryWrite`, so the previous implementation is also correct. However, it can lead to additional buffer copies.

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




More information about the All-commits mailing list