[llvm] [StructuralHash] Refactor (PR #112621)
Kyungwoo Lee via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 18:23:47 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);
----------------
kyulee-com wrote:
I updated the code to compute the values once during the construction of the StructuralHashImpl instance. I believe this is a reasonable trade-off for improved readability while minimizing performance penalties.
https://github.com/llvm/llvm-project/pull/112621
More information about the llvm-commits
mailing list