[Mlir-commits] [mlir] [mlir] Retain original identifier names for debugging (PR #79704)

Perry Gibson llvmlistbot at llvm.org
Mon Jan 29 05:12:14 PST 2024


Wheest wrote:

I've managed to fix the issue around unused `func.func` arguments by handling them explicitly.

   Reading the Func dialect docs, [they say that](https://mlir.llvm.org/docs/Dialects/Func/#funcfunc-funcfuncop);

   > While the MLIR textual form provides a nice inline syntax for function arguments, they are internally represented as “block arguments” to the first block in the region. 

Therefore, I handle this case in a generic way with `mlir.regionArgNames`.

Also, following your suggestion around the how AsmOpInterface behaves, I added a test case where I set names that would explicitly clash with an contradict default anonymous names (e.g. `%arg0`, `%cst_1`, `%1`, etc).  

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


More information about the Mlir-commits mailing list