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

Reid Spencer reid at x10sys.com
Wed Feb 14 19:40:07 PST 2007



Changes in directory llvm/lib/Transforms/Scalar:

LowerPacked.cpp updated: 1.19 -> 1.20
ScalarReplAggregates.cpp updated: 1.74 -> 1.75
---
Log message:

For PR1195: http://llvm.org/PR1195 :
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


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

 LowerPacked.cpp          |    4 ++--
 ScalarReplAggregates.cpp |   16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)


Index: llvm/lib/Transforms/Scalar/LowerPacked.cpp
diff -u llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.19 llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.20
--- llvm/lib/Transforms/Scalar/LowerPacked.cpp:1.19	Wed Feb 14 21:11:20 2007
+++ llvm/lib/Transforms/Scalar/LowerPacked.cpp	Wed Feb 14 21:39:18 2007
@@ -207,7 +207,7 @@
 
 void LowerPacked::visitLoadInst(LoadInst& LI)
 {
-   // Make sure what we are dealing with is a packed type
+   // Make sure what we are dealing with is a vector type
    if (const VectorType* PKT = dyn_cast<VectorType>(LI.getType())) {
        // Initialization, Idx is needed for getelementptr needed later
        std::vector<Value*> Idx(2);
@@ -217,7 +217,7 @@
                                       PKT->getNumElements());
        PointerType* APT = PointerType::get(AT);
 
-       // Cast the pointer to packed type to an equivalent array
+       // Cast the pointer to vector type to an equivalent array
        Value* array = new BitCastInst(LI.getPointerOperand(), APT, 
                                       LI.getName() + ".a", &LI);
 


Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.74 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.75
--- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.74	Wed Feb 14 20:26:10 2007
+++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp	Wed Feb 14 21:39:18 2007
@@ -561,12 +561,12 @@
         
         if (const ArrayType *ATy = dyn_cast<ArrayType>(AggTy)) {
           if (Idx >= ATy->getNumElements()) return 0;  // Out of range.
-        } else if (const VectorType *PackedTy = dyn_cast<VectorType>(AggTy)) {
+        } else if (const VectorType *VectorTy = dyn_cast<VectorType>(AggTy)) {
           // Getting an element of the packed vector.
-          if (Idx >= PackedTy->getNumElements()) return 0;  // Out of range.
+          if (Idx >= VectorTy->getNumElements()) return 0;  // Out of range.
 
-          // Merge in the packed type.
-          if (MergeInType(PackedTy, UsedType, TD)) return 0;
+          // Merge in the vector type.
+          if (MergeInType(VectorTy, UsedType, TD)) return 0;
           
           const Type *SubTy = CanConvertToScalar(GEP, IsNotTrivial);
           if (SubTy == 0) return 0;
@@ -640,8 +640,8 @@
       Value *NV = new LoadInst(NewAI, LI->getName(), LI);
       if (NV->getType() != LI->getType()) {
         if (const VectorType *PTy = dyn_cast<VectorType>(NV->getType())) {
-          // If the result alloca is a packed type, this is either an element
-          // access or a bitcast to another packed type.
+          // If the result alloca is a vector type, this is either an element
+          // access or a bitcast to another vector type.
           if (isa<VectorType>(LI->getType())) {
             NV = new BitCastInst(NV, LI->getType(), LI->getName(), LI);
           } else {
@@ -703,8 +703,8 @@
         Value *Old = new LoadInst(NewAI, NewAI->getName()+".in", SI);
         
         if (const VectorType *PTy = dyn_cast<VectorType>(AllocaType)) {
-          // If the result alloca is a packed type, this is either an element
-          // access or a bitcast to another packed type.
+          // If the result alloca is a vector type, this is either an element
+          // access or a bitcast to another vector type.
           if (isa<VectorType>(SV->getType())) {
             SV = new BitCastInst(SV, AllocaType, SV->getName(), SI);
           } else {            






More information about the llvm-commits mailing list