Follow-up to D123774, where the syntax of dense arrays was discussed. It
was included that the syntax should be changed to array<i32: 1, 2>.
This patch changes the syntax but importantly preserves the [1, 2]
syntax when embedding these attributes in assembly formats through ODS.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for this cleanup!
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
179–181 | Borderline between dropping : when empty, but consistency in printing parsing pushed towards what you did. |
mlir/include/mlir/IR/BuiltinAttributes.td | ||
---|---|---|
179–181 | Yes, this looks weird. I honestly prefer array<1, 2, 3> : i8 but that requires parsing ahead... |
Awesome, thank you for pushing this forward. What do y'all think about changing the empty syntax to just array<i8>? It looks weird to have the colon there in the empty case.
mlir/test/IR/attribute.mlir | ||
---|---|---|
538 | What do y'all think about changing the empty syntax to just array<i8>? It looks weird to have the colon there in the empty case. |
A Space instead of the colon LGTM assuming we won’t have any kind of ambiguity (I don’t think so but …)
Borderline between dropping : when empty, but consistency in printing parsing pushed towards what you did.