[ADT] Remove xxHash64 ArrayRef/StringRef overloads. NFC (#196781)
xxHash64 is a legacy, pre-XXH3 hash whose only non-test caller in the
monorepo is llvm::getKCFITypeID. #196774 accidentally exposed the API.
tests/carp: Rework unicast_v4
For unicast tests, it is sufficient to use wait_for_carp() to verify
the setup is sane. Additional sanity checks are not necessarily
required but can serve purpose for redundancy.
For some unclear reason routed(8) is advertising route to carp BACKUP.
That makes the test flaky. Also routed(8) is marked deprecated and may
be removed from base in the future. Let's just add static route entry
manually for additional sanity checks.
Other noticeable changes:
1. Add atf_check to configuration steps to prevent potential failure
on setup. That helps diagnosing on failure.
2. Shorten the names of jails to improve readability.
3. Prefer `[ifconfig|route|sysctl] -j` over `jexec [ifconfig|route|sysctl]`
to make the lines shorter.
MFC note: At the time writing, routed(8) does not know carp addresses
[11 lines not shown]
tests/carp: make a 0.2 second pause before configuring second jail
for all scenarios where both jails have same priority/advskew. There is a
tiny chance that on both sides carp_master_down() will be executed in
parallel and advertisements will also fly through the bridge(4) in
parallel, thus both sides will switch to MASTER before receiving the
announcement from peer. This makes the test to fail. So far this
flakyness was observed for carp:vrrp_v4 only, but in theory it is possible
for any of the patched scenarios.
Note that this sleep does not prolong execution of the tests, as the first
jail is already configured, and if we slept before configuring the second,
we would sleep less in wait_for_carp().
(cherry picked from commit 27ff90cd3d8d2ac8198f30cbebeefb15a49d41bc)
(cherry picked from commit ad2fff6d6a4d74b6bb9008e447eafc567e8660e0)
[libc] Add barebones dl_iterate_phdr implementation (#194196)
Add a basic dl_iterate_phdr implementation so that we can get libunwind
building. This implementation is bare and not fully compliant with the
man page for fully static binaries (which are all that we support
currently with the lack of a dynamic linker) due to the lack of TLS
info, but that can be added at a future date if it is needed, as it is
not needed by libunwind.
Add some very basic smoke tests.
[MC] Remove deprecated lookupTarget overload (#196778)
This has been deprecated for a while and was slated for removal after
the branching of LLVM 22. Remove it since I'm on on the Google integrate
rotation this week and can take care of any failures on our end.
[Hashing] Replace CityHash mixers with xxh3 (#194567)
Replace the CityHash-style mixer in hash_combine and (transitively)
hash_value(std::basic_string), hash_value(StringRef), and therefore
DenseMap<StringRef, X> lookups, with a flatten-and-call into
xxh3_64bits, a modern hash superior to CityHash.
hash_value(int) / hash_value(ptr) keep the existing Murmur-style
hash_16_bytes mixer; those are the dominant DenseMap key paths and a
fully-inline 16-byte mix beats inlining xxh3's larger 0..16-byte short
path.
To break dependency cycle: xxHash64, xxh3_64bits, and xxh3_128bits
ArrayRef/StringRef overloads move from llvm/Support/xxhash.h to inline
overloads in llvm/ADT/ArrayRef.h and llvm/ADT/StringRef.h, so xxhash.h
has no ADT dependencies.
A variant that inlined xxh3's 0..16-byte fast path at every
combine_bytes call site (vs. always calling out-of-line xxh3_64bits)
[37 lines not shown]
[ADT] Decouple xxhash.h from ADT. NFC (#196774)
Move xxHash64, xxh3_64bits, and xxh3_128bits ArrayRef/StringRef
overloads from llvm/Support/xxhash.h to inline overloads in
llvm/ADT/ArrayRef.h and llvm/ADT/StringRef.h, so xxhash.h has no ADT
dependencies.
This is prerequisite for using xxh3 as the combine_bytes backend in
llvm/ADT/Hashing.h (#194567), which would otherwise reintroduce a header
dependency cycle.
FoldingSet.h and StableHashing.h adjust to call the new
pointer-and-length entry point.
[Clang] Make matrix type trivially copyable (#193634)
In order to simplify matrix casting and follow the existing pattern HLSL
is doing, the matrix needs to be trivially copyable.
related to: https://github.com/llvm/llvm-project/issues/184471
---------
Co-authored-by: Joao Saffran <jderezende at microsoft.com>
[ELF] Fix --reproduce non-determinism with parallel input loading (#196773)
After #191690, LoadJob::Archive runs in parallel and getArchiveMembers()
calls ctx.tar->append() from the parallel body. TarWriter::append is
unsynchronized. Member order in the tar is also non-deterministic
because parallelFor scheduling determines append order.
Buffer per-job tar entries during the parallel pass and flush them in
the
existing serial post-pass, mirroring the thinBufs / files pattern.