[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Thu Feb 15 14:52:27 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.635 -> 1.636
---
Log message:

convert more vectors to smallvectors, 2.8% speedup


---
Diffs of the changes:  (+3 -3)

 InstructionCombining.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.635 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.636
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.635	Thu Feb 15 16:48:32 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu Feb 15 16:52:10 2007
@@ -3411,7 +3411,7 @@
 /// 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 @@
   
   /// 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 @@
   
   // 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)) {






More information about the llvm-commits mailing list