This revision is a work in progress commit that tries
to use the alias printing mechanism to number the
distinct attribute during printing. It therefore
tries to enforce that distinct attributes are always
printed as aliases.
There are two main cases to handle
- Ignore the -mlir-print-local-scope flag
- Print aliases even if the user dumps a non top-level operation.
Dumping a non top-level operation looks as follows:
#distinct = distinct<42 : i32>
%0 = test.my_op { distinct_attr = #distinct }
Depends on D153360