[Support] change StringMap hash function from djbHash to xxHash
authorErik Desjardins <erikdesjardinspublic@gmail.com>
Sun, 29 Jan 2023 21:31:00 +0000 (16:31 -0500)
committerErik Desjardins <erikdesjardinspublic@gmail.com>
Wed, 8 Feb 2023 03:55:41 +0000 (22:55 -0500)
commitd768b97424f9e1a0aae45440a18b99f21c4027ce
treeb1121622f62cd8b3dd85df5557d39f9c4d02bc59
parent96aaebd12e734610fe0ef61329f99fdac253ef9f
[Support] change StringMap hash function from djbHash to xxHash

Depends on https://reviews.llvm.org/D142861.

Alternative to https://reviews.llvm.org/D137601.

xxHash is much faster than djbHash. This makes a simple Rust test case with a large constant string 10% faster to compile.

Previous attempts at changing this hash function (e.g. https://reviews.llvm.org/D97396) had to be reverted due to breaking tests that depended on iteration order.
No additional tests fail with this patch compared to `main` when running `check-all` with `-DLLVM_ENABLE_PROJECTS="all"` (on a Linux host), so I hope I found everything that needs to be changed.

Differential Revision: https://reviews.llvm.org/D142862
13 files changed:
clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize
clang/unittests/Basic/SarifTest.cpp
compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c
lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
llvm/lib/Support/StringMap.cpp
llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll
llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
llvm/test/DebugInfo/X86/gnu-public-names.ll
llvm/test/tools/dsymutil/ARM/extern-alias.test
llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test
mlir/test/mlir-lsp-server/completion.test