[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Analyzer.cpp Reader.cpp

Reid Spencer reid at x10sys.com
Wed Feb 14 18:27:20 PST 2007



Changes in directory llvm/lib/Bytecode/Reader:

Analyzer.cpp updated: 1.37 -> 1.38
Reader.cpp updated: 1.239 -> 1.240
---
Log message:

For PR1195: http://llvm.org/PR1195 :
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


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

 Analyzer.cpp |    4 ++--
 Reader.cpp   |   20 ++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)


Index: llvm/lib/Bytecode/Reader/Analyzer.cpp
diff -u llvm/lib/Bytecode/Reader/Analyzer.cpp:1.37 llvm/lib/Bytecode/Reader/Analyzer.cpp:1.38
--- llvm/lib/Bytecode/Reader/Analyzer.cpp:1.37	Mon Feb 12 12:53:42 2007
+++ llvm/lib/Bytecode/Reader/Analyzer.cpp	Wed Feb 14 20:26:09 2007
@@ -423,8 +423,8 @@
     bca.numValues++;
   }
 
-  virtual void handleConstantPacked(
-    const PackedType* PT,
+  virtual void handleConstantVector(
+    const VectorType* PT,
     Constant**Elements, unsigned NumElts,
     unsigned TypeSlot,
     Constant* PackedVal)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.239 llvm/lib/Bytecode/Reader/Reader.cpp:1.240
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.239	Wed Feb 14 00:20:04 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp	Wed Feb 14 20:26:09 2007
@@ -482,7 +482,7 @@
       break;
     }
     case Instruction::InsertElement: {
-      const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+      const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
       if (!PackedTy || Oprnds.size() != 3)
         error("Invalid insertelement instruction!");
       
@@ -496,13 +496,13 @@
       break;
     }
     case Instruction::ShuffleVector: {
-      const PackedType *PackedTy = dyn_cast<PackedType>(InstTy);
+      const VectorType *PackedTy = dyn_cast<VectorType>(InstTy);
       if (!PackedTy || Oprnds.size() != 3)
         error("Invalid shufflevector instruction!");
       Value *V1 = getValue(iType, Oprnds[0]);
       Value *V2 = getValue(iType, Oprnds[1]);
-      const PackedType *EltTy = 
-        PackedType::get(Type::Int32Ty, PackedTy->getNumElements());
+      const VectorType *EltTy = 
+        VectorType::get(Type::Int32Ty, PackedTy->getNumElements());
       Value *V3 = getValue(getTypeSlot(EltTy), Oprnds[2]);
       if (!ShuffleVectorInst::isValidOperands(V1, V2, V3))
         error("Invalid shufflevector instruction!");
@@ -1029,10 +1029,10 @@
     Result =  ArrayType::get(ElementType, NumElements);
     break;
   }
-  case Type::PackedTyID: {
+  case Type::VectorTyID: {
     const Type *ElementType = readType();
     unsigned NumElements = read_vbr_uint();
-    Result =  PackedType::get(ElementType, NumElements);
+    Result =  VectorType::get(ElementType, NumElements);
     break;
   }
   case Type::StructTyID: {
@@ -1314,8 +1314,8 @@
     break;
   }
 
-  case Type::PackedTyID: {
-    const PackedType *PT = cast<PackedType>(Ty);
+  case Type::VectorTyID: {
+    const VectorType *PT = cast<VectorType>(Ty);
     unsigned NumElements = PT->getNumElements();
     unsigned TypeSlot = getTypeSlot(PT->getElementType());
     std::vector<Constant*> Elements;
@@ -1323,8 +1323,8 @@
     while (NumElements--)     // Read all of the elements of the constant.
       Elements.push_back(getConstantValue(TypeSlot,
                                           read_vbr_uint()));
-    Result = ConstantPacked::get(PT, Elements);
-    if (Handler) Handler->handleConstantPacked(PT, &Elements[0],Elements.size(),
+    Result = ConstantVector::get(PT, Elements);
+    if (Handler) Handler->handleConstantVector(PT, &Elements[0],Elements.size(),
                                                TypeSlot, Result);
     break;
   }






More information about the llvm-commits mailing list