[all-commits] [llvm/llvm-project] 70777d: [mlir][bufferize][NFC] Move FuncOp bufferization t...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Apr 22 02:48:11 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 70777d967fb79b4b12caff2fabbff06b7f11acc7
  Author: Matthias Springer <springerm at google.com>
  Date:   2022-04-22 (Fri, 22 Apr 2022)

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

  Log Message:
  [mlir][bufferize][NFC] Move FuncOp bufferization to BufferizableOpInterface impl

FuncOps are now less special. They must still be analyzed + bufferized in a certain order, but they are now bufferized same as other ops that have a region: Bufferize the op first (`bufferize` interface method), then bufferize the region body with other bufferization patterns. In the case of FuncOps, the function signature is bufferized together with ReturnOps. Similar to how, e.g., scf.for ops are bufferized together with scf.yield ops.

This change is essentially a reimplementation of the FuncOp bufferization, but mostly NFC from a user's perspective (apart from error messages). This change is in preparation of moving the code to the bufferization dialect.

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

More information about the All-commits mailing list