[all-commits] [llvm/llvm-project] 0f5edb: [mlir][linalg][bufferize] Add `createDealloc` options

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jan 6 13:17:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f5edb9d63b871396e773224ca9005b8c2c7520d
      https://github.com/llvm/llvm-project/commit/0f5edb9d63b871396e773224ca9005b8c2c7520d
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-01-07 (Fri, 07 Jan 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.h
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/LinalgInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp

  Log Message:
  -----------
  [mlir][linalg][bufferize] Add `createDealloc` options

If `createDealloc` is deactivated (enabled by default), newly allocated buffers are not deallocated anymore. In such a case, the missing deallocations can be inserted by the existing "BufferDeallocation" pass.

This change is needed for unifying core bufferization and Comprehensive Bufferize. Core bufferization has a separate pass for generating deallocations.

Note: In the future, this will evolve towards generating deallocation ops only for buffer allocations that do not escape block boundaries (i.e., that are in destination passing style).

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




More information about the All-commits mailing list