[llvm-commits] [vector_llvm] CVS: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp InstructionCombining.cpp LowerConstantExprs.cpp SCCP.cpp

Robert Bocchino bocchino at cs.uiuc.edu
Tue Oct 18 12:22:20 PDT 2005



Changes in directory llvm/lib/Transforms/Scalar:

DeadStoreElimination.cpp updated: 1.12 -> 1.12.4.1
InstructionCombining.cpp updated: 1.388 -> 1.388.2.1
LowerConstantExprs.cpp updated: 1.4 -> 1.4.4.1
SCCP.cpp updated: 1.125 -> 1.125.2.1
---
Log message:

Initial commit of Vector LLVM.


---
Diffs of the changes:  (+9 -2)

 DeadStoreElimination.cpp |    7 ++++++-
 InstructionCombining.cpp |    1 +
 LowerConstantExprs.cpp   |    1 +
 SCCP.cpp                 |    2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)


Index: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
diff -u llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.12 llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.12.4.1
--- llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:1.12	Thu Apr 21 18:45:12 2005
+++ llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp	Tue Oct 18 14:21:57 2005
@@ -16,7 +16,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Transforms/Scalar.h"
-#include "llvm/DerivedTypes.h"
+#include "VectorLLVM/Utils.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/Analysis/AliasAnalysis.h"
@@ -88,6 +88,11 @@
   for (BasicBlock::iterator BBI = BB.end(); BBI != BB.begin(); ) {
     Instruction *I = --BBI;   // Keep moving iterator backwards
 
+    // FIXME:  This is a temporary fix to make vectors work
+    //
+    if (VectorUtils::containsVector(I))
+      continue;
+
     // If this is a free instruction, it makes the free'd location dead!
     if (FreeInst *FI = dyn_cast<FreeInst>(I)) {
       // Free instructions make any stores to the free'd location dead.


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.388 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.388.2.1
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.388	Mon Oct 17 15:18:38 2005
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Tue Oct 18 14:21:57 2005
@@ -3343,6 +3343,7 @@
 }
 
 Instruction *InstCombiner::visitShiftInst(ShiftInst &I) {
+  if (isa<VectorType>(I.getType())) return 0;
   assert(I.getOperand(1)->getType() == Type::UByteTy);
   Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
   bool isLeftShift = I.getOpcode() == Instruction::Shl;


Index: llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp
diff -u llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp:1.4 llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp:1.4.4.1
--- llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp:1.4	Thu Apr 21 18:45:12 2005
+++ llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp	Tue Oct 18 14:21:57 2005
@@ -163,6 +163,7 @@
 
 
 namespace llvm {
+  const PassInfo *llvm::LowerConstantExpressionsID = X.getPassInfo();
     FunctionPass* createLowerConstantExpressionsPass()
     {
         return new ConstantExpressionsLower;


Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.125 llvm/lib/Transforms/Scalar/SCCP.cpp:1.125.2.1
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.125	Mon Sep 26 00:28:52 2005
+++ llvm/lib/Transforms/Scalar/SCCP.cpp	Tue Oct 18 14:21:57 2005
@@ -342,7 +342,7 @@
 
   void visitInstruction(Instruction &I) {
     // If a new instruction is added to LLVM that we don't handle...
-    std::cerr << "SCCP: Don't know how to handle: " << I;
+    DEBUG(std::cerr << "SCCP: Don't know how to handle: " << I);
     markOverdefined(&I);   // Just in case
   }
 };






More information about the llvm-commits mailing list