diff options
author | Jeff Niu <jeff@modular.com> | 2022-08-25 16:21:28 -0700 |
---|---|---|
committer | Jeff Niu <jeff@modular.com> | 2022-08-30 13:29:24 -0700 |
commit | cec7e80ebd5dafc20974f2554db1b2eb0e2175b7 (patch) | |
tree | 9dd0e734b0caf0715f370537b9520cc6c59b197e /clang/lib/Lex/ModuleMap.cpp | |
parent | 039b969b32b64b64123dce30dd28ec4e343d893f (diff) | |
download | llvm-cec7e80ebd5dafc20974f2554db1b2eb0e2175b7.zip llvm-cec7e80ebd5dafc20974f2554db1b2eb0e2175b7.tar.gz llvm-cec7e80ebd5dafc20974f2554db1b2eb0e2175b7.tar.bz2 |
[mlir] Make DenseArrayAttr generic
This patch turns `DenseArrayBaseAttr` into a fully-functional attribute by
adding a generic parser and printer, supporting bool or integer and floating
point element types with bitwidths divisible by 8. It has been renamed
to `DenseArrayAttr`. The patch maintains the specialized subclasses,
e.g. `DenseI32ArrayAttr`, which remain the preferred API for accessing
elements in C++.
This allows `DenseArrayAttr` to hold signed and unsigned integer elements:
```
array<si8: -128, 127>
array<ui8: 255>
```
"Exotic" floating point elements:
```
array<bf16: 1.2, 3.4>
```
And integers of other bitwidths:
```
array<i24: 8388607>
```
Reviewed By: rriddle, lattner
Differential Revision: https://reviews.llvm.org/D132758
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions