forked from OSchip/llvm-project
parent
19de37f730
commit
36eb1ee5eb
|
@ -126,13 +126,13 @@ namespace llvm {
|
||||||
|
|
||||||
MVT() : SimpleTy((SimpleValueType)(INVALID_SIMPLE_VALUE_TYPE)) {}
|
MVT() : SimpleTy((SimpleValueType)(INVALID_SIMPLE_VALUE_TYPE)) {}
|
||||||
MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
|
MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
|
||||||
|
|
||||||
bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; }
|
bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; }
|
||||||
bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; }
|
bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; }
|
||||||
bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
|
bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
|
||||||
bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
|
bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
|
||||||
bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
|
bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
|
||||||
|
|
||||||
/// isFloatingPoint - Return true if this is a FP, or a vector FP type.
|
/// isFloatingPoint - Return true if this is a FP, or a vector FP type.
|
||||||
bool isFloatingPoint() const {
|
bool isFloatingPoint() const {
|
||||||
return ((SimpleTy >= MVT::f32 && SimpleTy <= MVT::ppcf128) ||
|
return ((SimpleTy >= MVT::f32 && SimpleTy <= MVT::ppcf128) ||
|
||||||
|
@ -151,7 +151,7 @@ namespace llvm {
|
||||||
return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE &&
|
return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE &&
|
||||||
SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
|
SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isPow2VectorType - Returns true if the given vector is a power of 2.
|
/// isPow2VectorType - Returns true if the given vector is a power of 2.
|
||||||
bool isPow2VectorType() const {
|
bool isPow2VectorType() const {
|
||||||
unsigned NElts = getVectorNumElements();
|
unsigned NElts = getVectorNumElements();
|
||||||
|
@ -174,7 +174,7 @@ namespace llvm {
|
||||||
MVT getScalarType() const {
|
MVT getScalarType() const {
|
||||||
return isVector() ? getVectorElementType() : *this;
|
return isVector() ? getVectorElementType() : *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
MVT getVectorElementType() const {
|
MVT getVectorElementType() const {
|
||||||
switch (SimpleTy) {
|
switch (SimpleTy) {
|
||||||
default:
|
default:
|
||||||
|
@ -202,7 +202,7 @@ namespace llvm {
|
||||||
case v4f64: return f64;
|
case v4f64: return f64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned getVectorNumElements() const {
|
unsigned getVectorNumElements() const {
|
||||||
switch (SimpleTy) {
|
switch (SimpleTy) {
|
||||||
default:
|
default:
|
||||||
|
@ -230,7 +230,7 @@ namespace llvm {
|
||||||
case v1i64: return 1;
|
case v1i64: return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned getSizeInBits() const {
|
unsigned getSizeInBits() const {
|
||||||
switch (SimpleTy) {
|
switch (SimpleTy) {
|
||||||
case iPTR:
|
case iPTR:
|
||||||
|
@ -276,7 +276,7 @@ namespace llvm {
|
||||||
case v8i64: return 512;
|
case v8i64: return 512;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static MVT getFloatingPointVT(unsigned BitWidth) {
|
static MVT getFloatingPointVT(unsigned BitWidth) {
|
||||||
switch (BitWidth) {
|
switch (BitWidth) {
|
||||||
default:
|
default:
|
||||||
|
@ -291,7 +291,7 @@ namespace llvm {
|
||||||
return MVT::f128;
|
return MVT::f128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static MVT getIntegerVT(unsigned BitWidth) {
|
static MVT getIntegerVT(unsigned BitWidth) {
|
||||||
switch (BitWidth) {
|
switch (BitWidth) {
|
||||||
default:
|
default:
|
||||||
|
@ -310,7 +310,7 @@ namespace llvm {
|
||||||
return MVT::i128;
|
return MVT::i128;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static MVT getVectorVT(MVT VT, unsigned NumElements) {
|
static MVT getVectorVT(MVT VT, unsigned NumElements) {
|
||||||
switch (VT.SimpleTy) {
|
switch (VT.SimpleTy) {
|
||||||
default:
|
default:
|
||||||
|
@ -530,7 +530,7 @@ namespace llvm {
|
||||||
EVT getScalarType() const {
|
EVT getScalarType() const {
|
||||||
return isVector() ? getVectorElementType() : *this;
|
return isVector() ? getVectorElementType() : *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getVectorElementType - Given a vector type, return the type of
|
/// getVectorElementType - Given a vector type, return the type of
|
||||||
/// each element.
|
/// each element.
|
||||||
EVT getVectorElementType() const {
|
EVT getVectorElementType() const {
|
||||||
|
|
Loading…
Reference in New Issue