A splat attribute have a single element during printing so we should
treat it as such when we decide if we elide it or not based on the flag
intended to elide large attributes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/IR/AsmPrinter.cpp | ||
---|---|---|
162 | I think this expression isn't the most straightforward way to express the logic here, in general ternary aren't great but as subexpression it is rarely a good idea IMO. I rather read something like this: return attr.isa<SplatElementsAttr>() || (elementsAttrElementLimit.hasValue() && *elementsAttrElementLimit < int64_t(attr.getNumElements())); |
I think this expression isn't the most straightforward way to express the logic here, in general ternary aren't great but as subexpression it is rarely a good idea IMO. I rather read something like this: