Retain original identifier names for debugging

Ah, leveraging location information is another good idea. The problem with that is that “preserving names” would break clients of location info :slight_smile:

As an illustrative example, when looking at adding the names to the argAttrs of FuncOps, I had to contend with the verifyTrait (Interfaces/FunctionInterfaces.h#L182-L186), which ensured that attributes meet certain conditions. Since dialects can implement arbitrary trait verification, who knows what could happen with the _ssaName attribute.

While it may be imperfect MLIR officially sanctions installing “other dialect attributes” on ops. Maybe the way to go is to give it something like an “asmprinter” dialect, e.g. naming this “mlir.ssaname” (or somesuch) instead of “_ssaName”. If this doesn’t work with an op, then other dialect attributes won’t either. It could be a good forcing function for people to fix incorrect verifiers.

-Chris