aboutsummaryrefslogtreecommitdiff
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
commita53fe6070cae7d2feccb542b8ba24b37d3fdd027 (patch)
tree44a7b9bee3e3560e0600ce2588ec4f57ff44aaa3
parenta4633f5d7458f4d04e4bf89be48d3b14e1fae044 (diff)
SmallVectorize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117213 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/DominatorInternals.h2
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h
index 0419688a53..654289e630 100644
--- a/include/llvm/Analysis/DominatorInternals.h
+++ b/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/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 47519fbaef..de409d1cce 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/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 {