[all-commits] [llvm/llvm-project] 15c7e3: [mlir][linalg][bufferize][NFC] Use RewritePatterns...

Matthias Springer via All-commits all-commits at lists.llvm.org
Thu Jan 6 07:57:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15c7e3ee159795c5cc38c97d3049b8ef3b2bff5e
      https://github.com/llvm/llvm-project/commit/15c7e3ee159795c5cc38c97d3049b8ef3b2bff5e
  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/BufferizationInterfaceImpl.cpp
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ComprehensiveBufferize.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/test/Dialect/Linalg/comprehensive-module-bufferize-alloca.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][linalg][bufferize][NFC] Use RewritePatterns instead of custom traversal

This change simplifies BufferizableOpInterface and other functions. Overall, the API will get smaller: Functions related to custom IR traversal are deleted entirely. This will makes it easier to write BufferizableOpInterface implementations.

This is also in preparation of unifying Comprehensive Bufferize and core bufferization. While Comprehensive Bufferize could theoretically maintain its own IR traversal, there is no reason to do so, because all bufferize implementations in BufferizableOpInterface have to support partial bufferization anyway. And we can share a larger part of the code base between the two bufferizations.

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




More information about the All-commits mailing list