Packed types, brought to you by Brad Jones

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke
2004-08-20 06:00:58 +00:00
parent 4e5b9e136f
commit 715c90ba52
15 changed files with 460 additions and 17 deletions

View File

@@ -48,6 +48,7 @@ class FunctionType;
class OpaqueType;
class PointerType;
class StructType;
class PackedType;
struct Type {
///===-------------------------------------------------------------------===//
@@ -71,7 +72,7 @@ struct Type {
FunctionTyID , StructTyID, // Functions... Structs...
ArrayTyID , PointerTyID, // Array... pointer...
OpaqueTyID, // Opaque type instances...
//PackedTyID , // SIMD 'packed' format... TODO
PackedTyID, // SIMD 'packed' format...
//...
NumTypeIDs, // Must remain as last defined ID
@@ -189,7 +190,8 @@ public:
/// isFirstClassType - Return true if the value is holdable in a register.
inline bool isFirstClassType() const {
return (ID != VoidTyID && ID <= LastPrimitiveTyID) || ID == PointerTyID;
return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
ID == PointerTyID || ID == PackedTyID;
}
/// isSized - Return true if it makes sense to take the size of this type. To
@@ -197,7 +199,7 @@ public:
/// TargetData subsystem to do this.
///
bool isSized() const {
return (ID >= BoolTyID && ID <= DoubleTyID) || ID == PointerTyID ||
return (ID >= BoolTyID && ID <= DoubleTyID) || ID == PointerTyID ||
isSizedDerivedType();
}