[all-commits] [llvm/llvm-project] d9184a: [mlir][linalg][bufferize][NFC] Simplify buffer API...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Jan 7 08:16:34 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9184ab1a53ae008722fc569d147b1c88acbbd9d
      https://github.com/llvm/llvm-project/commit/d9184ab1a53ae008722fc569d147b1c88acbbd9d
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-01-08 (Sat, 08 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/ModuleBufferization.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/SCFInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/TensorInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/VectorInterfaceImpl.cpp

  Log Message:
  -----------
  [mlir][linalg][bufferize][NFC] Simplify buffer API of BufferizationState

Instead of `lookupBuffer` and `getResultBuffer`, there is now a single `getBuffer` function. This simplifies the `BufferizableOpInterface` API and is less confusing to users. They could previously have called the wrong function.

Furthermore, since `getBuffer` now takes an `OpOperand &` instead of a `Value`, users can no longer accidentally use one of the previous two functions incorrectly, which would have resulted in missing buffer copies.

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




More information about the All-commits mailing list