[llvm] [StructuralHash] Refactor (PR #112621)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 18:00:15 PDT 2024
================
@@ -121,14 +148,17 @@ class StructuralHashImpl {
// This random value acts as a block header, as otherwise the partition of
// opcodes into BBs wouldn't affect the hash, only the order of the
// opcodes
- hash(45798);
+ Hashes.emplace_back(45798);
----------------
boomanaiden154 wrote:
`stable_hash_name` is not `constexpr`, so might impose a reasonable runtime performance penalty if the optimizer isn't able to optimize everything and constant fold it all (which seems like it could be unlikely).
I would still prefer moving the values to named constants, unless there's some other reason I'm missing to do it this way.
https://github.com/llvm/llvm-project/pull/112621
More information about the llvm-commits
mailing list