[mlir][Linalg] Add a ComprehensiveModuleBufferizePass and support for CallOp analysis...
authorNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 29 Jun 2021 15:39:14 +0000 (15:39 +0000)
committerNicolas Vasilache <nicolas.vasilache@gmail.com>
Tue, 29 Jun 2021 19:18:22 +0000 (19:18 +0000)
commita77524cd2c20f4d0aa4ddd164f12f7af64b5bfc8
tree7c0213004e236f17ac2536551032736a2d886f75
parent90dfd059198ed94334f9b1ccfd29b566feb75e8b
[mlir][Linalg] Add a ComprehensiveModuleBufferizePass and support for CallOp analysis(9/n)

This revision adds the minimal plumbing to create a simple ComprehensiveModuleBufferizePass that can behave conservatively in the presence of CallOps.

A topological sort of caller/callee is performed and, if the call-graph is cycle-free, analysis can proceed.

Differential revision: https://reviews.llvm.org/D104859
mlir/include/mlir/Dialect/Linalg/Passes.h
mlir/include/mlir/Dialect/Linalg/Passes.td
mlir/include/mlir/IR/FunctionSupport.h
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
mlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir [new file with mode: 0644]
mlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir [new file with mode: 0644]