[llvm] [ADT] Add computeNumBuckets to DenseMap (NFC) (PR #168301)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 16:41:47 PST 2025
================
@@ -1106,10 +1112,14 @@ class SmallDenseMap
new (getLargeRep()) LargeRep{nullptr, 0};
}
- void grow(unsigned AtLeast) {
- if (AtLeast > InlineBuckets)
- AtLeast = std::max<unsigned>(64, NextPowerOf2(AtLeast - 1));
+ static unsigned computeNumBuckets(unsigned NumBuckets) {
----------------
s-barannikov wrote:
The name is confusing a bit. (What does it compute if NumBuckets is already the input to the function?)
https://github.com/llvm/llvm-project/pull/168301
More information about the llvm-commits
mailing list