use smallvector instead of vector for a couple worklists. This speeds up instcombine

by ~10% on some testcases.

llvm-svn: 54811
This commit is contained in:
Chris Lattner 2008-08-15 04:03:01 +00:00
parent 14738120ba
commit 1d23915a8f
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ namespace {
: public FunctionPass,
public InstVisitor<InstCombiner, Instruction*> {
// Worklist of all of the instructions that need to be simplified.
std::vector<Instruction*> Worklist;
SmallVector<Instruction*, 256> Worklist;
DenseMap<Instruction*, unsigned> WorklistMap;
TargetData *TD;
bool MustPreserveLCSSA;
@ -11386,7 +11386,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
SmallPtrSet<BasicBlock*, 64> &Visited,
InstCombiner &IC,
const TargetData *TD) {
std::vector<BasicBlock*> Worklist;
SmallVector<BasicBlock*, 256> Worklist;
Worklist.push_back(BB);
while (!Worklist.empty()) {