llvm-project
74991888 - [CodeGen,IRNormalizer,BOLT] Duplicate stable hash_16_bytes locally. NFC (#196854)

Commit
69 days ago
[CodeGen,IRNormalizer,BOLT] Duplicate stable hash_16_bytes locally. NFC (#196854) llvm/ADT/Hashing.h doesn't guarantee cross-process stability. llvm/ADT/StableHashing.h provides stability for a specific compiler version. They reserve the right the right to adjust the implementation as the compiler evolves. Some callers of hashing::detail::hash_16_bytes rely on hash output embedded in persisted artifacts: * MachineBlockHashInfo serializes block hashes into BB section profile data and pins the mixer's exact output with a static_assert. * BOLT's stale profile matching records block hashes in its on-disk profile format and replays them against potentially-rebuilt binaries (possibly built from a later LLVM revision). * IRNormalizer derives basic-block names from the hash; the names land in the normalized IR text used to diff modules. Move the implementation into each caller as a file-local static constexpr helper with a comment documenting why it is frozen.
Author
Parents
Loading