aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-15 22:52:10 +0000
committerChris Lattner <sabre@nondot.org>2007-02-15 22:52:10 +0000
commit535014f8eceb62d509afe3363966c409bd8ba983 (patch)
tree1caadb346f55504fe6f53c6e31d9b76d228b256d
parent72588fc3f4562cf3230cb419f16ce831effa6a4a (diff)
convert more vectors to smallvectors, 2.8% speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34333 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 1ef5d2a7a4..a2011f5511 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/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<Value*> &ByteValues) {
+static bool CollectBSwapParts(Value *V, SmallVector<Value*, 8> &ByteValues) {
Instruction *I = dyn_cast<Instruction>(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<Value*> ByteValues;
+ SmallVector<Value*, 8> 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<Instruction*> DeadUsers;
+
for (Value::use_iterator UI = AI.use_begin(), E = AI.use_end(); UI != E; ) {
Instruction *User = cast<Instruction>(*UI++);
if (isInstructionTriviallyDead(User)) {