summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-15 04:03:01 +0000
committerChris Lattner <sabre@nondot.org>2008-08-15 04:03:01 +0000
commit2806dffc7353ac28f4d5c18c020962f5c6efd601 (patch)
treefb525e8f3527bf9c6e3e6655baecf13966573bbb /lib/Transforms
parentbbf55832831482a73fa59fcd1746f9272e82a144 (diff)
downloadllvm-2806dffc7353ac28f4d5c18c020962f5c6efd601.tar.gz
llvm-2806dffc7353ac28f4d5c18c020962f5c6efd601.tar.bz2
llvm-2806dffc7353ac28f4d5c18c020962f5c6efd601.tar.xz
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 74b88b9afc..9e0a8e736a 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -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()) {