[mlir][bufferize] Simplify ModuleBufferization driver
authorMatthias Springer <springerm@google.com>
Wed, 6 Apr 2022 14:41:33 +0000 (23:41 +0900)
committerMatthias Springer <springerm@google.com>
Wed, 6 Apr 2022 14:53:07 +0000 (23:53 +0900)
commitcd7de446fd27ba7f9865087ce1b97a3e01d42cee
treeef196e13751acb61f4e166c7aa3159b6fe0028f9
parent5ab34492d6847e3d9e71062a48bc1a2fd6c9b34e
[mlir][bufferize] Simplify ModuleBufferization driver

* Bufferize FuncOp bodies and boundaries in the same loop. This is in preparation of moving FuncOp bufferization into an external model implementation.
* As a side effect, stop bufferization earlier if there was an error. (Do not continue bufferization, fewer error messages.)
* Run equivalence analysis of CallOps before the main analysis. This is needed so that equialvence info is propagated properly.

Differential Revision: https://reviews.llvm.org/D123208
mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
mlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir