[Mlir-commits] [mlir] [mlir] Add OpAsmTypeInterface for pretty-print (PR #121187)
Hongren Zheng
llvmlistbot at llvm.org
Mon Jan 13 09:40:25 PST 2025
ZenithalHourlyRate wrote:
> Could I make one request? Would you also add an Attribute companion interface for this as well?
Yes, this is listed in the plan of the [OpAsm/AttrInterface RFC](https://discourse.llvm.org/t/rfc-introduce-opasm-type-attr-interface-for-pretty-print-in-asmprinter/83792).
> Can you split this into a different PR? It'd be nice to add the TypeInterface by itself before using it for value names.
>
> I also think it'd be better to move this new "default" behavior to the OpAsmPrinter file, not the interface here.
Will do so.
> Can you instead follow the same API pattern as the getAlias function on OpAsmDialectInterface?
I am thinking of two APIs for TypeAsmInterface.
```cpp
struct OpAsmTypeInterface {
void getAsmName(OpAsmSetNameFn);
AliasResult getAlias(raw_ostream &os);
};
```
For different purposes I think we should use different API pattern
https://github.com/llvm/llvm-project/pull/121187
More information about the Mlir-commits
mailing list