diff --git a/llvm/include/llvm/ProfileData/SampleProf.h b/llvm/include/llvm/ProfileData/SampleProf.h --- a/llvm/include/llvm/ProfileData/SampleProf.h +++ b/llvm/include/llvm/ProfileData/SampleProf.h @@ -1299,19 +1299,13 @@ /// performance of insert and query operations especially when hash values of /// keys are available a priori, and reduces memory usage if KeyT has a large /// size. -/// When performing any action, if an existing entry with a given key is found, -/// and the interface "KeyT ValueT::getKey() const" to retrieve a value's -/// original key exists, this class checks if the given key actually matches -/// the existing entry's original key. If they do not match, this class behaves -/// as if the entry did not exist (for insertion, this means the new value will -/// replace the existing entry's value, as if it is newly inserted). If -/// ValueT::getKey() is not available, all keys with the same hash value -/// are considered equivalent (i.e. hash collision is silently ignored). Given -/// such feature this class should only be used where it does not affect -/// compilation correctness, for example, when loading a sample profile. +/// All keys with the same hash value are considered equivalent (i.e. hash +/// collision is silently ignored). Given such feature this class should only be +/// used where it does not affect compilation correctness, for example, when +/// loading a sample profile. /// Assuming the hashing algorithm is uniform, the probability of hash collision /// with 1,000,000 entries is -/// (2^64)!/((2^64-1000000)!*(2^64)^1000000) ~= 3*10^-8. +/// 1 - (2^64)!/((2^64-1000000)!*(2^64)^1000000) ~= 3*10^-8. template