[llvm-commits] CVS: llvm/include/llvm/Constants.h DerivedTypes.h Instructions.h Intrinsics.td Type.h Value.h

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



Changes in directory llvm/include/llvm:

Constants.h updated: 1.123 -> 1.124
DerivedTypes.h updated: 1.82 -> 1.83
Instructions.h updated: 1.58 -> 1.59
Intrinsics.td updated: 1.45 -> 1.46
Type.h updated: 1.103 -> 1.104
Value.h updated: 1.95 -> 1.96
---
Log message:

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


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

 Constants.h    |   28 ++++++++++++++--------------
 DerivedTypes.h |   34 +++++++++++++++++-----------------
 Instructions.h |   14 +++++++-------
 Intrinsics.td  |   18 +++++++++---------
 Type.h         |    6 +++---
 Value.h        |    2 +-
 6 files changed, 51 insertions(+), 51 deletions(-)


Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.123 llvm/include/llvm/Constants.h:1.124
--- llvm/include/llvm/Constants.h:1.123	Thu Feb  1 20:16:21 2007
+++ llvm/include/llvm/Constants.h	Wed Feb 14 20:26:09 2007
@@ -28,7 +28,7 @@
 class ArrayType;
 class StructType;
 class PointerType;
-class PackedType;
+class VectorType;
 
 template<class ConstantClass, class TypeClass, class ValType>
 struct ConstantCreator;
@@ -334,31 +334,31 @@
 };
 
 //===----------------------------------------------------------------------===//
-/// ConstantPacked - Constant Packed Declarations
+/// ConstantVector - Constant Vector Declarations
 ///
-class ConstantPacked : public Constant {
-  friend struct ConstantCreator<ConstantPacked, PackedType,
+class ConstantVector : public Constant {
+  friend struct ConstantCreator<ConstantVector, VectorType,
                                     std::vector<Constant*> >;
-  ConstantPacked(const ConstantPacked &);      // DO NOT IMPLEMENT
+  ConstantVector(const ConstantVector &);      // DO NOT IMPLEMENT
 protected:
-  ConstantPacked(const PackedType *T, const std::vector<Constant*> &Val);
-  ~ConstantPacked();
+  ConstantVector(const VectorType *T, const std::vector<Constant*> &Val);
+  ~ConstantVector();
 public:
   /// get() - Static factory methods - Return objects of the specified value
-  static Constant *get(const PackedType *T, const std::vector<Constant*> &);
+  static Constant *get(const VectorType *T, const std::vector<Constant*> &);
   static Constant *get(const std::vector<Constant*> &V);
 
-  /// getType - Specialize the getType() method to always return an PackedType,
+  /// getType - Specialize the getType() method to always return an VectorType,
   /// which reduces the amount of casting needed in parts of the compiler.
   ///
-  inline const PackedType *getType() const {
-    return reinterpret_cast<const PackedType*>(Value::getType());
+  inline const VectorType *getType() const {
+    return reinterpret_cast<const VectorType*>(Value::getType());
   }
 
   /// @returns the value for an packed integer constant of the given type that
   /// has all its bits set to true.
   /// @brief Get the all ones value
-  static ConstantPacked *getAllOnesValue(const PackedType *Ty);
+  static ConstantVector *getAllOnesValue(const VectorType *Ty);
   
   /// isNullValue - Return true if this is the value that would be returned by
   /// getNullValue.  This always returns false because zero arrays are always
@@ -375,9 +375,9 @@
   virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);
 
   /// Methods for support type inquiry through isa, cast, and dyn_cast:
-  static inline bool classof(const ConstantPacked *) { return true; }
+  static inline bool classof(const ConstantVector *) { return true; }
   static bool classof(const Value *V) {
-    return V->getValueType() == ConstantPackedVal;
+    return V->getValueType() == ConstantVectorVal;
   }
 };
 


Index: llvm/include/llvm/DerivedTypes.h
diff -u llvm/include/llvm/DerivedTypes.h:1.82 llvm/include/llvm/DerivedTypes.h:1.83
--- llvm/include/llvm/DerivedTypes.h:1.82	Sun Jan 28 07:31:35 2007
+++ llvm/include/llvm/DerivedTypes.h	Wed Feb 14 20:26:09 2007
@@ -28,7 +28,7 @@
 class ArrayValType;
 class StructValType;
 class PointerValType;
-class PackedValType;
+class VectorValType;
 class IntegerValType;
 
 class DerivedType : public Type {
@@ -214,7 +214,7 @@
 
 
 /// CompositeType - Common super class of ArrayType, StructType, PointerType
-/// and PackedType
+/// and VectorType
 class CompositeType : public DerivedType {
 protected:
   inline CompositeType(TypeID id) : DerivedType(id) { }
@@ -232,7 +232,7 @@
     return T->getTypeID() == ArrayTyID ||
            T->getTypeID() == StructTyID ||
            T->getTypeID() == PointerTyID ||
-           T->getTypeID() == PackedTyID;
+           T->getTypeID() == VectorTyID;
   }
 };
 
@@ -317,7 +317,7 @@
   static inline bool classof(const Type *T) {
     return T->getTypeID() == ArrayTyID ||
            T->getTypeID() == PointerTyID ||
-           T->getTypeID() == PackedTyID;
+           T->getTypeID() == VectorTyID;
   }
 };
 
