[PATCH] D40736: [CodeView] Add support for type record content hashing

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 23:12:19 PST 2017


ruiu added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/CodeView/TypeHashing.h:29
+struct LocallyHashedType {
+  hash_code Hash;
+  ArrayRef<uint8_t> RecordData;
----------------
Is this used when an object file doesn't have type record hash values?

If you use 64-bit values as unique keys and want to maintain a probability of collision lower than 10^-9, for example, the maximum number of type records you can have is 190,000, according to [1]. Is this enough?

https://en.wikipedia.org/wiki/Birthday_problem#Probability_table


================
Comment at: llvm/include/llvm/DebugInfo/CodeView/TypeHashing.h:41
+/// global hashes of the types that B refers to), a global hash can uniquely
+/// identify identify that A occurs in another stream that has a completely
+/// different graph structure.  Although the hash itself is slower to compute,
----------------
identify


https://reviews.llvm.org/D40736





More information about the llvm-commits mailing list