mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49d443053b
commit
103391d639
@ -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
Block a user