Details
- Reviewers
- None
Diff Detail
Event Timeline
I'm concerned about propagating this pattern. DenseSet, like DenseMap, is tuned for small keys and values. SmallVector<void*,4> is not exactly small, at 48B. And this patch makes it easy to throw much larger SmallVectors into these containers.
I wonder, could these be replaced by TinyPtrVector? They're only 8B.
Agreed, having this generally available makes it more likely to be misused unfortunately. If we end up going with SmallVector, we should definitely limit the number of elements.
I wonder, could these be replaced by TinyPtrVector? They're only 8B.
Interesting, I'll have a look. My only worry with this is that in the LSR and SLP use cases, it is very likely that the vector contains more than 1 element.
Thanks for the comments. For now, I added a custom DenseMapInfo to D49491, but I hope I can revisit this once I have more time!