@@ -350,25 +350,25 @@
   }
 };
 
-/// PackedType - Class to represent packed types
+/// VectorType - Class to represent packed types
 ///
-class PackedType : public SequentialType {
-  friend class TypeMap<PackedValType, PackedType>;
+class VectorType : public SequentialType {
+  friend class TypeMap<VectorValType, VectorType>;
   unsigned NumElements;
 
-  PackedType(const PackedType &);                   // Do not implement
-  const PackedType &operator=(const PackedType &);  // Do not implement
-  PackedType(const Type *ElType, unsigned NumEl);
+  VectorType(const VectorType &);                   // Do not implement
+  const VectorType &operator=(const VectorType &);  // Do not implement
+  VectorType(const Type *ElType, unsigned NumEl);
 public:
-  /// PackedType::get - This static method is the primary way to construct an
-  /// PackedType
+  /// VectorType::get - This static method is the primary way to construct an
+  /// VectorType
   ///
-  static PackedType *get(const Type *ElementType, unsigned NumElements);
+  static VectorType *get(const Type *ElementType, unsigned NumElements);
 
-  /// @brief Return the number of elements in the Packed type.
+  /// @brief Return the number of elements in the Vector type.
   inline unsigned getNumElements() const { return NumElements; }
 
-  /// @brief Return the number of bits in the Packed type.
+  /// @brief Return the number of bits in the Vector type.
   inline unsigned getBitWidth() const { 
     return NumElements *getElementType()->getPrimitiveSizeInBits();
   }
@@ -378,9 +378,9 @@
   virtual void typeBecameConcrete(const DerivedType *AbsTy);
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
-  static inline bool classof(const PackedType *T) { return true; }
+  static inline bool classof(const VectorType *T) { return true; }
   static inline bool classof(const Type *T) {
-    return T->getTypeID() == PackedTyID;
+    return T->getTypeID() == VectorTyID;
   }
 };
 


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.58 llvm/include/llvm/Instructions.h:1.59
--- llvm/include/llvm/Instructions.h:1.58	Tue Feb 13 01:54:42 2007
+++ llvm/include/llvm/Instructions.h	Wed Feb 14 20:26:09 2007
@@ -23,7 +23,7 @@
 class BasicBlock;
 class ConstantInt;
 class PointerType;
-class PackedType;
+class VectorType;
 
 //===----------------------------------------------------------------------===//
 //                             AllocationInst Class
@@ -862,7 +862,7 @@
 //===----------------------------------------------------------------------===//
 
 /// ExtractElementInst - This instruction extracts a single (scalar)
-/// element from a PackedType value
+/// element from a VectorType value
 ///
 class ExtractElementInst : public Instruction {
   Use Ops[2];
@@ -916,7 +916,7 @@
 //===----------------------------------------------------------------------===//
 
 /// InsertElementInst - This instruction inserts a single (scalar)
-/// element into a PackedType value
+/// element into a VectorType value
 ///
 class InsertElementInst : public Instruction {
   Use Ops[3];
@@ -942,8 +942,8 @@
 
   /// getType - Overload to return most specific packed type.
   ///
-  inline const PackedType *getType() const {
-    return reinterpret_cast<const PackedType*>(Instruction::getType());
+  inline const VectorType *getType() const {
+    return reinterpret_cast<const VectorType*>(Instruction::getType());
   }
 
   /// Transparently provide more efficient getOperand methods.
@@ -994,8 +994,8 @@
 
   /// getType - Overload to return most specific packed type.
   ///
-  inline const PackedType *getType() const {
-    return reinterpret_cast<const PackedType*>(Instruction::getType());
+  inline const VectorType *getType() const {
+    return reinterpret_cast<const VectorType*>(Instruction::getType());
   }
 
   /// Transparently provide more efficient getOperand methods.


Index: llvm/include/llvm/Intrinsics.td
diff -u llvm/include/llvm/Intrinsics.td:1.45 llvm/include/llvm/Intrinsics.td:1.46
--- llvm/include/llvm/Intrinsics.td:1.45	Mon Feb 12 13:05:51 2007
+++ llvm/include/llvm/Intrinsics.td	Wed Feb 14 20:26:09 2007
@@ -62,8 +62,8 @@
   int Width = width;
 }
 
-class LLVMPackedType<ValueType VT, int numelts, LLVMType elty>
-  : LLVMType<VT, "Type::PackedTyID">{
+class LLVMVectorType<ValueType VT, int numelts, LLVMType elty>
+  : LLVMType<VT, "Type::VectorTyID">{
   int NumElts = numelts;
   LLVMType ElTy = elty;
 } 
@@ -90,13 +90,13 @@
 def llvm_empty_ty      : LLVMEmptyStructType;                     // { }
 def llvm_descriptor_ty : LLVMPointerType<llvm_empty_ty>;          // { }*
 
-def llvm_v16i8_ty      : LLVMPackedType<v16i8,16, llvm_i8_ty>;    // 16 x i8
-def llvm_v8i16_ty      : LLVMPackedType<v8i16, 8, llvm_i16_ty>;   //  8 x i16
-def llvm_v2i64_ty      : LLVMPackedType<v2i64, 2, llvm_i64_ty>;   //  2 x i64
-def llvm_v2i32_ty      : LLVMPackedType<v2i32, 2, llvm_i32_ty>;   //  2 x i32
-def llvm_v4i32_ty      : LLVMPackedType<v4i32, 4, llvm_i32_ty>;   //  4 x i32
-def llvm_v4f32_ty      : LLVMPackedType<v4f32, 4, llvm_float_ty>; //  4 x float
-def llvm_v2f64_ty      : LLVMPackedType<v2f64, 2, llvm_double_ty>;//  2 x double
+def llvm_v16i8_ty      : LLVMVectorType<v16i8,16, llvm_i8_ty>;    // 16 x i8
+def llvm_v8i16_ty      : LLVMVectorType<v8i16, 8, llvm_i16_ty>;   //  8 x i16
+def llvm_v2i64_ty      : LLVMVectorType<v2i64, 2, llvm_i64_ty>;   //  2 x i64
+def llvm_v2i32_ty      : LLVMVectorType<v2i32, 2, llvm_i32_ty>;   //  2 x i32
+def llvm_v4i32_ty      : LLVMVectorType<v4i32, 4, llvm_i32_ty>;   //  4 x i32
+def llvm_v4f32_ty      : LLVMVectorType<v4f32, 4, llvm_float_ty>; //  4 x float
+def llvm_v2f64_ty      : LLVMVectorType<v2f64, 2, llvm_double_ty>;//  2 x double
 
 def llvm_vararg_ty     : LLVMType<isVoid, "...">; // vararg
 


Index: llvm/include/llvm/Type.h
diff -u llvm/include/llvm/Type.h:1.103 llvm/include/llvm/Type.h:1.104
--- llvm/include/llvm/Type.h:1.103	Sun Jan 28 18:09:00 2007
+++ llvm/include/llvm/Type.h	Wed Feb 14 20:26:09 2007
@@ -81,7 +81,7 @@
     ArrayTyID,       ///<  8: Arrays
     PointerTyID,     ///<  9: Pointers
     OpaqueTyID,      ///< 10: Opaque: type with unknown structure
-    PackedTyID,      ///< 11: SIMD 'packed' format, or other vector type
+    VectorTyID,      ///< 11: SIMD 'packed' format, or other vector type
 
     NumTypeIDs,                         // Must remain as last defined ID
     LastPrimitiveTyID = LabelTyID,
@@ -191,7 +191,7 @@
   ///
   inline bool isFirstClassType() const {
     return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
-            ID == IntegerTyID || ID == PointerTyID || ID == PackedTyID;
+            ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID;
   }
 
   /// isSized - Return true if it makes sense to take the size of this type.  To
@@ -204,7 +204,7 @@
       return true;
     // If it is not something that can have a size (e.g. a function or label),
     // it doesn't have a size.
-    if (ID != StructTyID && ID != ArrayTyID && ID != PackedTyID &&
+    if (ID != StructTyID && ID != ArrayTyID && ID != VectorTyID &&
         ID != PackedStructTyID)
       return false;
     // If it is something that can have a size and it's concrete, it definitely


Index: llvm/include/llvm/Value.h
diff -u llvm/include/llvm/Value.h:1.95 llvm/include/llvm/Value.h:1.96
--- llvm/include/llvm/Value.h:1.95	Tue Feb 13 01:53:34 2007
+++ llvm/include/llvm/Value.h	Wed Feb 14 20:26:09 2007
@@ -167,7 +167,7 @@
     ConstantFPVal,            // This is an instance of ConstantFP
     ConstantArrayVal,         // This is an instance of ConstantArray
     ConstantStructVal,        // This is an instance of ConstantStruct
-    ConstantPackedVal,        // This is an instance of ConstantPacked
+    ConstantVectorVal,        // This is an instance of ConstantPacked
     ConstantPointerNullVal,   // This is an instance of ConstantPointerNull
     InlineAsmVal,             // This is an instance of InlineAsm
     InstructionVal,           // This is an instance of Instruction






More information about the llvm-commits mailing list