[llvm] [ADT] Add computeNumBuckets to DenseMap (NFC) (PR #168301)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 16:44:54 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:
Maybe rename the parameter to MinNumBuckets (or to AtLeast, the original name, not sure which one conveys the intent clearer)?
https://github.com/llvm/llvm-project/pull/168301
More information about the llvm-commits
mailing list