Added support for sparse strings elements. This is a follow up from the original DenseStringElements.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
You also need to add a SparseElementsAttr::getZeroValue<StringRef> so that getValues<T> works:
https://github.com/llvm/llvm-project/blob/5339029ff79c0b6a501ef6bb7baeb07cb099f0b7/mlir/include/mlir/IR/Attributes.h#L1257
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
1491 | Use cast here as it is guaranteed to be DenseIntOrFPElementsAttr, dyn_cast implies that it may return null. |
mlir/include/mlir/IR/Attributes.h | ||
---|---|---|
1255 | You can just inline this in the getZeroValue<StringRef> below. The other methods are only defined like this because the values can't be constructed inline in the header file. | |
1279 | This needs to be a SFINAE template to avoid having ambiguous methods. | |
1285 | nit: Newline before here. |
You can just inline this in the getZeroValue<StringRef> below. The other methods are only defined like this because the values can't be constructed inline in the header file.