mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-10 16:24:04 +00:00
Remove redundant inline keywords from functions defined within
class definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58620 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97bd9a914b
commit
958fdf07b5
@ -139,13 +139,13 @@ namespace llvm {
|
|||||||
MVT() {}
|
MVT() {}
|
||||||
MVT(SimpleValueType S) : V(S) {}
|
MVT(SimpleValueType S) : V(S) {}
|
||||||
|
|
||||||
inline bool operator== (const MVT VT) const { return V == VT.V; }
|
bool operator== (const MVT VT) const { return V == VT.V; }
|
||||||
inline bool operator!= (const MVT VT) const { return V != VT.V; }
|
bool operator!= (const MVT VT) const { return V != VT.V; }
|
||||||
|
|
||||||
/// getFloatingPointVT - Returns the MVT that represents a floating point
|
/// getFloatingPointVT - Returns the MVT that represents a floating point
|
||||||
/// type with the given number of bits. There are two floating point types
|
/// type with the given number of bits. There are two floating point types
|
||||||
/// with 128 bits - this returns f128 rather than ppcf128.
|
/// with 128 bits - this returns f128 rather than ppcf128.
|
||||||
static inline MVT getFloatingPointVT(unsigned BitWidth) {
|
static MVT getFloatingPointVT(unsigned BitWidth) {
|
||||||
switch (BitWidth) {
|
switch (BitWidth) {
|
||||||
default:
|
default:
|
||||||
assert(false && "Bad bit width!");
|
assert(false && "Bad bit width!");
|
||||||
@ -162,7 +162,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getIntegerVT - Returns the MVT that represents an integer with the given
|
/// getIntegerVT - Returns the MVT that represents an integer with the given
|
||||||
/// number of bits.
|
/// number of bits.
|
||||||
static inline MVT getIntegerVT(unsigned BitWidth) {
|
static MVT getIntegerVT(unsigned BitWidth) {
|
||||||
switch (BitWidth) {
|
switch (BitWidth) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -187,7 +187,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getVectorVT - Returns the MVT that represents a vector NumElements in
|
/// getVectorVT - Returns the MVT that represents a vector NumElements in
|
||||||
/// length, where each element is of type VT.
|
/// length, where each element is of type VT.
|
||||||
static inline MVT getVectorVT(MVT VT, unsigned NumElements) {
|
static MVT getVectorVT(MVT VT, unsigned NumElements) {
|
||||||
switch (VT.V) {
|
switch (VT.V) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -228,7 +228,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getIntVectorWithNumElements - Return any integer vector type that has
|
/// getIntVectorWithNumElements - Return any integer vector type that has
|
||||||
/// the specified number of elements.
|
/// the specified number of elements.
|
||||||
static inline MVT getIntVectorWithNumElements(unsigned NumElts) {
|
static MVT getIntVectorWithNumElements(unsigned NumElts) {
|
||||||
switch (NumElts) {
|
switch (NumElts) {
|
||||||
default: return getVectorVT(i8, NumElts);
|
default: return getVectorVT(i8, NumElts);
|
||||||
case 1: return v1i64;
|
case 1: return v1i64;
|
||||||
@ -243,90 +243,90 @@ namespace llvm {
|
|||||||
|
|
||||||
/// isSimple - Test if the given MVT is simple (as opposed to being
|
/// isSimple - Test if the given MVT is simple (as opposed to being
|
||||||
/// extended).
|
/// extended).
|
||||||
inline bool isSimple() const {
|
bool isSimple() const {
|
||||||
return V <= SimpleTypeMask;
|
return V <= SimpleTypeMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isExtended - Test if the given MVT is extended (as opposed to
|
/// isExtended - Test if the given MVT is extended (as opposed to
|
||||||
/// being simple).
|
/// being simple).
|
||||||
inline bool isExtended() const {
|
bool isExtended() const {
|
||||||
return !isSimple();
|
return !isSimple();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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.
|
||||||
inline bool isFloatingPoint() const {
|
bool isFloatingPoint() const {
|
||||||
uint32_t SVT = V & SimpleTypeMask;
|
uint32_t SVT = V & SimpleTypeMask;
|
||||||
return (SVT >= f32 && SVT <= ppcf128) || (SVT >= v2f32 && SVT <= v2f64);
|
return (SVT >= f32 && SVT <= ppcf128) || (SVT >= v2f32 && SVT <= v2f64);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isInteger - Return true if this is an integer, or a vector integer type.
|
/// isInteger - Return true if this is an integer, or a vector integer type.
|
||||||
inline bool isInteger() const {
|
bool isInteger() const {
|
||||||
uint32_t SVT = V & SimpleTypeMask;
|
uint32_t SVT = V & SimpleTypeMask;
|
||||||
return (SVT >= FIRST_INTEGER_VALUETYPE && SVT <= LAST_INTEGER_VALUETYPE) ||
|
return (SVT >= FIRST_INTEGER_VALUETYPE && SVT <= LAST_INTEGER_VALUETYPE) ||
|
||||||
(SVT >= v8i8 && SVT <= v2i64) || (SVT == iAny && (V & PrecisionMask));
|
(SVT >= v8i8 && SVT <= v2i64) || (SVT == iAny && (V & PrecisionMask));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isVector - Return true if this is a vector value type.
|
/// isVector - Return true if this is a vector value type.
|
||||||
inline bool isVector() const {
|
bool isVector() const {
|
||||||
return (V >= FIRST_VECTOR_VALUETYPE && V <= LAST_VECTOR_VALUETYPE) ||
|
return (V >= FIRST_VECTOR_VALUETYPE && V <= LAST_VECTOR_VALUETYPE) ||
|
||||||
(V & VectorMask);
|
(V & VectorMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// is64BitVector - Return true if this is a 64-bit vector type.
|
/// is64BitVector - Return true if this is a 64-bit vector type.
|
||||||
inline bool is64BitVector() const {
|
bool is64BitVector() const {
|
||||||
return (V==v8i8 || V==v4i16 || V==v2i32 || V==v1i64 || V==v2f32 ||
|
return (V==v8i8 || V==v4i16 || V==v2i32 || V==v1i64 || V==v2f32 ||
|
||||||
(isExtended() && isVector() && getSizeInBits()==64));
|
(isExtended() && isVector() && getSizeInBits()==64));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// is128BitVector - Return true if this is a 128-bit vector type.
|
/// is128BitVector - Return true if this is a 128-bit vector type.
|
||||||
inline bool is128BitVector() const {
|
bool is128BitVector() const {
|
||||||
return (V==v16i8 || V==v8i16 || V==v4i32 || V==v2i64 ||
|
return (V==v16i8 || V==v8i16 || V==v4i32 || V==v2i64 ||
|
||||||
V==v4f32 || V==v2f64 ||
|
V==v4f32 || V==v2f64 ||
|
||||||
(isExtended() && isVector() && getSizeInBits()==128));
|
(isExtended() && isVector() && getSizeInBits()==128));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isByteSized - Return true if the bit size is a multiple of 8.
|
/// isByteSized - Return true if the bit size is a multiple of 8.
|
||||||
inline bool isByteSized() const {
|
bool isByteSized() const {
|
||||||
return (getSizeInBits() & 7) == 0;
|
return (getSizeInBits() & 7) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isRound - Return true if the size is a power-of-two number of bytes.
|
/// isRound - Return true if the size is a power-of-two number of bytes.
|
||||||
inline bool isRound() const {
|
bool isRound() const {
|
||||||
unsigned BitSize = getSizeInBits();
|
unsigned BitSize = getSizeInBits();
|
||||||
return BitSize >= 8 && !(BitSize & (BitSize - 1));
|
return BitSize >= 8 && !(BitSize & (BitSize - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// bitsGT - Return true if this has more bits than VT.
|
/// bitsGT - Return true if this has more bits than VT.
|
||||||
inline bool bitsGT(MVT VT) const {
|
bool bitsGT(MVT VT) const {
|
||||||
return getSizeInBits() > VT.getSizeInBits();
|
return getSizeInBits() > VT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// bitsGE - Return true if this has no less bits than VT.
|
/// bitsGE - Return true if this has no less bits than VT.
|
||||||
inline bool bitsGE(MVT VT) const {
|
bool bitsGE(MVT VT) const {
|
||||||
return getSizeInBits() >= VT.getSizeInBits();
|
return getSizeInBits() >= VT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// bitsLT - Return true if this has less bits than VT.
|
/// bitsLT - Return true if this has less bits than VT.
|
||||||
inline bool bitsLT(MVT VT) const {
|
bool bitsLT(MVT VT) const {
|
||||||
return getSizeInBits() < VT.getSizeInBits();
|
return getSizeInBits() < VT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// bitsLE - Return true if this has no more bits than VT.
|
/// bitsLE - Return true if this has no more bits than VT.
|
||||||
inline bool bitsLE(MVT VT) const {
|
bool bitsLE(MVT VT) const {
|
||||||
return getSizeInBits() <= VT.getSizeInBits();
|
return getSizeInBits() <= VT.getSizeInBits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// getSimpleVT - Return the SimpleValueType held in the specified
|
/// getSimpleVT - Return the SimpleValueType held in the specified
|
||||||
/// simple MVT.
|
/// simple MVT.
|
||||||
inline SimpleValueType getSimpleVT() const {
|
SimpleValueType getSimpleVT() const {
|
||||||
assert(isSimple() && "Expected a SimpleValueType!");
|
assert(isSimple() && "Expected a SimpleValueType!");
|
||||||
return (SimpleValueType)V;
|
return (SimpleValueType)V;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getVectorElementType - Given a vector type, return the type of
|
/// getVectorElementType - Given a vector type, return the type of
|
||||||
/// each element.
|
/// each element.
|
||||||
inline MVT getVectorElementType() const {
|
MVT getVectorElementType() const {
|
||||||
assert(isVector() && "Invalid vector type!");
|
assert(isVector() && "Invalid vector type!");
|
||||||
switch (V) {
|
switch (V) {
|
||||||
default: {
|
default: {
|
||||||
@ -353,7 +353,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getVectorNumElements - Given a vector type, return the number of
|
/// getVectorNumElements - Given a vector type, return the number of
|
||||||
/// elements it contains.
|
/// elements it contains.
|
||||||
inline unsigned getVectorNumElements() const {
|
unsigned getVectorNumElements() const {
|
||||||
assert(isVector() && "Invalid vector type!");
|
assert(isVector() && "Invalid vector type!");
|
||||||
switch (V) {
|
switch (V) {
|
||||||
default:
|
default:
|
||||||
@ -376,7 +376,7 @@ namespace llvm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// getSizeInBits - Return the size of the specified value type in bits.
|
/// getSizeInBits - Return the size of the specified value type in bits.
|
||||||
inline unsigned getSizeInBits() const {
|
unsigned getSizeInBits() const {
|
||||||
switch (V) {
|
switch (V) {
|
||||||
default:
|
default:
|
||||||
assert(isExtended() && "MVT has no known size!");
|
assert(isExtended() && "MVT has no known size!");
|
||||||
@ -415,14 +415,14 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getStoreSizeInBits - Return the number of bits overwritten by a store
|
/// getStoreSizeInBits - Return the number of bits overwritten by a store
|
||||||
/// of the specified value type.
|
/// of the specified value type.
|
||||||
inline unsigned getStoreSizeInBits() const {
|
unsigned getStoreSizeInBits() const {
|
||||||
return (getSizeInBits() + 7)/8*8;
|
return (getSizeInBits() + 7)/8*8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getRoundIntegerType - Rounds the bit-width of the given integer MVT up
|
/// getRoundIntegerType - Rounds the bit-width of the given integer MVT up
|
||||||
/// to the nearest power of two (and at least to eight), and returns the
|
/// to the nearest power of two (and at least to eight), and returns the
|
||||||
/// integer MVT with that number of bits.
|
/// integer MVT with that number of bits.
|
||||||
inline MVT getRoundIntegerType() const {
|
MVT getRoundIntegerType() const {
|
||||||
assert(isInteger() && !isVector() && "Invalid integer type!");
|
assert(isInteger() && !isVector() && "Invalid integer type!");
|
||||||
unsigned BitWidth = getSizeInBits();
|
unsigned BitWidth = getSizeInBits();
|
||||||
if (BitWidth <= 8)
|
if (BitWidth <= 8)
|
||||||
@ -433,7 +433,7 @@ namespace llvm {
|
|||||||
|
|
||||||
/// getIntegerVTBitMask - Return an integer with 1's every place there are
|
/// getIntegerVTBitMask - Return an integer with 1's every place there are
|
||||||
/// bits in the specified integer value type. FIXME: Should return an apint.
|
/// bits in the specified integer value type. FIXME: Should return an apint.
|
||||||
inline uint64_t getIntegerVTBitMask() const {
|
uint64_t getIntegerVTBitMask() const {
|
||||||
assert(isInteger() && !isVector() && "Only applies to int scalars!");
|
assert(isInteger() && !isVector() && "Only applies to int scalars!");
|
||||||
return ~uint64_t(0UL) >> (64-getSizeInBits());
|
return ~uint64_t(0UL) >> (64-getSizeInBits());
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ namespace llvm {
|
|||||||
/// getIntegerVTSignBit - Return an integer with a 1 in the position of the
|
/// getIntegerVTSignBit - Return an integer with a 1 in the position of the
|
||||||
/// sign bit for the specified integer value type. FIXME: Should return an
|
/// sign bit for the specified integer value type. FIXME: Should return an
|
||||||
/// apint.
|
/// apint.
|
||||||
inline uint64_t getIntegerVTSignBit() const {
|
uint64_t getIntegerVTSignBit() const {
|
||||||
assert(isInteger() && !isVector() && "Only applies to int scalars!");
|
assert(isInteger() && !isVector() && "Only applies to int scalars!");
|
||||||
return uint64_t(1UL) << (getSizeInBits()-1);
|
return uint64_t(1UL) << (getSizeInBits()-1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user