mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-12 22:30:12 +00:00
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
This commit is contained in:
parent
f04d589b26
commit
ba3fe48d48
@ -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();
|
||||
|
@ -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)) {
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user