forked from OSchip/llvm-project
InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing.
llvm-svn: 127089
This commit is contained in:
parent
4d050b6f85
commit
08c913b6e6
|
@ -53,6 +53,7 @@ public:
|
|||
void AddInitialGroup(Instruction *const *List, unsigned NumEntries) {
|
||||
assert(Worklist.empty() && "Worklist must be empty to add initial group");
|
||||
Worklist.reserve(NumEntries+16);
|
||||
WorklistMap.resize(NumEntries);
|
||||
DEBUG(errs() << "IC: ADDING: " << NumEntries << " instrs to worklist\n");
|
||||
for (; NumEntries; --NumEntries) {
|
||||
Instruction *I = List[NumEntries-1];
|
||||
|
|
Loading…
Reference in New Issue