22 auto EC = VTy->getElementCount();
30 unsigned AddrSpace = PTy->getAddressSpace();
31 return LLT::pointer(AddrSpace,
DL.getPointerSizeInBits(AddrSpace));
34 if (Ty.isSized() && !Ty.isScalableTargetExtTy()) {
37 auto SizeInBits =
DL.getTypeSizeInBits(&Ty);
38 assert(SizeInBits != 0 &&
"invalid zero-sized type");
45 if (Ty.isFloatingPointTy())
46 switch (Ty.getTypeID()) {
80 Ty.getElementCount());
110 assert((Ty.isAnyScalar() || Ty.isFloat()) &&
111 "Expected a any scalar or float type.");
115 if (Ty.isAnyScalar()) {
116 switch (Ty.getSizeInBits()) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file declares a class to represent arbitrary precision floating point values and provide a varie...
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Implement a low-level type suitable for MachineInstr level instruction selection.
static const fltSemantics & IEEEsingle()
static LLVM_ABI const llvm::fltSemantics & EnumToSemantics(Semantics S)
static const fltSemantics & IEEEquad()
static const fltSemantics & IEEEdouble()
static const fltSemantics & IEEEhalf()
A parsed version of the target data layout string in and methods for querying it.
static constexpr LLT float64()
Get a 64-bit IEEE double value.
static constexpr LLT x86fp80()
Get a 80-bit X86 floating point value.
static bool getUseExtended()
static constexpr LLT vector(ElementCount EC, unsigned ScalarSizeInBits)
Get a low-level vector of some number of elements and element width.
static constexpr LLT scalar(unsigned SizeInBits)
Get a low-level scalar or aggregate "bag of bits".
static constexpr LLT float128()
Get a 128-bit IEEE quad value.
static constexpr LLT pointer(unsigned AddressSpace, unsigned SizeInBits)
Get a low-level pointer in the given address space.
static constexpr LLT ppcf128()
Get a 128-bit PowerPC double double value.
static constexpr LLT float16()
Get a 16-bit IEEE half value.
static constexpr LLT token()
Get a low-level token; just a scalar with zero bits (or no size).
static LLT integer(unsigned SizeInBits)
static constexpr LLT bfloat16()
static constexpr LLT float32()
Get a 32-bit IEEE float value.
This is an important class for using LLVM in a threaded context.
static MVT getFloatingPointVT(unsigned BitWidth)
static MVT getVectorVT(MVT VT, unsigned NumElements)
static MVT getIntegerVT(unsigned BitWidth)
The instances of the Type class are immutable: once they are created, they are never changed.
@ HalfTyID
16-bit floating point type
@ FloatTyID
32-bit floating point type
@ BFloatTyID
16-bit floating point type (7-bit significand)
@ DoubleTyID
64-bit floating point type
@ X86_FP80TyID
80-bit floating point type (X87)
@ PPC_FP128TyID
128-bit floating point type (two 64-bits, PowerPC)
@ FP128TyID
128-bit floating point type (112-bit significand)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI const llvm::fltSemantics & getFltSemanticForLLT(LLT Ty)
Get the appropriate floating point arithmetic semantic based on the bit size of the given scalar LLT.
LLVM_ABI MVT getMVTForLLT(LLT Ty)
Get a rough equivalent of an MVT for a given LLT.
LLVM_ABI LLT getLLTForMVT(MVT Ty)
Get a rough equivalent of an LLT for a given MVT.
LLVM_ABI EVT getApproximateEVTForLLT(LLT Ty, LLVMContext &Ctx)
LLVM_ABI LLT getLLTForType(Type &Ty, const DataLayout &DL)
Construct a low-level type based on an LLVM type.
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements, bool IsScalable=false)
Returns the EVT that represents a vector NumElements in length, where each element is of type VT.
static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth)
Returns the EVT that represents an integer with the given number of bits.