[mlir] Cleanup DenseArrayAttrBase definition and expose raw API
authorJeff Niu <jeff@modular.com>
Mon, 8 Aug 2022 22:04:05 +0000 (18:04 -0400)
committerJeff Niu <jeff@modular.com>
Tue, 9 Aug 2022 19:43:45 +0000 (15:43 -0400)
commitf20147651822b7e41d6b07e17a4b160452bdd044
treee6d1aa89753dc89cf890e9f6ee865d2427cadf47
parent3edd8978c3129d15e364abb3632a0db478891415
[mlir] Cleanup DenseArrayAttrBase definition and expose raw API

This patch cleans up the definition of `DenseArrayAttrBase` by relying
more on ODS-generated methods. It also exposes an API for using the raw
data of a dense array, similar to `DenseIntOrFPElementsAttr::getRaw`.

Reviewed By: lattner, mehdi_amini

Differential Revision: https://reviews.llvm.org/D131450
mlir/include/mlir/IR/BuiltinAttributes.td
mlir/lib/IR/BuiltinAttributes.cpp