From a53fe6070cae7d2feccb542b8ba24b37d3fdd027 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 23 Oct 2010 17:10:24 +0000 Subject: [PATCH] SmallVectorize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117213 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DominatorInternals.h | 2 +- lib/Transforms/InstCombine/InstructionCombining.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h index 0419688a53b..654289e6305 100644 --- a/include/llvm/Analysis/DominatorInternals.h +++ b/include/llvm/Analysis/DominatorInternals.h @@ -116,7 +116,7 @@ unsigned DFSPass(DominatorTreeBase& DT, template void Compress(DominatorTreeBase& DT, typename GraphT::NodeType *VIn) { - std::vector Work; + SmallVector Work; SmallPtrSet Visited; typename DominatorTreeBase::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 47519fbaef9..de409d1ccee 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 Worklist; Worklist.push_back(BB); - - std::vector InstrsForInstCombineWorklist; - InstrsForInstCombineWorklist.reserve(128); + SmallVector InstrsForInstCombineWorklist; SmallPtrSet FoldedConstants; do { -- 2.34.1