[llvm-commits] [llvm] r127089 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h
Benjamin Kramer
benny.kra at googlemail.com
Sat Mar 5 08:43:46 PST 2011
Author: d0k
Date: Sat Mar 5 10:43:46 2011
New Revision: 127089
URL: http://llvm.org/viewvc/llvm-project?rev=127089&view=rev
Log:
InstCombine: We know the number of items initially added to the worklist map, reserve space early to avoid rehashing.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h?rev=127089&r1=127088&r2=127089&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineWorklist.h Sat Mar 5 10:43:46 2011
@@ -53,6 +53,7 @@
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];
More information about the llvm-commits
mailing list