14 #ifndef LLVM_SUPPORT_MACHINEVALUETYPE_H 15 #define LLVM_SUPPORT_MACHINEVALUETYPE_H 267 constexpr
MVT() =
default;
398 assert(!(EltCnt.Min & 1) &&
"Splitting vector, but not in half!");
405 return !(NElts & (NElts - 1));
615 case v5f32:
return 5;
635 case v3f32:
return 3;
695 "in codegen and has no size");
1099 static MVT getVT(
Type *Ty,
bool HandleUnknown =
false);
1103 struct mvt_iterator {
1109 bool operator!=(
const mvt_iterator &LHS)
const {
return VT != LHS.VT; }
1111 mvt_iterator& operator++() {
1114 "MVT iterator overflowed.");
1184 #endif // LLVM_CODEGEN_MACHINEVALUETYPE_H TypeSize getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
static MVT getIntegerVT(unsigned BitWidth)
unsigned Log2_32_Ceil(uint32_t Value)
Return the ceil log base 2 of the specified value, 32 if the value is zero.
bool operator>=(const MVT &S) const
bool isInteger() const
Return true if this is an integer or a vector integer type.
ElementCount getVectorElementCount() const
This class represents lattice values for constants.
static MVT getVectorVT(MVT VT, unsigned NumElements)
bool isVector() const
Return true if this is a vector value type.
bool isPow2VectorType() const
Returns true if the given vector is a power of 2.
static mvt_range fp_fixedlen_vector_valuetypes()
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
TypeSize getSizeInBits() const
Returns the size of the specified MVT in bits.
bool is256BitVector() const
Return true if this is a 256-bit vector type.
bool isFixedLengthVector() const
MVT getPow2VectorType() const
Widens the length of the given vector MVT up to the nearest power of 2 and returns that type...
static MVT getFloatingPointVT(unsigned BitWidth)
unsigned getVectorNumElements() const
bool operator>(const MVT &S) const
static constexpr TypeSize Scalable(uint64_t MinSize)
bool isValid() const
Return true if this is a valid simple valuetype.
static MVT getScalableVectorVT(MVT VT, unsigned NumElements)
constexpr MVT(SimpleValueType SVT)
MVT getHalfNumVectorElementsVT() const
Return a VT for a vector type with the same element type but half the number of elements.
APInt operator*(APInt a, uint64_t RHS)
bool is64BitVector() const
Return true if this is a 64-bit vector type.
static mvt_range integer_fixedlen_vector_valuetypes()
bool is1024BitVector() const
Return true if this is a 1024-bit vector type.
bool operator<=(const MVT &S) const
bool is2048BitVector() const
Return true if this is a 2048-bit vector type.
bool is16BitVector() const
Return true if this is a 16-bit vector type.
bool bitsLT(MVT VT) const
Return true if this has less bits than VT.
bool bitsGT(MVT VT) const
Return true if this has more bits than VT.
MVT getVectorElementType() const
bool isScalableVector() const
Return true if this is a vector value type where the runtime length is machine dependent.
bool is128BitVector() const
Return true if this is a 128-bit vector type.
bool bitsGE(MVT VT) const
Return true if this has no less bits than VT.
bool operator<(const MVT &S) const
The instances of the Type class are immutable: once they are created, they are never changed...
bool isScalarInteger() const
Return true if this is an integer, not including vectors.
static mvt_range fp_valuetypes()
bool bitsLE(MVT VT) const
Return true if this has no more bits than VT.
static mvt_range vector_valuetypes()
static MVT getVT(Type *Ty, bool HandleUnknown=false)
Return the value type corresponding to the specified type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
bool operator==(const MVT &S) const
bool isByteSized() const
Returns true if the number of bits for the type is a multiple of an 8-bit byte.
static MVT getVectorVT(MVT VT, ElementCount EC)
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
static mvt_range integer_scalable_vector_valuetypes()
static mvt_range fp_scalable_vector_valuetypes()
TypeSize getScalarSizeInBits() const
MVT getScalarType() const
If this is a vector, return the element type, otherwise return this.
static mvt_range integer_valuetypes()
A range adaptor for a pair of iterators.
bool operator!=(const MVT &S) const
bool isOverloaded() const
Return true if this is an overloaded type for TableGen.
bool is32BitVector() const
Return true if this is a 32-bit vector type.
static mvt_range all_valuetypes()
SimpleValueType Iteration.
static MVT getVectorVT(MVT VT, unsigned NumElements, bool IsScalable)
TypeSize getStoreSizeInBits() const
Return the number of bits overwritten by a store of the specified value type.
static constexpr TypeSize Fixed(uint64_t Size)
uint64_t getKnownMinSize() const
bool is512BitVector() const
Return true if this is a 512-bit vector type.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static mvt_range fixedlen_vector_valuetypes()
static mvt_range scalable_vector_valuetypes()