[PATCH] D18345: Fix DenseMap::reserve(): the formula was wrong
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 02:01:14 PDT 2016
joker.eph created this revision.
joker.eph added a reviewer: dblaikie.
joker.eph added a subscriber: llvm-commits.
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).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4935 bytes
Desc: not available
More information about the llvm-commits