llvm/unittests
Mehdi Amini 9ed5a8271e Fix DenseMap::reserve(): the formula was wrong
Summary:
Just running the loop in the unittests for a few more iterations
(till 48) exhibit that the condition on the limit was not handled
properly in r263522.
Rewrite the test to use a class to count move/copies that happens
when inserting into the map.
Also take the opportunity to refactor the logic to compute the
number of buckets required for a given number of entries in the map.
Use this when constructing a DenseMap with a desired size given to
the constructor (and add a tests for this).

Reviewers: dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D18345

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-25 05:57:52 +00:00
..
ADT Fix DenseMap::reserve(): the formula was wrong 2016-03-25 05:57:52 +00:00
Analysis Add getBlockProfileCount method to BlockFrequencyInfo 2016-03-23 18:18:26 +00:00
AsmParser [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00
Bitcode Remove autoconf support 2016-01-26 21:29:08 +00:00
CodeGen Remove autoconf support 2016-01-26 21:29:08 +00:00
DebugInfo [DebugInfoPDB] Add source / line number accessors for PDB. 2016-02-18 18:47:29 +00:00
ExecutionEngine [Orc] Switch RPC Procedure to take a function type, rather than an arg list. 2016-03-21 16:56:25 +00:00
IR Remove some unused variables 2016-03-13 22:00:18 +00:00
LineEditor Remove autoconf support 2016-01-26 21:29:08 +00:00
Linker Delete the deprecated LLVMLinkModules. 2016-02-12 15:28:45 +00:00
MC Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
MI Make a stub version of MITests, instead of reverting. 2016-02-18 07:37:17 +00:00
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option Remove autoconf support 2016-01-26 21:29:08 +00:00
ProfileData [unittests] clang-format a line, NFC 2016-03-22 15:14:18 +00:00
Support Try to fix ODR violation of ErrorInfo::ID 2016-03-24 23:49:34 +00:00
Transforms Really fix ASAN leak/etc issues with MemorySSA unittests 2016-03-02 21:16:28 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00