[mlir] Change the syntax of dense arrays
authorJeff Niu <jeff@modular.com>
Thu, 11 Aug 2022 23:05:48 +0000 (19:05 -0400)
committerJeff Niu <jeff@modular.com>
Fri, 12 Aug 2022 00:56:42 +0000 (20:56 -0400)
commit2092d1438c36606d82df20fd36f16de033d31147
tree93c223607bf0e7446d32eaf82c5f706c8a19a35e
parent5e22ef3198d1686f7978dd150a3eefad4f737bfc
[mlir] Change the syntax of dense arrays

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.

Reviewed By: mehdi_amini, jpienaar

Differential Revision: https://reviews.llvm.org/D131738
mlir/include/mlir/IR/BuiltinAttributes.td
mlir/lib/AsmParser/AttributeParser.cpp
mlir/lib/AsmParser/Parser.h
mlir/lib/AsmParser/TokenKinds.def
mlir/lib/IR/AsmPrinter.cpp
mlir/test/Dialect/LLVMIR/dynamic-gep-index.mlir
mlir/test/Dialect/LLVMIR/invalid.mlir
mlir/test/IR/attribute.mlir
mlir/test/IR/elements-attr-interface.mlir