aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorKyungwoo Lee <kyulee@meta.com>2024-08-23 21:53:43 -0700
committerGitHub <noreply@github.com>2024-08-23 21:53:43 -0700
commit7615c0b2eb52b8c5d8e6dfc7f265a87a7a9f3ef5 (patch)
tree5502af8dfa26ed1f4744a0ec5a8c8ffc1d6187db /llvm/lib/CodeGen/MachineOperand.cpp
parentd02132166a6ce56d54d6c8b2ca39e81b6466eb55 (diff)
downloadllvm-7615c0b2eb52b8c5d8e6dfc7f265a87a7a9f3ef5.zip
llvm-7615c0b2eb52b8c5d8e6dfc7f265a87a7a9f3ef5.tar.gz
llvm-7615c0b2eb52b8c5d8e6dfc7f265a87a7a9f3ef5.tar.bz2
[StableHash] Implement with xxh3_64bits (#105849)
This is a follow-up to address a suggestion from https://github.com/llvm/llvm-project/pull/105619. The main goal of this change is to efficiently implement stable hash functions using the xxh3 64bits API. `stable_hash_combine_range` and `stable_hash_combine_array` functions are removed and consolidated into a more general `stable_hash_combine` function that takes an `ArrayRef<stable_hash>` as input.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index ace0590..a0726ca 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -424,8 +424,7 @@ hash_code llvm::hash_value(const MachineOperand &MO) {
const uint32_t *RegMask = MO.getRegMask();
std::vector<stable_hash> RegMaskHashes(RegMask, RegMask + RegMaskSize);
return hash_combine(MO.getType(), MO.getTargetFlags(),
- stable_hash_combine_array(RegMaskHashes.data(),
- RegMaskHashes.size()));
+ stable_hash_combine(RegMaskHashes));
}
assert(0 && "MachineOperand not associated with any MachineFunction");