From 5a5ac124e1efaf208671f01c46edb15f29ed2a0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 27 May 2015 18:44:32 +0000 Subject: Vendor import of llvm trunk r238337: https://llvm.org/svn/llvm-project/llvm/trunk@238337 --- lib/Support/StringMap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Support/StringMap.cpp') diff --git a/lib/Support/StringMap.cpp b/lib/Support/StringMap.cpp index ddb73494ff5d8..7be946642d907 100644 --- a/lib/Support/StringMap.cpp +++ b/lib/Support/StringMap.cpp @@ -188,9 +188,10 @@ unsigned StringMapImpl::RehashTable(unsigned BucketNo) { // If the hash table is now more than 3/4 full, or if fewer than 1/8 of // the buckets are empty (meaning that many are filled with tombstones), // grow/rehash the table. - if (NumItems*4 > NumBuckets*3) { + if (LLVM_UNLIKELY(NumItems * 4 > NumBuckets * 3)) { NewSize = NumBuckets*2; - } else if (NumBuckets-(NumItems+NumTombstones) <= NumBuckets/8) { + } else if (LLVM_UNLIKELY(NumBuckets - (NumItems + NumTombstones) <= + NumBuckets / 8)) { NewSize = NumBuckets; } else { return BucketNo; -- cgit v1.2.3