Print non-default attribute types in optional attr dictionary
In optional attribute dictionary used, among others, in the generic form of the ops, attribute types for integers and floats are omitted. This could lead to inconsistencies when round-tripping the IR, in particular the attributes are created with incorrect types after parsing (integers default to i64, floats default to f64). Provide API to emit a trailing type after the attribute for integers and floats. Use it while printing the optional attribute dictionary. Omitting types for i64 and f64 is a pragmatic decision that minimizes changes in tests. We may want to reconsider in the future and always print types of attributes in the generic form. PiperOrigin-RevId: 232480116
Loading
Please sign in to comment