[Mlir-commits] [mlir] [mlir][IR][NFC] Simplify "splat" handling in `DenseIntOrFPElementsAttr` (PR #180965)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Feb 11 08:23:52 PST 2026
================
@@ -226,15 +196,15 @@ struct DenseStringElementsAttrStorage : public DenseElementsAttributeStorage {
ArrayRef<StringRef> copy, data = key.data;
if (data.empty()) {
return new (allocator.allocate<DenseStringElementsAttrStorage>())
- DenseStringElementsAttrStorage(key.type, copy, key.isSplat);
+ DenseStringElementsAttrStorage(key.type, copy);
}
- int numEntries = key.isSplat ? 1 : data.size();
+ size_t numEntries = data.size();
// Compute the amount data needed to store the ArrayRef and StringRef
// contents.
size_t dataSize = sizeof(StringRef) * numEntries;
- for (int i = 0; i < numEntries; i++)
+ for (size_t i = 0; i < numEntries; i++)
----------------
kuhar wrote:
pre-existing nit: this and below should do pre-increment
https://github.com/llvm/llvm-project/pull/180965
More information about the Mlir-commits
mailing list