llvm.org GIT mirror llvm / ba3fe48
Rename DenseMap::resize() into DenseMap::reserve() (NFC) This is more coherent with usual containers. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264026 91177308-0d34-0410-b5e6-96231b3b80d8 Mehdi Amini 4 years ago
3 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8383 /// Grow the densemap so that it can contain at least Size items before
8484 /// resizing again. This means somewhat more than Size buckets because
8585 /// densemap resizes upon reaching 3/4 full.
86 void resize(size_type Size) {
86 void reserve(size_type Size) {
8787 // Size *= (4/3), rounding up.
8888 Size = (Size * 4 + 2) / 3;
8989 incrementEpoch();
6363 void AddInitialGroup(ArrayRef List) {
6464 assert(Worklist.empty() && "Worklist must be empty to add initial group");
6565 Worklist.reserve(List.size()+16);
66 WorklistMap.resize(List.size());
66 WorklistMap.reserve(List.size());
6767 DEBUG(dbgs() << "IC: ADDING: " << List.size() << " instrs to worklist\n");
6868 unsigned Idx = 0;
6969 for (Instruction *I : reverse(List)) {
915915 buildGraphFrom(*this, Fn, ReturnedValues, Map, Graph);
916916
917917 DenseMap NodeValueMap;
918 NodeValueMap.resize(Map.size());
918 NodeValueMap.reserve(Map.size());
919919 for (const auto &Pair : Map)
920920 NodeValueMap.insert(std::make_pair(Pair.second, Pair.first));
921921