[all-commits] [llvm/llvm-project] 39ec46: [mlir][bufferize] Extract buffer hoisting into sep...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Mar 15 05:32:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39ec46bd83703364d6d4da1e2ca3b09fa12d7a6b
      https://github.com/llvm/llvm-project/commit/39ec46bd83703364d6d4da1e2ca3b09fa12d7a6b
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-03-15 (Tue, 15 Mar 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h
    R mlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/AffineInterfaceImpl.h
    M mlir/lib/Dialect/Bufferization/IR/BufferizableOpInterface.cpp
    R mlir/lib/Dialect/Linalg/ComprehensiveBufferize/AffineInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
    M mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/lib/Dialect/Shape/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-partial.mlir
    M mlir/test/Dialect/Linalg/bufferize.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-alloca.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
    M mlir/test/Dialect/Tensor/bufferize.mlir
    M mlir/test/lib/Dialect/Linalg/CMakeLists.txt
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
    M utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel

  Log Message:
  -----------
  [mlir][bufferize] Extract buffer hoisting into separate function

This improves the modularity of the bufferization.

>From now on, all ops that do not implement BufferizableOpInterface are considered hoisting barriers. Previously, all ops that do not implement the interface were not considered barriers and such ops had to be marked as barriers explicitly. This was unsafe because we could've hoisted across unknown ops where it was not safe to hoist.

As a side effect, this allows for cleaning up AffineBufferizableOpInterfaceImpl. This build unit no longer needed and can be deleted.

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




More information about the All-commits mailing list