[Mlir-commits] [mlir] [mlir][bufferize] Make buffer-results-to-out-params support only functions that are neither public nor extern (PR #162441)

Isaac Nudelman llvmlistbot at llvm.org
Tue Oct 14 19:08:46 PDT 2025


nuudlman wrote:

I'm not sure I follow this line of reasoning. Privatization is a much more significant breaking API change as compared to a transform that one-shot changes the calling convention.

There are multiple arguments against this:
1. EmitC is supposedly usable end to end with upstream unmodified MLIR. There is no un-privatize pass in upstream MLIR (at least that I am aware of), so this workaround is not usable without writing code. Assuming that the privatized function survives to export (since private functions are liable to get elided), it no longer has any API since it is private. 
2. This pass documents that it is only valid for cases where all of the relevant MLIR is visible in the module so that it can do a one-shot conversion. Regardless, calling conventions are enforced globally, so any unknown callers must also expect this change.
3. `symbol-privatize` is an invalid pass by your line of reasoning, as there may be unknown callers that rely on the presence of public functions that are made private

https://github.com/llvm/llvm-project/pull/162441


More information about the Mlir-commits mailing list