[all-commits] [llvm/llvm-project] 76b160: [mlir][bufferize] Fix config not passed to greedy ...

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


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

  Changed paths:
    M mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
    M mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-partial.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-alloca.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-init-tensor-elimination.mlir
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir

  Log Message:
  -----------
  [mlir][bufferize] Fix config not passed to greedy rewriter

Also add a TODO to switch to a custom walk instead of the GreedyPatternRewriter, which should be more efficient. (The bufferization pattern is guaranteed to apply only a single time for every op, so a simple walk should suffice.)

We currently specify a top-to-bottom walk order. This is important because other walk orders could introduce additional casts and/or buffer copies. These canonicalize away again, but it is more efficient to never generate them in the first place.

Note: A few of these canonicalizations are not yet implemented.

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




More information about the All-commits mailing list