[PATCH] D43856: [WebAssembly] Improve WasmSignatureDenseMapInfo.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 28 09:35:31 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL326336: [WebAssembly] Improve WasmSignatureDenseMapInfo. (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43856?vs=136222&id=136312#toc
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D43856
Files:
lld/trunk/wasm/Writer.cpp
Index: lld/trunk/wasm/Writer.cpp
===================================================================
--- lld/trunk/wasm/Writer.cpp
+++ lld/trunk/wasm/Writer.cpp
@@ -53,11 +53,10 @@
return Sig;
}
static unsigned getHashValue(const WasmSignature &Sig) {
- uintptr_t Value = 0;
- Value += DenseMapInfo<int32_t>::getHashValue(Sig.ReturnType);
+ unsigned H = hash_value(Sig.ReturnType);
for (int32_t Param : Sig.ParamTypes)
- Value += DenseMapInfo<int32_t>::getHashValue(Param);
- return Value;
+ H = hash_combine(H, Param);
+ return H;
}
static bool isEqual(const WasmSignature &LHS, const WasmSignature &RHS) {
return LHS == RHS;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43856.136312.patch
Type: text/x-patch
Size: 679 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/0b4cdd85/attachment.bin>
More information about the llvm-commits
mailing list