summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit1d23915a8fbcbe122f70c7036096be4a5939319c (patch)
tree1b6f2411835b44903ae1edec9774a481c2728435 /llvm/lib
parent14738120ba2f18f0250eccacdb83b77d0848c582 (diff)
downloadbcm5719-llvm-1d23915a8fbcbe122f70c7036096be4a5939319c.tar.gz
bcm5719-llvm-1d23915a8fbcbe122f70c7036096be4a5939319c.zip
use smallvector instead of vector for a couple worklists. This speeds up instcombine
by ~10% on some testcases. llvm-svn: 54811
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 74b88b9afc6..9e0a8e736a8 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud