summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-10-23 17:10:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-10-23 17:10:24 +0000
commit76229bc1281ffeb356d2cd9f1021da4b032c883f (patch)
tree18acbc85d397ef092777173315d6d72c12d2eea9 /llvm
parente63d087bcb047c6c7c91076c93a459dd10d49a2a (diff)
downloadbcm5719-llvm-76229bc1281ffeb356d2cd9f1021da4b032c883f.tar.gz
bcm5719-llvm-76229bc1281ffeb356d2cd9f1021da4b032c883f.zip
SmallVectorize.
llvm-svn: 117213
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Analysis/DominatorInternals.h2
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/Analysis/DominatorInternals.h b/llvm/include/llvm/Analysis/DominatorInternals.h
index 0419688a53b..654289e6305 100644
--- a/llvm/include/llvm/Analysis/DominatorInternals.h
+++ b/llvm/include/llvm/Analysis/DominatorInternals.h
@@ -116,7 +116,7 @@ unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
template<class GraphT>
void Compress(DominatorTreeBase<typename GraphT::NodeType>& DT,
typename GraphT::NodeType *VIn) {
- std::vector<typename GraphT::NodeType*> Work;
+ SmallVector<typename GraphT::NodeType*, 32> Work;
SmallPtrSet<typename GraphT::NodeType*, 32> Visited;
typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInVAInfo =
DT.Info[DT.Vertex[DT.Info[VIn].Ancestor]];
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 47519fbaef9..de409d1ccee 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1032,10 +1032,8 @@ static bool AddReachableCodeToWorklist(BasicBlock *BB,
bool MadeIRChange = false;
SmallVector<BasicBlock*, 256> Worklist;
Worklist.push_back(BB);
-
- std::vector<Instruction*> InstrsForInstCombineWorklist;
- InstrsForInstCombineWorklist.reserve(128);
+ SmallVector<Instruction*, 128> InstrsForInstCombineWorklist;
SmallPtrSet<ConstantExpr*, 64> FoldedConstants;
do {
OpenPOWER on IntegriCloud