[all-commits] [llvm/llvm-project] 6b1668: [mlir][Linalg] Improve comprehensive bufferization...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon Jul 12 03:36:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b1668397fd33440847f5a82675c5b83c4137018
      https://github.com/llvm/llvm-project/commit/6b1668397fd33440847f5a82675c5b83c4137018
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-07-12 (Mon, 12 Jul 2021)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
    M mlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir

  Log Message:
  -----------
  [mlir][Linalg] Improve comprehensive bufferization for scf.yield.

Previously, comprehensive bufferization of scf.yield did not have enough information
to detect whether an enclosing scf::for bbargs would bufferize to a buffer equivalent
to that of the matching scf::yield operand.
As a consequence a separate sanity check step would be required to determine whether
bufferization occured properly.
This late check would miss the case of calling a function in an loop.

Instead, we now pass and update aliasInfo during bufferization and it is possible to
imrpove bufferization of scf::yield and drop that post-pass check.

Add an example use case that was failing previously.
This slightly modifies the error conditions, which are also updated as part of this
revision.

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




More information about the All-commits mailing list