[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 20:04:46 PDT 2025


nuudlman wrote:

More broadly, I am not convinced that the argument that public function signatures cannot be changed holds water, as this would be a breaking change to the Func dialect and MLIR as a whole. 

The symbol visibility documentation (https://mlir.llvm.org/docs/SymbolsAndSymbolTables/#symbol-visibility)
> The symbol may be referenced from outside of the visible IR. We cannot assume that all of the uses of this symbol are observable.

does state that visibility of public symbols is unknown, however this does *not* state that public symbols are guaranteed to be immutable. As far as I can tell, the only evidence for this claim is this and similar PRs.

More importantly, public symbol immutability would be a very significant breaking change to MLIR as a whole.
There is existing precedent that public symbols can be modified if the user wishes so:

- The aforementioned `symbol-privatize` completely removes public symbols
- Bufferization can completely change the types of public symbols
- Target conversion likewise completely changes the types of public symbols (e.g. to llvm.func or to emitc.func)


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


More information about the Mlir-commits mailing list