[llvm] d252365 - [IR] Modernize StructuralHashImpl (NFC) (#105951)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 24 10:53:32 PDT 2024
Author: Kazu Hirata
Date: 2024-08-24T10:53:28-07:00
New Revision: d252365a272b702e32220038f5fdad7e511dbf58
URL: https://github.com/llvm/llvm-project/commit/d252365a272b702e32220038f5fdad7e511dbf58
DIFF: https://github.com/llvm/llvm-project/commit/d252365a272b702e32220038f5fdad7e511dbf58.diff
LOG: [IR] Modernize StructuralHashImpl (NFC) (#105951)
Added:
Modified:
llvm/lib/IR/StructuralHash.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/StructuralHash.cpp b/llvm/lib/IR/StructuralHash.cpp
index b6de1ed725d7d4..fb4f33a021a96b 100644
--- a/llvm/lib/IR/StructuralHash.cpp
+++ b/llvm/lib/IR/StructuralHash.cpp
@@ -24,7 +24,7 @@ namespace {
// by the MergeFunctions pass.
class StructuralHashImpl {
- uint64_t Hash;
+ uint64_t Hash = 4;
void hash(uint64_t V) { Hash = hashing::detail::hash_16_bytes(Hash, V); }
@@ -43,7 +43,7 @@ class StructuralHashImpl {
}
public:
- StructuralHashImpl() : Hash(4) {}
+ StructuralHashImpl() = default;
void updateOperand(Value *Operand) {
hashType(Operand->getType());
More information about the llvm-commits
mailing list