[PATCH] D158217: [NFCi][MergeFunctions] Consolidate Hashing Functions
Aiden Grossman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 19 17:17:04 PDT 2023
aidengrossman added a comment.
It looks like `hash_code` stores everything as `size_t` which causes the difference between the 32 bit and 64 bit platforms. The functions end up in different places as `MergeFunctions` ends up ordering them by hash. I've switched the hashing a little bit (mainly using `uint64_t` and switching to `hash_16_bytes` from `hash_combine` to get rid of the `size_t`) so that things are consistent across platforms. I've also updated the magic constant as the function header to prevent any unnecessary churn in the test diffs and I've verified that behavior is consistent between 64 and 32 bit builds now.
Relanded in 64da0be1fc06ee2199bd27c980736986e0eccd9d <https://reviews.llvm.org/rG64da0be1fc06ee2199bd27c980736986e0eccd9d>.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158217/new/
https://reviews.llvm.org/D158217
More information about the llvm-commits
mailing list