This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Improve WasmSignatureDenseMapInfo.
ClosedPublic

Authored by ruiu on Feb 27 2018, 7:54 PM.

Details

Summary

Let X and Y be types. Previously, functions F(X, Y) and G(Y, X) had
the same hash value because their hash values are computed as follows:

hash(F) = hash(X) + hash(Y)
hash(G) = hash(Y) + hash(X)

This patch fixes the issue by using hash_combine.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ruiu created this revision.Feb 27 2018, 7:54 PM
ruiu edited the summary of this revision. (Show Details)Feb 27 2018, 7:57 PM
sbc100 accepted this revision.Feb 28 2018, 7:23 AM
This revision is now accepted and ready to land.Feb 28 2018, 7:23 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.