[llvm-commits] CVS: llvm/include/llvm/Constants.h DerivedTypes.h Type.h
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Fri Dec 8 10:07:44 PST 2006
Changes in directory llvm/include/llvm:
Constants.h updated: 1.104 -> 1.105
DerivedTypes.h updated: 1.72 -> 1.73
Type.h updated: 1.94 -> 1.95
---
Log message:
Packed Structures
---
Diffs of the changes: (+11 -3)
Constants.h | 2 +-
DerivedTypes.h | 7 +++++--
Type.h | 5 +++++
3 files changed, 11 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.104 llvm/include/llvm/Constants.h:1.105
--- llvm/include/llvm/Constants.h:1.104 Wed Dec 6 14:30:17 2006
+++ llvm/include/llvm/Constants.h Fri Dec 8 12:06:14 2006
@@ -370,7 +370,7 @@
/// get() - Static factory methods - Return objects of the specified value
///
static Constant *get(const StructType *T, const std::vector<Constant*> &V);
- static Constant *get(const std::vector<Constant*> &V);
+ static Constant *get(const std::vector<Constant*> &V, bool packed = false);
/// getType() specialization - Reduce amount of casting...
///
Index: llvm/include/llvm/DerivedTypes.h
diff -u llvm/include/llvm/DerivedTypes.h:1.72 llvm/include/llvm/DerivedTypes.h:1.73
--- llvm/include/llvm/DerivedTypes.h:1.72 Tue Nov 14 21:02:41 2006
+++ llvm/include/llvm/DerivedTypes.h Fri Dec 8 12:06:14 2006
@@ -163,13 +163,14 @@
///
/// Private ctor - Only can be created by a static member...
///
- StructType(const std::vector<const Type*> &Types);
+ StructType(const std::vector<const Type*> &Types, bool isPacked);
public:
/// StructType::get - This static method is the primary way to create a
/// StructType.
///
- static StructType *get(const std::vector<const Type*> &Params);
+ static StructType *get(const std::vector<const Type*> &Params,
+ bool isPacked=false);
// Iterator access to the elements
typedef std::vector<PATypeHandle>::const_iterator element_iterator;
@@ -198,6 +199,8 @@
static inline bool classof(const Type *T) {
return T->getTypeID() == StructTyID;
}
+
+ bool isPacked() const { return getSubclassData(); }
};
Index: llvm/include/llvm/Type.h
diff -u llvm/include/llvm/Type.h:1.94 llvm/include/llvm/Type.h:1.95
--- llvm/include/llvm/Type.h:1.94 Wed Dec 6 19:30:30 2006
+++ llvm/include/llvm/Type.h Fri Dec 8 12:06:14 2006
@@ -85,6 +85,7 @@
ArrayTyID , PointerTyID, // Array... pointer...
OpaqueTyID, // Opaque type instances...
PackedTyID, // SIMD 'packed' format...
+ BC_ONLY_PackedStructTyID, // packed struct, for BC rep only
//...
NumTypeIDs, // Must remain as last defined ID
@@ -95,6 +96,7 @@
private:
TypeID ID : 8; // The current base type of this type.
bool Abstract : 1; // True if type contains an OpaqueType
+ bool SubclassData : 1; //Space for subclasses to store a flag
/// RefCount - This counts the number of PATypeHolders that are pointing to
/// this type. When this number falls to zero, if the type is abstract and
@@ -117,6 +119,9 @@
unsigned getRefCount() const { return RefCount; }
+ bool getSubclassData() const { return SubclassData; }
+ void setSubclassData(bool b) { SubclassData = b; }
+
/// ForwardType - This field is used to implement the union find scheme for
/// abstract types. When types are refined to other types, this field is set
/// to the more refined type. Only abstract types can be forwarded.
More information about the llvm-commits
mailing list