[mlir][bufferization] Restrict function boundary buffer. to func.call.
authorIngo Müller <ingomueller@google.com>
Fri, 10 Feb 2023 11:31:35 +0000 (11:31 +0000)
committerIngo Müller <ingomueller@google.com>
Fri, 10 Feb 2023 11:59:06 +0000 (11:59 +0000)
commitdc700f1e4dafaaec41ddb94eb0aeab8f6a80875f
treeb8bd043a0d0e8587a4c5297409aeaf16015d3cc1
parent1842b5885baa1e002b3fa8b6ac1bae9cf4d39610
[mlir][bufferization] Restrict function boundary buffer. to func.call.

The current bufferization on function boundaries works on `func.func`
and any call op implementing `CallOpInterface`. Then, an error is thrown
if there is a `CallOpInterface` op that is not `func.call`. This is
unnecessary and breaks the pass whenever such an op occurs (such as
`llvm.call`). This PR simply restricts the handling of call ops to
`func.call`.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D143724
mlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp
mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize-invalid.mlir
mlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize.mlir