[llvm-commits] [llvm] r69515 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Duncan Sands
baldrick at free.fr
Sat Apr 18 23:23:05 PDT 2009
Author: baldrick
Date: Sun Apr 19 01:23:05 2009
New Revision: 69515
URL: http://llvm.org/viewvc/llvm-project?rev=69515&view=rev
Log:
Remove the SimpleTy enumerated type field from the MVT
value type union: this field was causing problems for
some compilers on 64 bit systems, presumably because
SimpleTy is 32 bits wide while the other fields are
64 bits wide.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=69515&r1=69514&r2=69515&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Sun Apr 19 01:23:05 2009
@@ -107,7 +107,6 @@
///
union {
uintptr_t V;
- SimpleValueType SimpleTy;
const Type *LLVMTy;
};
@@ -229,41 +228,36 @@
/// isFloatingPoint - Return true if this is a FP, or a vector FP type.
bool isFloatingPoint() const {
return isSimple() ?
- ((SimpleTy >= f32 && SimpleTy <= ppcf128) ||
- (SimpleTy >= v2f32 && SimpleTy <= v2f64)) :
+ ((V >= f32 && V <= ppcf128) || (V >= v2f32 && V <= v2f64)) :
isExtendedFloatingPoint();
}
/// isInteger - Return true if this is an integer, or a vector integer type.
bool isInteger() const {
return isSimple() ?
- ((SimpleTy >= FIRST_INTEGER_VALUETYPE &&
- SimpleTy <= LAST_INTEGER_VALUETYPE) ||
- (SimpleTy >= v2i8 && SimpleTy <= v2i64)) :
- isExtendedInteger();
+ ((V >= FIRST_INTEGER_VALUETYPE && V <= LAST_INTEGER_VALUETYPE) ||
+ (V >= v2i8 && V <= v2i64)) : isExtendedInteger();
}
/// isVector - Return true if this is a vector value type.
bool isVector() const {
return isSimple() ?
- (SimpleTy >= FIRST_VECTOR_VALUETYPE &&
- SimpleTy <= LAST_VECTOR_VALUETYPE) :
+ (V >= FIRST_VECTOR_VALUETYPE && V <= LAST_VECTOR_VALUETYPE) :
isExtendedVector();
}
/// is64BitVector - Return true if this is a 64-bit vector type.
bool is64BitVector() const {
return isSimple() ?
- (SimpleTy==v8i8 || SimpleTy==v4i16 || SimpleTy==v2i32 ||
- SimpleTy==v1i64 || SimpleTy==v2f32) :
+ (V==v8i8 || V==v4i16 || V==v2i32 || V==v1i64 || V==v2f32) :
isExtended64BitVector();
}
/// is128BitVector - Return true if this is a 128-bit vector type.
bool is128BitVector() const {
return isSimple() ?
- (SimpleTy==v16i8 || SimpleTy==v8i16 || SimpleTy==v4i32 ||
- SimpleTy==v2i64 || SimpleTy==v4f32 || SimpleTy==v2f64) :
+ (V==v16i8 || V==v8i16 || V==v4i32 ||
+ V==v2i64 || V==v4f32 || V==v2f64) :
isExtended128BitVector();
}
@@ -308,7 +302,7 @@
/// simple MVT.
SimpleValueType getSimpleVT() const {
assert(isSimple() && "Expected a SimpleValueType!");
- return SimpleTy;
+ return SimpleValueType(V);
}
/// getVectorElementType - Given a vector type, return the type of
More information about the llvm-commits
mailing list