From 99c6cf60f136b3f24fc407866094001cd069fc77 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 15 Feb 2007 22:52:10 +0000 Subject: convert more vectors to smallvectors, 2.8% speedup llvm-svn: 34333 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp') diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 1ef5d2a7a48..a2011f5511a 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3411,7 +3411,7 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { /// CollectBSwapParts - Look to see if the specified value defines a single byte /// in the result. If it does, and if the specified byte hasn't been filled in /// yet, fill it in and return false. -static bool CollectBSwapParts(Value *V, std::vector &ByteValues) { +static bool CollectBSwapParts(Value *V, SmallVector &ByteValues) { Instruction *I = dyn_cast(V); if (I == 0) return true; @@ -3495,7 +3495,7 @@ Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) { /// ByteValues - For each byte of the result, we keep track of which value /// defines each byte. - std::vector ByteValues; + SmallVector ByteValues; ByteValues.resize(TD->getTypeSize(I.getType())); // Try to find all the pieces corresponding to the bswap. @@ -5791,7 +5791,7 @@ Instruction *InstCombiner::PromoteCastOfAllocation(CastInst &CI, // Remove any uses of AI that are dead. assert(!CI.use_empty() && "Dead instructions should be removed earlier!"); - std::vector DeadUsers; + for (Value::use_iterator UI = AI.use_begin(), E = AI.use_end(); UI != E; ) { Instruction *User = cast(*UI++); if (isInstructionTriviallyDead(User)) { -- cgit v1.2.3