[all-commits] [llvm/llvm-project] 173fd6: [mlir][scf][bufferize] Improve bufferization of al...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Oct 3 07:09:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 173fd67a124dfd0241b95c72935d572a677d2874
      https://github.com/llvm/llvm-project/commit/173fd67a124dfd0241b95c72935d572a677d2874
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-10-03 (Tue, 03 Oct 2023)

  Changed paths:
    M mlir/lib/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.cpp
    M mlir/test/Dialect/SCF/one-shot-bufferize.mlir

  Log Message:
  -----------
  [mlir][scf][bufferize] Improve bufferization of allocs yielded from `scf.for` (#68089)

The `BufferizableOpInterface` implementation of `scf.for` currently
assumes that an OpResult does not alias with any tensor apart from the
corresponding init OpOperand. Newly allocated buffers (inside of the
loop) are also allowed. The current implementation checks whether the
respective init_arg and yielded value are equivalent. This is overly
strict and causes extra buffer allocations/copies when yielding a new
buffer allocation from a loop.




More information about the All-commits mailing list