use smallvector instead of vector for a couple worklists. This speeds up instcombine
by ~10% on some testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54811 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 74b88b9..9e0a8e7 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -74,7 +74,7 @@
: 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 @@
SmallPtrSet<BasicBlock*, 64> &Visited,
InstCombiner &IC,
const TargetData *TD) {
- std::vector<BasicBlock*> Worklist;
+ SmallVector<BasicBlock*, 256> Worklist;
Worklist.push_back(BB);
while (!Worklist.empty()) {