Rename DenseMap::resize() into DenseMap::reserve() (NFC)

This is more coherent with usual containers.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264026
This commit is contained in:
Mehdi Amini 2016-03-22 07:20:00 +00:00
parent 7e2c82da90
commit c04fc7a60f
3 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ public:
/// Grow the densemap so that it can contain at least Size items before
/// resizing again. This means somewhat more than Size buckets because
/// densemap resizes upon reaching 3/4 full.
void resize(size_type Size) {
void reserve(size_type Size) {
// Size *= (4/3), rounding up.
Size = (Size * 4 + 2) / 3;
incrementEpoch();

View File

@ -64,7 +64,7 @@ public:
void AddInitialGroup(ArrayRef<Instruction *> List) {
assert(Worklist.empty() && "Worklist must be empty to add initial group");
Worklist.reserve(List.size()+16);
WorklistMap.resize(List.size());
WorklistMap.reserve(List.size());
DEBUG(dbgs() << "IC: ADDING: " << List.size() << " instrs to worklist\n");
unsigned Idx = 0;
for (Instruction *I : reverse(List)) {

View File

@ -916,7 +916,7 @@ CFLAAResult::FunctionInfo CFLAAResult::buildSetsFrom(Function *Fn) {
buildGraphFrom(*this, Fn, ReturnedValues, Map, Graph);
DenseMap<GraphT::Node, Value *> NodeValueMap;
NodeValueMap.resize(Map.size());
NodeValueMap.reserve(Map.size());
for (const auto &Pair : Map)
NodeValueMap.insert(std::make_pair(Pair.second, Pair.first));