[Mlir-commits] [flang] [mlir] [mlir] add option to print SSA IDs using `NameLoc`s as prefixes (PR #119996)
Perry Gibson
llvmlistbot at llvm.org
Mon Dec 16 01:57:51 PST 2024
https://github.com/Wheest commented:
Overall this a great way to incrementally bring us closer to some of the goals set out [here](https://discourse.llvm.org/t/retain-original-identifier-names-for-debugging/76417/49).
I see that multiple results are supported, but would it make sense here to support have different names for different results, e.g.:
```mlir
%kevin, %alice = call @make_two_results() : () -> (index, index)
```
Or even a mix of result groups:
```mlir
%kevin:2, %alice = call @make_three_results() : () -> (index, index, index)
```
This was supported in the more invasive #79704.
https://github.com/llvm/llvm-project/blob/b257ab53e508e5fb00e16a1c73e7fceeea4d0923/mlir/test/IR/print-retain-identifiers.mlir#L82-L83
I would imagine the syntax being something like:
```mlir
%kevin, %alice = call @make_two_results() : () -> (index, index) loc("kevin", "alice")
%kevin:2, %alice = call @make_three_results() : () -> (index, index, index) loc("kevin", "", "alice") // empty string means use result group
%kevin, %alice:2 = call @make_three_results() : () -> (index, index, index) loc("kevin", "alice") // implicit grouping
```
https://github.com/llvm/llvm-project/pull/119996
More information about the Mlir-commits
mailing list