[llvm] [ADT] Fix a comment typo in SmallPtrSet (NFC) (PR #152565)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 11:10:37 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/152565

In the large mode, SmallPtrSet uses quadratic probing with ProbeAmt++
just like DenseMap.


>From 5d95342efeb24dc258831fc868d6c5dfbe3b9ef5 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 7 Aug 2025 10:28:53 -0700
Subject: [PATCH] [ADT] Fix a comment typo in SmallPtrSet (NFC)

In the large mode, SmallPtrSet uses quadratic probing with ProbeAmt++
just like DenseMap.
---
 llvm/include/llvm/ADT/SmallPtrSet.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h
index 892040ef4cab1..d49ef1d4fbc57 100644
--- a/llvm/include/llvm/ADT/SmallPtrSet.h
+++ b/llvm/include/llvm/ADT/SmallPtrSet.h
@@ -46,7 +46,7 @@ namespace llvm {
 /// sets are often small.  In this case, no memory allocation is used, and only
 /// light-weight and cache-efficient scanning is used.
 ///
-/// Large sets use a classic exponentially-probed hash table.  Empty buckets are
+/// Large sets use a classic quadratically-probed hash table.  Empty buckets are
 /// represented with an illegal pointer value (-1) to allow null pointers to be
 /// inserted.  Tombstones are represented with another illegal pointer value
 /// (-2), to allow deletion.  The hash table is resized when the table is 3/4 or



More information about the llvm-commits mailing list