[PATCH] D155781: [Support] Change StringMap hash function from xxHash64 to xxh3_64bits
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 22 16:51:02 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf6cce566b3d0: [Support] Change StringMap hash function from xxHash64 to xxh3_64bits (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155781/new/
https://reviews.llvm.org/D155781
Files:
llvm/lib/Support/StringMap.cpp
llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
Index: llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
===================================================================
--- llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
+++ llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s
@@ -1,4 +1,4 @@
-# UNSUPPORTED: reverse_iteration
+# REQUIRES: reverse_iteration
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=armv7s-apple-ios7.0.0 -filetype=obj -o %t/foo.o %s
# RUN: llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=%s %t/foo.o
Index: llvm/lib/Support/StringMap.cpp
===================================================================
--- llvm/lib/Support/StringMap.cpp
+++ llvm/lib/Support/StringMap.cpp
@@ -85,7 +85,7 @@
// Hash table unallocated so far?
if (NumBuckets == 0)
init(16);
- unsigned FullHashValue = xxHash64(Name);
+ unsigned FullHashValue = xxh3_64bits(Name);
if (shouldReverseIterate())
FullHashValue = ~FullHashValue;
unsigned BucketNo = FullHashValue & (NumBuckets - 1);
@@ -142,7 +142,7 @@
int StringMapImpl::FindKey(StringRef Key) const {
if (NumBuckets == 0)
return -1; // Really empty table?
- unsigned FullHashValue = xxHash64(Key);
+ unsigned FullHashValue = xxh3_64bits(Key);
if (shouldReverseIterate())
FullHashValue = ~FullHashValue;
unsigned BucketNo = FullHashValue & (NumBuckets - 1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155781.543236.patch
Type: text/x-patch
Size: 1393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230722/3237423b/attachment-0001.bin>
More information about the llvm-commits
mailing list