LLVM: llvm::Type Class Reference (original) (raw)

The instances of the Type class are immutable: once they are created, they are never changed. More...

#include "[llvm/IR/Type.h](IR%5F2Type%5F8h%5Fsource.html)"

Public Types
enum TypeID { HalfTyID = 0 , BFloatTyID, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, VoidTyID, LabelTyID, MetadataTyID, X86_AMXTyID, TokenTyID, IntegerTyID, FunctionTyID, PointerTyID, StructTyID, ArrayTyID, FixedVectorTyID, ScalableVectorTyID, TypedPointerTyID, TargetExtTyID }
Definitions of all of the base types for the Type system. More...
using subtype_iterator = Type * const *
using subtype_reverse_iterator = std::reverse_iterator<subtype_iterator>
Public Member Functions
LLVM_ABI void print (raw_ostream &O, bool IsForDebug=false, bool NoDetails=false) const
Print the current type.
LLVM_ABI void dump () const
LLVMContext & getContext () const
Return the LLVMContext in which this type was uniqued.
TypeID getTypeID () const
Return the type id for the type.
bool isVoidTy () const
Return true if this is 'void'.
bool isHalfTy () const
Return true if this is 'half', a 16-bit IEEE fp type.
bool isBFloatTy () const
Return true if this is 'bfloat', a 16-bit bfloat type.
bool is16bitFPTy () const
Return true if this is a 16-bit float type.
bool isFloatTy () const
Return true if this is 'float', a 32-bit IEEE fp type.
bool isDoubleTy () const
Return true if this is 'double', a 64-bit IEEE fp type.
bool isX86_FP80Ty () const
Return true if this is x86 long double.
bool isFP128Ty () const
Return true if this is 'fp128'.
bool isPPC_FP128Ty () const
Return true if this is powerpc long double.
bool isIEEELikeFPTy () const
Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout, and does not have non-IEEE values, such as x86_fp80's unnormal values.
bool isFloatingPointTy () const
Return true if this is one of the floating-point types.
bool isMultiUnitFPType () const
Returns true if this is a floating-point type that is an unevaluated sum of multiple floating-point units.
LLVM_ABI const fltSemantics & getFltSemantics () const
bool isX86_AMXTy () const
Return true if this is X86 AMX.
bool isTargetExtTy () const
Return true if this is a target extension type.
LLVM_ABI bool isScalableTargetExtTy () const
Return true if this is a target extension type with a scalable layout.
LLVM_ABI bool isScalableTy (SmallPtrSetImpl< const Type * > &Visited) const
Return true if this is a type whose size is a known multiple of vscale.
LLVM_ABI bool isScalableTy () const
LLVM_ABI bool containsNonGlobalTargetExtType (SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a global.
LLVM_ABI bool containsNonGlobalTargetExtType () const
LLVM_ABI bool containsNonLocalTargetExtType (SmallPtrSetImpl< const Type * > &Visited) const
Return true if this type is or contains a target extension type that disallows being used as a local.
LLVM_ABI bool containsNonLocalTargetExtType () const
bool isFPOrFPVectorTy () const
Return true if this is a FP type or a vector of FP.
bool isLabelTy () const
Return true if this is 'label'.
bool isMetadataTy () const
Return true if this is 'metadata'.
bool isTokenTy () const
Return true if this is 'token'.
bool isTokenLikeTy () const
Returns true if this is 'token' or a token-like target type.s.
bool isIntegerTy () const
True if this is an instance of IntegerType.
LLVM_ABI bool isIntegerTy (unsigned Bitwidth) const
Return true if this is an IntegerType of the given width.
bool isIntOrIntVectorTy () const
Return true if this is an integer type or a vector of integer types.
bool isIntOrIntVectorTy (unsigned BitWidth) const
Return true if this is an integer type or a vector of integer types of the given width.
bool isIntOrPtrTy () const
Return true if this is an integer type or a pointer type.
bool isFunctionTy () const
True if this is an instance of FunctionType.
bool isStructTy () const
True if this is an instance of StructType.
bool isArrayTy () const
True if this is an instance of ArrayType.
bool isPointerTy () const
True if this is an instance of PointerType.
bool isPtrOrPtrVectorTy () const
Return true if this is a pointer type or a vector of pointer types.
bool isVectorTy () const
True if this is an instance of VectorType.
LLVM_ABI bool isRISCVVectorTupleTy () const
LLVM_ABI bool canLosslesslyBitCastTo (Type *Ty) const
Return true if this type could be converted with a lossless BitCast to type 'Ty'.
LLVM_ABI bool isEmptyTy () const
Return true if this type is empty, that is, it has no elements or all of its elements are empty.
LLVM_ABI bool isFirstClassType () const
Return true if the type is "first class", meaning it is a valid type for a Value.
bool isSingleValueType () const
Return true if the type is a valid type for a register in codegen.
bool isAggregateType () const
Return true if the type is an aggregate type.
bool isSized (SmallPtrSetImpl< Type * > *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
LLVM_ABI TypeSize getPrimitiveSizeInBits () const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
LLVM_ABI unsigned getScalarSizeInBits () const LLVM_READONLY
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
LLVM_ABI int getFPMantissaWidth () const
Return the width of the mantissa of this type.
Type * getScalarType () const
If this is a vector type, return the element type, otherwise return 'this'.
subtype_iterator subtype_begin () const
subtype_iterator subtype_end () const
ArrayRef< Type * > subtypes () const
subtype_reverse_iterator subtype_rbegin () const
subtype_reverse_iterator subtype_rend () const
Type * getContainedType (unsigned i) const
This method is used to implement the type iterator (defined at the end of the file).
unsigned getNumContainedTypes () const
Return the number of types in the derived type.
LLVM_ABI unsigned getIntegerBitWidth () const
LLVM_ABI Type * getFunctionParamType (unsigned i) const
LLVM_ABI unsigned getFunctionNumParams () const
LLVM_ABI bool isFunctionVarArg () const
LLVM_ABI StringRef getStructName () const
LLVM_ABI unsigned getStructNumElements () const
LLVM_ABI Type * getStructElementType (unsigned N) const
LLVM_ABI uint64_t getArrayNumElements () const
Type * getArrayElementType () const
LLVM_ABI StringRef getTargetExtName () const
LLVM_ABI Type * getWithNewType (Type *EltTy) const
Given vector type, change the element type, whilst keeping the old number of elements.
LLVM_ABI Type * getWithNewBitWidth (unsigned NewBitWidth) const
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.
LLVM_ABI Type * getExtendedType () const
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type.
LLVM_ABI unsigned getPointerAddressSpace () const
Get the address space of this pointer or pointer vector type.
LLVM_ABI LLVM_DEPRECATED ("Use PointerType::get instead", "PointerType::get") PointerType *getPointerTo(unsigned AddrSpace=0) const
Return a pointer to the current type.
Static Public Member Functions
static LLVM_ABI Type * getPrimitiveType (LLVMContext &C, TypeID IDNumber)
Return a type based on an identifier.
static LLVM_ABI Type * getVoidTy (LLVMContext &C)
static LLVM_ABI Type * getLabelTy (LLVMContext &C)
static LLVM_ABI Type * getHalfTy (LLVMContext &C)
static LLVM_ABI Type * getBFloatTy (LLVMContext &C)
static LLVM_ABI Type * getFloatTy (LLVMContext &C)
static LLVM_ABI Type * getDoubleTy (LLVMContext &C)
static LLVM_ABI Type * getMetadataTy (LLVMContext &C)
static LLVM_ABI Type * getX86_FP80Ty (LLVMContext &C)
static LLVM_ABI Type * getFP128Ty (LLVMContext &C)
static LLVM_ABI Type * getPPC_FP128Ty (LLVMContext &C)
static LLVM_ABI Type * getX86_AMXTy (LLVMContext &C)
static LLVM_ABI Type * getTokenTy (LLVMContext &C)
static LLVM_ABI IntegerType * getIntNTy (LLVMContext &C, unsigned N)
static LLVM_ABI IntegerType * getInt1Ty (LLVMContext &C)
static LLVM_ABI IntegerType * getInt8Ty (LLVMContext &C)
static LLVM_ABI IntegerType * getInt16Ty (LLVMContext &C)
static LLVM_ABI IntegerType * getInt32Ty (LLVMContext &C)
static LLVM_ABI IntegerType * getInt64Ty (LLVMContext &C)
static LLVM_ABI IntegerType * getInt128Ty (LLVMContext &C)
template
static Type * getScalarTy (LLVMContext &C)
static LLVM_ABI Type * getFloatingPointTy (LLVMContext &C, const fltSemantics &S)
static LLVM_ABI Type * getWasm_ExternrefTy (LLVMContext &C)
static LLVM_ABI Type * getWasm_FuncrefTy (LLVMContext &C)
Protected Attributes
unsigned NumContainedTys = 0
Keeps track of how many Type*'s there are in the ContainedTys list.
Type *const * ContainedTys = nullptr
A pointer to the array of Types contained by this Type.
Friends
class LLVMContextImpl

The instances of the Type class are immutable: once they are created, they are never changed.

Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.

Definition at line 45 of file Type.h.

subtype_iterator

subtype_reverse_iterator

using llvm::Type::subtype_reverse_iterator = std::reverse_iterator<subtype_iterator>

Definition at line 369 of file Type.h.

TypeID

Definitions of all of the base types for the Type system.

Based on this value, you can cast to a class defined in DerivedTypes.h. Note: If you add an element to this, you need to add an element to the Type::getPrimitiveType function, or else things will break! Also update LLVMTypeKind and LLVMGetTypeKind () in the C binding.

Enumerator
HalfTyID 16-bit floating point type
BFloatTyID 16-bit floating point type (7-bit significand)
FloatTyID 32-bit floating point type
DoubleTyID 64-bit floating point type
X86_FP80TyID 80-bit floating point type (X87)
FP128TyID 128-bit floating point type (112-bit significand)
PPC_FP128TyID 128-bit floating point type (two 64-bits, PowerPC)
VoidTyID type with no size
LabelTyID Labels.
MetadataTyID Metadata.
X86_AMXTyID AMX vectors (8192 bits, X86 specific)
TokenTyID Tokens.
IntegerTyID Arbitrary bit width integers.
FunctionTyID Functions.
PointerTyID Pointers.
StructTyID Structures.
ArrayTyID Arrays.
FixedVectorTyID Fixed width SIMD vector type.
ScalableVectorTyID Scalable SIMD vector type.
TypedPointerTyID Typed pointer used by some GPU targets.
TargetExtTyID Target extension type.

Definition at line 54 of file Type.h.

Definition at line 93 of file Type.h.

References llvm::CallingConv::C.

Referenced by llvm::ArrayType::classof(), llvm::dxil::AnyResourceExtType::classof(), llvm::dxil::CBufferExtType::classof(), llvm::dxil::FeedbackTextureExtType::classof(), llvm::dxil::LayoutExtType::classof(), llvm::dxil::MSTextureExtType::classof(), llvm::dxil::PaddingExtType::classof(), llvm::dxil::RawBufferExtType::classof(), llvm::dxil::SamplerExtType::classof(), llvm::dxil::TextureExtType::classof(), llvm::dxil::TypedBufferExtType::classof(), llvm::FunctionType::classof(), llvm::IntegerType::classof(), llvm::PointerType::classof(), llvm::StructType::classof(), llvm::TargetExtType::classof(), llvm::TypedPointerType::classof(), llvm::VectorType::classof(), llvm::object::MinidumpFile::create(), llvm::StructType::create(), llvm::ArrayType::get(), llvm::FunctionType::get(), llvm::PointerType::get(), llvm::StructType::get(), llvm::TypedPointerType::get(), llvm::VectorType::get(), llvm::VectorType::get(), llvm::VectorType::get(), getArrayElementType(), getContainedType(), llvm::ArrayType::getElementType(), llvm::StructType::getElementType(), llvm::TypedPointerType::getElementType(), llvm::VectorType::getElementType(), getExtendedType(), getFunctionParamType(), llvm::VectorType::getInteger(), llvm::FunctionType::getParamType(), llvm::dxil::CBufferExtType::getResourceType(), llvm::dxil::MSTextureExtType::getResourceType(), llvm::dxil::RawBufferExtType::getResourceType(), llvm::dxil::TextureExtType::getResourceType(), llvm::dxil::TypedBufferExtType::getResourceType(), llvm::FunctionType::getReturnType(), getScalarTy(), getScalarType(), getStructElementType(), llvm::VectorType::getTruncatedElementVectorType(), llvm::StructType::getTypeAtIndex(), llvm::TargetExtType::getTypeParameter(), llvm::PointerType::getUnqual(), getWithNewBitWidth(), getWithNewType(), llvm::VectorType::getWithSizeAndScalar(), llvm::dxil::LayoutExtType::getWrappedType(), llvm::IntegerType::IntegerType(), llvm::dxil::RawBufferExtType::isStructured(), llvm::TypedPointerType::isValidElementType(), llvm::VectorType::isValidElementType(), LLVM_DEPRECATED(), llvm::StructType::operator=(), llvm::TypedPointerType::operator=(), print(), skipModsAndTypedefs(), and llvm::BTFParser::symbolize().

~Type()

llvm::Type::~Type ( ) protecteddefault

canLosslesslyBitCastTo()

bool Type::canLosslesslyBitCastTo ( Type * Ty ) const

Return true if this type could be converted with a lossless BitCast to type 'Ty'.

For example, i8* to i32*. BitCasts are valid for types of the same size only where no re-interpretation of the bits is done. Determine if this type could be losslessly bitcast to Ty

Definition at line 153 of file Type.cpp.

containsNonGlobalTargetExtType() [1/2]

bool Type::containsNonGlobalTargetExtType ( ) const

containsNonGlobalTargetExtType() [2/2]

Return true if this type is or contains a target extension type that disallows being used as a global.

Definition at line 74 of file Type.cpp.

containsNonLocalTargetExtType() [1/2]

bool Type::containsNonLocalTargetExtType ( ) const

containsNonLocalTargetExtType() [2/2]

dump()

getArrayElementType()

Type * llvm::Type::getArrayElementType ( ) const inline

Definition at line 408 of file Type.h.

References ArrayTyID, assert(), ContainedTys, getTypeID(), and Type().

Referenced by llvm::IRBuilderBase::CreateAggregateCast(), dynamicallyLoadArray(), fixI8UseChain(), llvm::ARMTTIImpl::getNumBytesToPadGlobalArray(), isConstantUsingVectorTy(), legalizeScalarLoadStoreOnArrays(), llvm::matchPeeledArrayPattern(), transformGlobalArray(), TypeContainsPointers(), and llvm::WebAssembly::wasmSymbolSetType().

getArrayNumElements()

uint64_t llvm::Type::getArrayNumElements ( ) const inline

getBFloatTy()

getContainedType()

Type * llvm::Type::getContainedType ( unsigned i) const inline

getContext()

Return the LLVMContext in which this type was uniqued.

Definition at line 128 of file Type.h.

Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::VPReplicateRecipe::computeCost(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::VFABI::createFunctionType(), llvm::MatrixBuilder::CreateIndex(), llvm::orc::createIRTypedAddress(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::StructType::get(), llvm::TypedPointerType::get(), llvm::ConstantExpr::getAlignOf(), getCBufRetType(), llvm::VNCoercion::getConstantMemInstValueForLoad(), llvm::BasicTTIImplBase< BasicTTIImpl >::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::VectorType::getInteger(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getNumberOfParts(), getOrCreateElementStruct(), llvm::AArch64TTIImpl::getPartialReductionCost(), llvm::X86TTIImpl::getReplicationShuffleCost(), getResRetType(), getReturnAttrs(), getReturnAttrs(), llvm::CallLowering::getReturnInfo(), llvm::ConstantExpr::getShuffleVector(), slpvectorizer::BoUpSLP::getSpillCost(), llvm::AArch64TTIImpl::getSpliceCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getSVEContainerIRType(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), slpvectorizer::BoUpSLP::getTreeCost(), llvm::VectorType::getTruncatedElementVectorType(), getTypePartition(), llvm::RISCVTTIImpl::getVectorInstrCost(), getWithNewBitWidth(), llvm::ValueAsMetadata::handleRAUW(), llvm::CallLowering::insertSRetIncomingArgument(), llvm::CallLowering::insertSRetLoads(), llvm::CallLowering::insertSRetOutgoingArgument(), llvm::CallLowering::insertSRetStores(), llvm::Instruction::isIdenticalTo(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), llvm::isUntypedEquivalentToTyExt(), llvm::TargetLowering::LowerCallTo(), llvm::FastISel::lowerCallTo(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), llvm::AArch64CallLowering::lowerReturn(), llvm::CmpInst::makeCmpResultType(), llvm::TargetLowering::ParseConstraints(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), setInfoSVEStN(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyGEPInst(), llvm::CallLowering::splitToValueTypes(), llvm::toScalarizedStructTy(), llvm::toVectorizedStructTy(), widenCImmType(), and llvm::MetadataAsValue::~MetadataAsValue().

getDoubleTy()

Definition at line 285 of file Type.cpp.

Referenced by convertImplicitDefToConstZero(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getDoubleTy(), llvm::sandboxir::Type::getDoubleTy(), getFloatTypeForLLT(), llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy(), getIntrinsicParamType(), getKeyFPValMD(), llvm::X86TTIImpl::getMinMaxReductionCost(), getOrCreateFPFastMathDefaultInfoVec(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getScalarTy(), getSVEContainerIRType(), getTypeFromOpParamType(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMDoubleTypeInContext(), LowerFPToInt(), makeDoubleDouble(), makeDoubleDoubleDouble(), makeDoubleDoubleDoubleDouble(), makeDoubleDoubleI32(), llvm::parseBasicTypeName(), ReplaceFPIntrinsicWithCall(), and shrinkFPConstant().

getExtendedType()

Type * llvm::Type::getExtendedType ( ) const inline

getFloatingPointTy()

getFloatTy()

Definition at line 284 of file Type.cpp.

Referenced by llvm::SPIRVGlobalRegistry::buildConstantFP(), convertImplicitDefToConstZero(), llvm::MDBuilder::createFPMath(), DecodeFixedType(), expandIToFP(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getCastInstrCost(), llvm::IRBuilderBase::getFloatTy(), llvm::sandboxir::Type::getFloatTy(), getFloatTypeForLLT(), llvm::AArch64TTIImpl::getFP16BF16PromoteCost(), llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMinMaxReductionCost(), getOrCreateFPFastMathDefaultInfoVec(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), llvm::RISCVTTIImpl::getRegUsageForType(), getScalarTy(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromOpParamType(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMFloatTypeInContext(), LowerFPToInt(), llvm::parseBasicTypeName(), llvm::parseTypeString(), ReplaceFPIntrinsicWithCall(), shrinkFPConstant(), llvm::UpgradeIntrinsicCall(), and upgradePTESTIntrinsic().

getFltSemantics()

Definition at line 106 of file Type.cpp.

References llvm::cast(), and llvm::VectorType::getDoubleElementsVectorType().

Referenced by atomicIgnoresDenormalModeOrFPModeIsFTZ(), computeKnownFPClass(), llvm::ConstantFoldCastInstruction(), llvm::TargetLowering::expandIS_FPCLASS(), FoldBitCast(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), isSaturatingMinMax(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

getFP128Ty()

getFPMantissaWidth()

int Type::getFPMantissaWidth ( ) const

getFunctionNumParams()

unsigned llvm::Type::getFunctionNumParams ( ) const inline

getFunctionParamType()

Type * llvm::Type::getFunctionParamType ( unsigned i) const inline

getHalfTy()

Definition at line 282 of file Type.cpp.

Referenced by convertTo16Bit(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getFloatTypeForLLT(), llvm::IRBuilderBase::getHalfTy(), llvm::sandboxir::Type::getHalfTy(), getIntrinsicParamType(), getOrCreateFPFastMathDefaultInfoVec(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromOpParamType(), llvm::GCNTTIImpl::instCombineIntrinsic(), LLVMHalfTypeInContext(), matchFPExtFromF16(), llvm::parseBasicTypeName(), llvm::parseTypeString(), shrinkFPConstant(), simplifyAMDGCNImageIntrinsic(), and upgradeX86IntrinsicCall().

getInt128Ty()

getInt16Ty()

Definition at line 295 of file Type.cpp.

Referenced by convertTo16Bit(), llvm::createProfileSamplingVar(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), expand16BitIsFinite(), expand16BitIsInf(), expand16BitIsNaN(), expand16BitIsNormal(), llvm::ConstantDataVector::get(), llvm::offloading::getEntryTy(), llvm::IRBuilderBase::getInt16Ty(), llvm::sandboxir::Type::getInt16Ty(), getIntrinsicParamType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::offloading::getOffloadingEntryInitializer(), getSVEContainerIRType(), getTypeFromOpParamType(), llvm::isBytewiseValue(), LLVMInt16TypeInContext(), llvm::parseBasicTypeName(), llvm::ARMTargetLowering::shouldConvertSplatType(), and simplifyAMDGCNImageIntrinsic().

getInt1Ty()

Definition at line 293 of file Type.cpp.

Referenced by llvm::SelectInst::areInvalidOperands(), calcPredicateUsingBooleans(), llvm::VPBlendRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::ConstantFoldCompareInstruction(), llvm::MDBuilder::createCallbackEncoding(), llvm::sampleprofutil::createFSDiscriminatorVariable(), llvm::VFABI::createFunctionType(), createMemprofHistogramFlagVar(), createRawLoad(), createTypedBufferLoad(), createTypedBufferStore(), DisableAllLoopOptsOnLoop(), llvm::AtomicInfo::EmitAtomicCompareExchangeLibcall(), fillCommonArgs(), llvm::ConstantExpr::getAlignOf(), llvm::IRBuilderBase::getAllOnesMask(), llvm::dxil::ResourceInfo::getAsMetadata(), getBinaryWithCarryType(), llvm::LoopVectorizationCostModel::getDivRemSpeculationCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getExtendedReductionCost(), llvm::ConstantInt::getFalse(), llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::IRBuilderBase::getInt1Ty(), llvm::sandboxir::Type::getInt1Ty(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), getMask(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::RISCVTTIImpl::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), getTypeFromOpParamType(), slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::SelectionDAGBuilder::handleKillDebugValue(), hoistConditionalLoadsStores(), instCombineSVECmpNE(), llvm::Instruction::isIdenticalToWhenDefined(), LLVMInt1TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::CmpInst::makeCmpResultType(), llvm::InsertCFGStrategy::mutate(), OptimizeGlobalAddressOfAllocation(), replaceWithTLIFunction(), setAssignmentTrackingModuleFlag(), SimplifyCondBranchToCondBranch(), simplifySwitchLookup(), llvm::at::trackAssignments(), tryToReplaceALMWithWideALM(), TryToShrinkGlobalToBoolean(), and llvm::InstCombinerImpl::visitAllocSite().

getInt32Ty()

Definition at line 296 of file Type.cpp.

Referenced by llvm::VPlanTransforms::addExplicitVectorLength(), addFunctionTypeMutation(), adjustInliningThresholdUsingCallee(), llvm::annotateValueSite(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), calcPredicateUsingInteger(), calculateVectorIndex(), canonicalizeToIntegerIV(), OutlinableGroup::collectGVNStoreSets(), llvm::VPInstruction::computeCost(), llvm::ConstantFoldInsertElementInstruction(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::ARMConstantPoolConstant::Create(), llvm::MDBuilder::createBranchWeights(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::IRBuilderBase::CreateConstGEP1_32(), llvm::IRBuilderBase::CreateConstGEP2_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_32(), llvm::dxil::ResourceTypeInfo::createElementStruct(), llvm::IRBuilderBase::CreateGlobalStringPtr(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), llvm::createProfileSamplingVar(), createRelLookupTable(), createRoundingModeDecoration(), createSaturatedConversionDecoration(), createStringMetadata(), createSwitchStatement(), downcastI64toI32InsertExtractElements(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(), emitTargetTaskProxyFunction(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), expandUser(), findCostForOutputBlocks(), llvm::SanitizerStatReport::finish(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), getArgTypesFromOpParamTypes(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::dxil::ResourceInfo::getAsMetadata(), getBinaryWithCarryType(), getDefaultPersonalityFn(), getDimensionsType(), getEntryPropAsMetadata(), llvm::offloading::getEntryTy(), llvm::CSKYInstrInfo::getGlobalBaseReg(), llvm::getInductionIntegerTy(), llvm::IRBuilderBase::getInt32Ty(), llvm::sandboxir::Type::getInt32Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), llvm::SelectionDAG::getMemcmp(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), getMul64(), llvm::offloading::getOffloadingEntryInitializer(), getOffsetFromIndices(), getPownType(), getPromotedType(), getResBindType(), getResPropsType(), getResRetType(), llvm::ConstantExpr::getSizeOf(), getSplitDoubleType(), getSVEContainerIRType(), getTagValueAsMetadata(), getTypeFromOpParamType(), llvm::HardwareLoopInfo::HardwareLoopInfo(), INITIALIZE_PASS(), insertCall(), llvm::BPFCoreSharedInfo::insertPassThrough(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), llvm::isBytewiseValue(), llvm::ARMTTIImpl::isHardwareLoopProfitable(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), llvm::ARMLegalizerInfo::legalizeCustom(), legalizeGetHighLowi64Bytes(), legalizeScalarLoadStoreOnArrays(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XCoreInstrInfo::loadImmediate(), llvm::XtensaInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), lowerLoadRelative(), lowerPtrAnnotation(), makeDoubleDoubleI32(), makeX86FP80X86FP80I32(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::EscapeEnumerator::Next(), llvm::parseBasicTypeName(), llvm::parseTypeString(), processBlockAddr(), replaceCalledFunction(), replaceWithGEP(), llvm::KCFIPass::run(), llvm::WasmEHPreparePass::run(), runImpl(), runPass(), llvm::scaleProfData(), SegmentOffset(), llvm::sandboxir::Region::setAux(), llvm::InstrProfCntrInstBase::setIndex(), llvm::setKCFIType(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyKnownEVL(), simplifyRelativeLoad(), splitGlobal(), splitMergedValStore(), transformRecipestoEVLRecipes(), upcastI8AllocasAndUses(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), upgradeX86IntrinsicCall(), validExtractValueIndex(), validInsertValueIndex(), validShuffleVectorIndex(), and llvm::InstCombinerImpl::visitBitCast().

getInt64Ty()

Definition at line 297 of file Type.cpp.

Referenced by addModuleFlags(), llvm::GlobalObject::addTypeMetadata(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::annotateValueSite(), llvm::memprof::buildCallstackMetadata(), llvm::MachineFunction::CallSiteInfo::CallSiteInfo(), llvm::VPInstruction::computeCost(), llvm::VPlanTransforms::convertToConcreteRecipes(), llvm::MDBuilder::createCallbackEncoding(), llvm::IRBuilderBase::CreateConstGEP1_64(), llvm::IRBuilderBase::CreateConstGEP2_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_64(), llvm::MDBuilder::createFunctionEntryCount(), createIRLevelProfileFlagVar(), llvm::MDBuilder::createIrrLoopHeaderWeight(), llvm::orc::createIRTypedAddress(), llvm::MDBuilder::createLLVMStats(), createMIBNode(), createOutlinedFunction(), llvm::MDBuilder::createPseudoProbeDesc(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::MDBuilder::createTBAAAccessTag(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::MDBuilder::createTBAATypeNode(), llvm::orc::IRSpeculationLayer::emit(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitHiddenKernelArgs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::expandDivisionUpTo64Bits(), expandProtectedFieldPtr(), llvm::expandRemainderUpTo64Bits(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), extractNumericCGTypeId(), foldInsSequenceIntoSplat(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::offloading::getEntryTy(), llvm::DIBasicType::getImpl(), llvm::IRBuilderBase::getInt64Ty(), llvm::sandboxir::Type::getInt64Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), getKeyValMD(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), getMul64(), llvm::offloading::getOffloadingEntryInitializer(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::getOrCreateSubrange(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantVector::getSplat(), llvm::InstrProfIncrementInst::getStep(), getSVEContainerIRType(), getTagValueAsMetadata(), getTypeFromOpParamType(), llvm::MIRParserImpl::initializeCallSiteInfo(), instCombineSVELast(), llvm::isBytewiseValue(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), LLVMInt64TypeInContext(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::DISubrangeType::MDNode, llvm::parseBasicTypeName(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), llvm::scaleProfData(), llvm::GlobalObject::setVCallVisibilityMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), llvm::RISCVTTIImpl::shouldConsiderAddressTypePromotion(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyX86extrq(), simplifyX86insertq(), tryToReplaceALMWithWideALM(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), llvm::UpgradeTBAANode(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitExtractElementInst().

getInt8Ty()

Definition at line 294 of file Type.cpp.

Referenced by llvm::memtag::alignAndPadAlloca(), allocateFrameInCaller(), BuildConstantFromSCEV(), classifyConstantWithOpaquePtr(), createGlobalFwdRef(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), llvm::coro::BaseCloner::deriveNewFramePointer(), llvm::orc::IRSpeculationLayer::emit(), expandProtectedFieldPtr(), fillCommonArgs(), foldGEPChainAsU8Access(), llvm::ConstantDataVector::get(), llvm::SelectionDAG::getAtomicMemset(), llvm::IRBuilderBase::getInt8Ty(), llvm::sandboxir::Type::getInt8Ty(), llvm::BasicTTIImplBase< BasicTTIImpl >::getInterleavedMemoryOpCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::SPIRVGlobalRegistry::getOrCreatePaddingType(), getPointeeTypeByCallInst(), llvm::sandboxir::Utils::getPointerDiffInBytes(), getPointerOperandAndType(), llvm::dxil::DXILOpBuilder::getResBind(), getResBindType(), getSVEContainerIRType(), getTypeFromOpParamType(), getValueOrPoison(), llvm::isBytewiseValue(), isPointerAlwaysReplaceable(), llvm::isUntypedEquivalentToTyExt(), LLVMInt8TypeInContext(), llvm::AArch64CallLowering::lowerCall(), llvm::coro::LowererBase::makeSubFnCall(), OptimizeGlobalAddressOfAllocation(), llvm::parseBasicTypeName(), llvm::SPIRV::parseBuiltinCallArgumentType(), runImpl(), runImpl(), simplifyX86extrq(), simplifyX86insertq(), llvm::coro::AsyncABI::splitCoroutine(), splitGlobal(), llvm::toTypedPointer(), tryToFoldLiveIns(), tryToOptimizeStoreOfAllocationToGlobal(), tryToShorten(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), validateLifetimeStart(), and llvm::InstCombinerImpl::visitAllocSite().

getIntegerBitWidth()

unsigned llvm::Type::getIntegerBitWidth ( ) const inline

Definition at line 99 of file DerivedTypes.h.

References llvm::cast().

Referenced by canBeCheaplyTransformed(), computeKnownFPClass(), eliminateDeadSwitchCases(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::RecurrenceDescriptor::getSentinelValue(), hasSameExtUse(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), matchSubIntegerPackFromVector(), llvm::HashRecognize::recognizeCRC(), llvm::replaceAllDbgUsesWith(), simplifyX86varShift(), unpackFromRegLoc(), and unpackFromRegLoc().

getIntNTy()

Definition at line 300 of file Type.cpp.

Referenced by slpvectorizer::BoUpSLP::analyzeConstantStrideCandidate(), buildFrameType(), checkVectorTypesForPromotion(), computeRecurrenceType(), createBitOrPointerCast(), createCmpXchgInstFun(), llvm::FixedPointBuilder< IRBuilderTy >::CreateFloatingToFixed(), createMaskInstrs(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), expandIsFPClass(), llvm::X86TTIImpl::getArithmeticReductionCost(), getConstantVector(), llvm::IntegerType::getExtendedType(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::IRBuilderBase::getIntNTy(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::DataLayout::getLargestLegalIntType(), getMemCmpLoad(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getReplicationShuffleCost(), getScalarTy(), llvm::DataLayout::getSmallestLegalIntType(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::ScalarEvolution::getTripCountFromExitCount(), getWithNewBitWidth(), inlineGetBaseAndOffset(), llvm::isBytewiseValue(), isIntegerWideningViable(), isValidProtoForSizeReturningNew(), isVectorPromotionViableForSlice(), llvm::LegalizerHelper::libcall(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), lowerKernelArguments(), makeStatepointExplicitImpl(), mergeConsecutivePartStores(), llvm::parseBasicTypeName(), processConstantStringArg(), promoteAllocaUserToVector(), llvm::recognizeBSwapOrBitReverseIdiom(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), simplifyX86movmsk(), and splitMergedValStore().

getLabelTy()

getMetadataTy()

getNumContainedTypes()

unsigned llvm::Type::getNumContainedTypes ( ) const inline

getPointerAddressSpace()

unsigned llvm::Type::getPointerAddressSpace ( ) const inline

Get the address space of this pointer or pointer vector type.

Definition at line 773 of file DerivedTypes.h.

References llvm::cast(), and getScalarType().

Referenced by AddNonNullPointer(), llvm::AMDGPUAAResult::alias(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), aspaceWrapOperand(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), classifyGlobalCtorPointerType(), llvm::orc::cloneGlobalAliasDecl(), collectMemAccessInfo(), llvm::ConstantFoldCastOperand(), convertScratchAtomicToFlatAtomic(), convertValue(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::expandMemMoveAsLoop(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), llvm::getBaseObjectSize(), llvm::CastInst::getCastOpcode(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::RISCVTTIImpl::getIntImmCostInst(), getMemSetPattern16Value(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::GEPOperator::getPointerAddressSpace(), llvm::GetElementPtrInst::getPointerAddressSpace(), llvm::LoadInst::getPointerAddressSpace(), llvm::PtrToAddrInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::getPointersDiff(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), HandleByValArgument(), handleSpaceCheckIntrinsics(), inlineGetBaseAndOffset(), llvm::AMDGPU::instrumentAddressImpl(), llvm::AMDGPU::isDynamicLDS(), llvm::CastInst::isEliminableCastPair(), llvm::AANoAlias::isImpliedByIR(), llvm::AANonNull::isImpliedByIR(), isInvariantLoad(), isKnownNonNullFromDominatingCondition(), isKnownNonZeroFromAssume(), llvm::AMDGPU::isLDSVariableToLower(), isNoopPtrIntCastPair(), isNoWrap(), isSupportedAddrspace(), isUnsupportedAMDGPUAddrspace(), llvm::TargetLowering::LowerCallTo(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), markPointerAsAS(), maybePrintCallAddrSpace(), optimizeOnceStoredGlobal(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::NVPTXTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::SPIRVTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::CallLowering::setArgFlags(), shouldInstrumentReadWriteFromAddress(), simplifyGEPInst(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), visitICmpLoadOperand(), llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitReturnInst().

getPPC_FP128Ty()

getPrimitiveSizeInBits()

TypeSize Type::getPrimitiveSizeInBits ( ) const

Return the basic size of this type if it is a primitive type.

These are fixed by LLVM and are not target-dependent. This will return zero if the type does not have a size or is not a primitive type.

If this is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.

Note that this may not reflect the size of memory allocated for an instance of the type or the number of bytes that are written when an instance of the type is stored to memory. The DataLayout class provides additional query functions to provide this information.

Definition at line 197 of file Type.cpp.

Referenced by llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), areExtractShuffleVectors(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canWidenLoad(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), collectInsertionElements(), combineConstantPoolLoads(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), convertStrToInt(), createCmpXchgInstFun(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPPERMMask(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), expandIsFPClass(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpEquality(), foldIdentityExtractShuffle(), foldLoadsRecursive(), foldVecTruncToExtElt(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantDataSequential::getElementByteSize(), llvm::VectorType::getInteger(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getPartialReductionCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), getTargetConstantBitsFromNode(), llvm::ScalarEvolution::getTripCountFromExitCount(), llvm::VectorType::getTruncatedElementVectorType(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::VectorType::getWithSizeAndScalar(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::CastInst::isBitCastable(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isZExtFree(), matchPartStore(), printConstant(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), rebuildSplatCst(), rebuildZeroUpperCst(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedLoad(), scalarizeMaskedStore(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyICmpInst(), simplifySwitchLookup(), simplifyX86immShift(), simplifyX86pack(), upcastI8AllocasAndUses(), upgradeAVX512MaskToSelect(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), upgradeX86IntrinsicCall(), and upgradeX86VPERMT2Intrinsics().

getPrimitiveType()

Return a type based on an identifier.

Definition at line 38 of file Type.cpp.

getScalarSizeInBits()

unsigned Type::getScalarSizeInBits ( ) const

If this is a vector type, return the getPrimitiveSizeInBits value for the element type.

Otherwise return the getPrimitiveSizeInBits value for this type.

Definition at line 230 of file Type.cpp.

Referenced by llvm::canConstantBeExtended(), canEvaluateShiftedShift(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeSaturatedAddSigned(), canScalarizeAccess(), canTryToConstantAddTwoShiftAmounts(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), compareCmp(), llvm::VPWidenSelectRecipe::computeCost(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsMul(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::SelectionDAG::ComputeNumSignBits(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldIntegerCast(), ConvertShiftToMul(), llvm::copyRangeMetadata(), llvm::IRBuilderBase::CreateFPCast(), llvm::MatrixBuilder::CreateIndex(), llvm::MatrixBuilder::CreateIndexAssumption(), llvm::IRBuilderBase::CreateIntCast(), createScalarIVSteps(), llvm::VPBuilder::createScalarZExtOrTrunc(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateStepVector(), llvm::CastInst::CreateTruncOrBitCast(), llvm::IRBuilderBase::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrTrunc(), decompose(), dropRedundantMaskingOfLeftShiftInput(), llvm::VPScalarIVStepsRecipe::execute(), expandVPWidenIntOrFpInduction(), FlattenLoopPair(), FoldBitCast(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldItoFPtoI(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpLshrAshr(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldTruncShuffle(), foldVecExtTruncToExtElt(), llvm::TargetLoweringBase::getBitWidthForCttzElements(), llvm::AArch64TTIImpl::getCastInstrCost(), getElSizeLog2Diff(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), getHistogramCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::GCNTTIImpl::getLoadVectorFactor(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::AArch64TTIImpl::getPartialReductionCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), getTargetConstantBitsFromNode(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::getWiderInductionTy(), llvm::VectorType::getWithSizeAndScalar(), llvm::X86TTIImpl::instCombineIntrinsic(), isConsecutiveInterleaveGroup(), llvm::CastInst::isEliminableCastPair(), llvm::SystemZTTIImpl::isFoldableLoad(), llvm::AArch64TTIImpl::isLegalBroadcastLoad(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::CastInst::isNoopCast(), llvm::AMDGPUTargetLowering::isTruncateFree(), llvm::AMDGPUTargetLowering::isZExtFree(), matchOrConcat(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), processAShr(), processTrunc(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::salvageDebugInfoImpl(), simplifyAndInst(), simplifyAShrInst(), llvm::simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyRecipe(), simplifyUnaryIntrinsic(), simplifyX86pack(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::Constant::toConstantRange(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToRecognizeTableBasedCttz(), upgradeAVX512MaskToSelect(), upgradeX86IntrinsicCall(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().

getScalarTy()

template

getScalarType()

Type * Type::getScalarType ( ) const inline

If this is a vector type, return the element type, otherwise return 'this'.

Definition at line 352 of file Type.h.

References getContainedType(), getScalarType(), inline, isVectorTy(), and Type().

Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), calculateGEPOffset(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), canonicalizeGEPOfConstGEPI8(), llvm::CastInst::castIsValid(), computeKnownBits(), computeKnownBitsFromOperator(), computeKnownFPClass(), slpvectorizer::BoUpSLP::computeMinimumValueSizes(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughBitcast(), llvm::IRBuilderBase::CreateStepVector(), createTypedBufferStore(), decompose(), llvm::emitGEPOffset(), evaluateInDifferentElementOrder(), llvm::VPScalarIVStepsRecipe::execute(), expandAbs(), expandAnyOrAllIntrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandIntegerDotIntrinsic(), expandLogIntrinsic(), llvm::TargetLowering::expandMultipleResultFPLibCall(), expandNormalizeIntrinsic(), expandSignIntrinsic(), FoldBitCast(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::InstCombinerImpl::foldVectorBinop(), slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), llvm::AArch64TTIImpl::getArithmeticReductionCost(), getCmpOpsType(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::Constant::getIntegerValue(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), getOneFP(), llvm::VectorType::getOneNthElementsVectorType(), getPointerAddressSpace(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), getScalarType(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::TargetTransformInfo::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), slpvectorizer::BoUpSLP::getTreeCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getWidenedType(), llvm::VectorType::getWithSizeAndScalar(), getZeroFP(), hasSameExtUse(), isFPOrFPVectorTy(), llvm::isImpliedCondition(), isIntOrIntVectorTy(), isIntOrIntVectorTy(), isKnownNonZeroFromOperator(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalMaskedStore(), isPtrOrPtrVectorTy(), isSupportedAddrspace(), llvm::HexagonSubtarget::isTypeForHVX(), isUnsupportedAMDGPUAddrspace(), optimizeSection(), replaceWithCallToVeclib(), resourceAccessNeeds64BitExpansion(), rmwOpMayLowerToLibcall(), llvm::CallLowering::setArgFlags(), llvm::ARMTargetLowering::shouldConvertSplatType(), shouldInstrumentReadWriteFromAddress(), shrinkInsertElt(), shrinkSplatShuffle(), simplifyAMDGCNImageIntrinsic(), simplifyGEPInst(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

getStructElementType()

Type * llvm::Type::getStructElementType ( unsigned N) const inline

getStructName()

StringRef llvm::Type::getStructName ( ) const inline

getStructNumElements()

unsigned llvm::Type::getStructNumElements ( ) const inline

getSubclassData()

unsigned llvm::Type::getSubclassData ( ) const inlineprotected

getTargetExtName()

StringRef llvm::Type::getTargetExtName ( ) const inline

getTokenTy()

getTypeID()

TypeID llvm::Type::getTypeID ( ) const inline

Return the type id for the type.

This will return one of the TypeID enum elements defined above.

Definition at line 136 of file Type.h.

Referenced by llvm::FunctionComparator::cmpTypes(), compareCmp(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), getArrayElementType(), llvm::ExecutionEngine::getConstantValue(), getOneFP(), llvm::getPointerAddressSpace(), llvm::VectorType::getTruncatedElementVectorType(), getZeroFP(), llvm::SPIRV::handle(), llvm::SPIRV::irhandle_explict_layout_type(), is16bitFPTy(), isAggregateType(), isArrayTy(), isBFloatTy(), isDoubleTy(), isFloatingPointTy(), isFloatTy(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIEEELikeFPTy(), isIntegerTy(), isLabelTy(), isMetadataTy(), isMultiUnitFPType(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), isTargetExtTy(), isTokenTy(), isVectorTy(), isVoidTy(), isX86_AMXTy(), isX86_FP80Ty(), needsFPFromSig(), needsFPStubFromParams(), ReplaceFPIntrinsicWithCall(), rmwOpMayLowerToLibcall(), llvm::MCJIT::runFunction(), TypeContainsPointers(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), and llvm::Interpreter::visitShuffleVectorInst().

getVoidTy()

Definition at line 280 of file Type.cpp.

Referenced by llvm::VPHistogramRecipe::computeCost(), llvm::VPReplicateRecipe::computeCost(), createBPFUnreachable(), llvm::MIRParserImpl::createDummyFunction(), CreateFailBB(), createFrameHelperMachineFunction(), llvm::IRBuilderBase::CreateFree(), llvm::RandomIRBuilder::createFunctionDefinition(), llvm::createMemLibcall(), llvm::orc::ReOptimizeLayer::createReoptimizeCall(), llvm::createSanitizerCtor(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::declareSanitizerInitFunction(), DecodeFixedType(), llvm::orc::IRSpeculationLayer::emit(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), emitInlineAsm(), emitSMEStateSaveRestore(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::VPInterleaveEVLRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), llvm::TargetLowering::expandMultipleResultFPLibCall(), expandToSwitch(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), getFreshReductionFunc(), llvm::RTLIB::RuntimeLibcallsInfo::getFunctionTy(), getFunctionTypeFromAsyncSuspend(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::SelectionDAG::getMemset(), llvm::getOrCreateSanitizerCtorAndInitFunctions(), getOrInsertValueProfilingCall(), llvm::coro::Shape::getResumeFunctionType(), llvm::EVT::getTypeForEVT(), getTypeFromOpParamType(), llvm::IRBuilderBase::getVoidTy(), InsertCall(), insertCall(), insertCallBeforeInstruction(), insertInlineAsmProcess(), InsertSafepointPoll(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::ARMTargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), insertUseHolderAfter(), LLVMVoidTypeInContext(), lowerAwaitSuspend(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), llvm::TargetLowering::LowerCallTo(), llvm::VETargetLowering::lowerDYNAMIC_STACKALLOC(), llvm::SparcTargetLowering::LowerF128Op(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SelectionDAG::makeStateFunctionCall(), makeStatepointExplicitImpl(), llvm::InsertFunctionStrategy::mutate(), llvm::parseBasicTypeName(), llvm::parseTypeString(), llvm::DeclareRuntimeLibcallsPass::run(), runImpl(), and llvm::Interpreter::visitReturnInst().

getWasm_ExternrefTy()

getWasm_FuncrefTy()

getWithNewBitWidth()

Type * llvm::Type::getWithNewBitWidth ( unsigned NewBitWidth) const inline

Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.

Definition at line 766 of file DerivedTypes.h.

References assert(), getContext(), getIntNTy(), getWithNewType(), isIntOrIntVectorTy(), and Type().

Referenced by extractIntPart(), llvm::InstCombinerImpl::foldICmpShlConstant(), foldMulHigh(), llvm::AArch64TTIImpl::getCastInstrCost(), llvm::X86TTIImpl::getCastInstrCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), llvm::X86TTIImpl::getIntrinsicInstrCost(), and llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost().

getWithNewType()

Type * llvm::Type::getWithNewType ( Type * EltTy) const inline

Given vector type, change the element type, whilst keeping the old number of elements.

For non-vectors simply returns EltTy.

Definition at line 760 of file DerivedTypes.h.

References llvm::dyn_cast(), llvm::VectorType::get(), and Type().

Referenced by llvm::AArch64TTIImpl::getFP16BF16PromoteCost(), llvm::RISCVTTIImpl::getTgtMemIntrinsic(), getWithNewBitWidth(), shrinkSplatShuffle(), simplifyAMDGCNImageIntrinsic(), llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitPtrToInt().

getX86_AMXTy()

getX86_FP80Ty()

is16bitFPTy()

bool llvm::Type::is16bitFPTy ( ) const inline

isAggregateType()

bool llvm::Type::isAggregateType ( ) const inline

isArrayTy()

bool llvm::Type::isArrayTy ( ) const inline

isBFloatTy()

bool llvm::Type::isBFloatTy ( ) const inline

Return true if this is 'bfloat', a 16-bit bfloat type.

Definition at line 145 of file Type.h.

References BFloatTyID, and getTypeID().

Referenced by emitDebugValueComment(), expandIToFP(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::RISCVTTIImpl::getRegUsageForType(), isLegalElementTypeForRVV(), isLegalMaskedLoadStore(), isV2BF16(), isV2F16OrV2BF16(), and upgradeNVVMIntrinsicCall().

isDoubleTy()

bool llvm::Type::isDoubleTy ( ) const inline

Return true if this is 'double', a 64-bit IEEE fp type.

Definition at line 156 of file Type.h.

References DoubleTyID, and getTypeID().

Referenced by emitDebugValueComment(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandIToFP(), getCBufRetType(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::ExecutionEngine::LoadValueFromMemory(), optimizeDoubleFP(), printConstant(), rebuildConstant(), and resourceAccessNeeds64BitExpansion().

isEmptyTy()

bool Type::isEmptyTy ( ) const

isFirstClassType()

bool Type::isFirstClassType ( ) const

isFloatingPointTy()

bool llvm::Type::isFloatingPointTy ( ) const inline

Return true if this is one of the floating-point types.

Definition at line 184 of file Type.h.

References getTypeID(), isIEEELikeFPTy(), PPC_FP128TyID, and X86_FP80TyID.

Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), llvm::VPReductionRecipe::computeCost(), convertTo16Bit(), llvm::VPlanTransforms::convertToConcreteRecipes(), createBitOrPointerCast(), createCmpXchgInstFun(), createMaskInstrs(), emitTransformedIndex(), llvm::VPScalarIVStepsRecipe::execute(), expandAnyOrAllIntrinsic(), expandFloatDotIntrinsic(), expandSignIntrinsic(), expandVPWidenIntOrFpInduction(), foldSelectShuffleWith1Binop(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::HexagonTTIImpl::getMemoryOpCost(), getMemSetPatternValue(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::VectorType::getTruncatedElementVectorType(), llvm::X86TTIImpl::getVectorInstrCost(), isFPOrFPVectorTy(), llvm::InductionDescriptor::isInductionPHI(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), optimizeLatchExitInductionUser(), llvm::TargetLoweringBase::shouldCastAtomicLoadInIR(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), llvm::TargetLoweringBase::shouldConvertPhiType(), simplifyAMDGCNImageIntrinsic(), supportedAddressingMode(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

isFloatTy()

bool llvm::Type::isFloatTy ( ) const inline

Return true if this is 'float', a 32-bit IEEE fp type.

Definition at line 153 of file Type.h.

References FloatTyID, and getTypeID().

Referenced by canContractSqrtToRsq(), emitDebugValueComment(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::ExecutionEngine::LoadValueFromMemory(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), and upgradeAMDGCNIntrinsicCall().

isFP128Ty()

bool llvm::Type::isFP128Ty ( ) const inline

isFPOrFPVectorTy()

bool llvm::Type::isFPOrFPVectorTy ( ) const inline

Return true if this is a FP type or a vector of FP.

Definition at line 225 of file Type.h.

References getScalarType(), and isFloatingPointTy().

Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), llvm::CastInst::castIsValid(), CC_MipsO32(), llvm::ConstantFoldCompareInstruction(), FoldBitCast(), foldBitCastBitwiseLogic(), foldCopySignIdioms(), llvm::HexagonTTIImpl::getCastInstrCost(), llvm::isImpliedCondition(), and upgradeAVX512MaskToSelect().

isFunctionTy()

bool llvm::Type::isFunctionTy ( ) const inline

isFunctionVarArg()

bool llvm::Type::isFunctionVarArg ( ) const inline

isHalfTy()

bool llvm::Type::isHalfTy ( ) const inline

Return true if this is 'half', a 16-bit IEEE fp type.

Definition at line 142 of file Type.h.

References getTypeID(), and HalfTyID.

Referenced by canContractSqrtToRsq(), canSafelyConvertTo16Bit(), emitDebugValueComment(), expandIToFP(), getCBufRetType(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::X86TTIImpl::getStoreMinimumVF(), getTargetConstantBitsFromNode(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::ARMTargetLowering::isLegalInterleavedAccessType(), isLegalMaskedLoadStore(), isV2F16(), isV2F16OrV2BF16(), optimizeSection(), printConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), and simplifyAMDGCNImageIntrinsic().

isIEEELikeFPTy()

bool llvm::Type::isIEEELikeFPTy ( ) const inline

isIntegerTy() [1/2]

bool llvm::Type::isIntegerTy ( ) const inline

True if this is an instance of IntegerType.

Definition at line 240 of file Type.h.

References getTypeID(), and IntegerTyID.

Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), canConvertValue(), llvm::canPeelLastIteration(), canSafelyConvertTo16Bit(), llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::VPExpressionRecipe::computeCost(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldLoadThroughBitcast(), convertTo16Bit(), countToEliminateCompares(), llvm::CastInst::CreateBitOrPointerCast(), createNodeForSelectViaUMinSeq(), createScalarIVSteps(), llvm::decomposeLinearExpression(), emitTransformedIndex(), llvm::VPScalarIVStepsRecipe::execute(), expandBounds(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandIntegerDotIntrinsic(), expandSignIntrinsic(), expandVPWidenIntOrFpInduction(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), foldTwoEntryPHINode(), genLoopLimit(), getAISize(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::CastInst::getCastOpcode(), getCBufRetType(), llvm::getConstantDataArrayInfo(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getExtractElement(), getHistogramCost(), llvm::DataLayout::getIndexedOffsetInType(), llvm::ConstantExpr::getInsertElement(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::ARMTTIImpl::getNumBytesToPadGlobalArray(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr(), llvm::RISCVTTIImpl::getPartialReductionCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::AArch64TTIImpl::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::hasIterationCountInvariantInParent(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::CastInst::isEliminableCastPair(), llvm::InductionDescriptor::isInductionPHI(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntOrIntVectorTy(), isIntOrIntVectorTy(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::X86TTIImpl::isProfitableToSinkOperands(), isSingleValueType(), llvm::ConstantDataSequential::isString(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::AAPotentialConstantValues::isValidIRPositionForInit(), llvm::AAValueConstantRange::isValidIRPositionForInit(), isVectorPromotionViableForSlice(), llvm::AArch64TargetLowering::isZExtFree(), llvm::MSP430TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::NVPTXTargetLowering::LowerCall(), llvm::SITargetLowering::LowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::AMDGPUCallLowering::lowerTailCall(), llvm::IntrinsicLowering::LowerToByteSwap(), matchIntrinsicType(), matchPartStore(), optimizeLatchExitInductionUser(), printConstant(), llvm::replaceAllDbgUsesWith(), resourceAccessNeeds64BitExpansion(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), runOnKernelFunction(), shouldCanonicalizeGEPToPtrAdd(), llvm::TargetLoweringBase::shouldConvertPhiType(), llvm::SystemZTargetLowering::shouldExpandAtomicRMWInIR(), shouldUpgradeNVPTXTMAG2SIntrinsics(), llvm::LoongArchTargetLowering::signExtendConstant(), llvm::RISCVTargetLowering::signExtendConstant(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), simplifyRecipe(), simplifyX86addcarry(), simplifyX86immShift(), splitMergedValStore(), swapICmpOperandsToExposeCSEOpportunities(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToRecognizeTableBasedCttz(), unpackFromRegLoc(), unpackFromRegLoc(), updatePredecessorProfileMetadata(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), upgradeX86IntrinsicCall(), upgradeX86IntrinsicsWith8BitMask(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::InstCombinerImpl::visitInsertElementInst().

isIntegerTy() [2/2]

isIntOrIntVectorTy() [1/2]

bool llvm::Type::isIntOrIntVectorTy ( ) const inline

Return true if this is an integer type or a vector of integer types.

Definition at line 246 of file Type.h.

References getScalarType(), and isIntegerTy().

Referenced by llvm::CastInst::castIsValid(), llvm::ConstantFoldCompareInstruction(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateZExtOrTrunc(), foldAndOrOfICmpEqConstantAndICmp(), FoldBitCast(), foldBitCastBitwiseLogic(), llvm::InstCombinerImpl::foldICmpAddConstant(), foldICmpEqualityWithOffset(), foldSelectICmpLshrAshr(), foldTruncShuffle(), llvm::ConstantExpr::get(), getBoolVecFromMask(), llvm::VectorType::getExtendedElementVectorType(), getExtendedType(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::ConstantExpr::getPtrToAddr(), llvm::ConstantExpr::getPtrToInt(), getSafeDivisor(), llvm::GetElementPtrInst::getTypeAtIndex(), llvm::SystemZTTIImpl::getVectorInstrCost(), getWithNewBitWidth(), llvm::CastInst::isEliminableCastPair(), isKnownNonEqual(), isKnownNonZeroFromOperator(), llvm::DemandedBits::isUseDead(), llvm::recognizeBSwapOrBitReverseIdiom(), simplifyAddInst(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpOfBools(), simplifyMulInst(), simplifyOrInst(), simplifySelectWithICmpCond(), simplifySubInst(), slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitLShr().

isIntOrIntVectorTy() [2/2]

bool llvm::Type::isIntOrIntVectorTy ( unsigned BitWidth) const inline

isIntOrPtrTy()

bool llvm::Type::isIntOrPtrTy ( ) const inline

isLabelTy()

bool llvm::Type::isLabelTy ( ) const inline

isMetadataTy()

bool llvm::Type::isMetadataTy ( ) const inline

isMultiUnitFPType()

bool llvm::Type::isMultiUnitFPType ( ) const inline

Returns true if this is a floating-point type that is an unevaluated sum of multiple floating-point units.

An example of such a type is ppc_fp128, also known as double-double, which consists of two IEEE 754 doubles.

Definition at line 193 of file Type.h.

References getTypeID(), and PPC_FP128TyID.

isPointerTy()

bool llvm::Type::isPointerTy ( ) const inline

True if this is an instance of PointerType.

Definition at line 267 of file Type.h.

References getTypeID(), and PointerTyID.

Referenced by llvm::AliasSetTracker::add(), addConditions(), llvm::AAResults::alias(), BuildConstantFromSCEV(), canBeCheaplyTransformed(), canConvertValue(), llvm::canReplacePointersIfEqual(), CompareValueComplexity(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldLoadThroughBitcast(), copyFunctionByValArgs(), llvm::copyMetadataForLoad(), llvm::CastInst::CreateBitOrPointerCast(), createBitOrPointerCast(), createCmpXchgInstFun(), createOutlinedFunction(), llvm::decomposeLinearExpression(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), llvm::emitWcsLen(), evaluateICmpRelation(), expandVPWidenPointerInduction(), fixFunctionTypeIfPtrArgs(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::MemoryLocation::getForDest(), getFunctionPointerElemType(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::AAResults::getModRefInfo(), llvm::BasicAAResult::getModRefInfo(), llvm::ScalarEvolution::getMulExpr(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::getPtrStride(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::getUnderlyingObject(), llvm::Attributor::identifyDefaultAbstractAttributes(), llvm::SCEVWrapPredicate::implies(), llvm::inferAttribute(), llvm::MemoryDependenceResults::invalidateCachedPointerInfo(), llvm::InductionDescriptor::isInductionPHI(), llvm::InductionDescriptor::isInductionPHI(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::isLibFreeFunction(), isPtrOrPtrVectorTy(), isSingleValueType(), llvm::AADereferenceable::isValidIRPositionForInit(), llvm::AAInvariantLoadPointer::isValidIRPositionForInit(), llvm::AAMemoryBehavior::isValidIRPositionForInit(), llvm::AANoAlias::isValidIRPositionForInit(), llvm::AANoCapture::isValidIRPositionForInit(), isVectorPromotionViable(), llvm::MipsCallLowering::lowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::SCEVPatternMatch::SCEVURem_match< Op0_t, Op1_t >::match(), optimizeLatchExitInductionUser(), optimizeOnceStoredGlobal(), promoteAllocaUserToVector(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::MCJIT::runFunction(), runOnDeviceFunction(), runOnKernelFunction(), llvm::salvageDebugInfoImpl(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), shouldConvertToRelLookupTable(), llvm::tryPromoteCall(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitPHINode(), and llvm::InstCombinerImpl::visitReturnInst().

isPPC_FP128Ty()

bool llvm::Type::isPPC_FP128Ty ( ) const inline

isPtrOrPtrVectorTy()

bool llvm::Type::isPtrOrPtrVectorTy ( ) const inline

Return true if this is a pointer type or a vector of pointer types.

Definition at line 270 of file Type.h.

References getScalarType(), and isPointerTy().

Referenced by canConvertValue(), llvm::CastInst::castIsValid(), llvm::VNCoercion::coerceAvailableValueToLoadType(), combineLoadToOperationType(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::CastInst::isEliminableCastPair(), isKnownNonZeroFromOperator(), llvm::AAAddressSpace::isValidIRPositionForInit(), llvm::AAAlign::isValidIRPositionForInit(), llvm::AAAllocationInfo::isValidIRPositionForInit(), llvm::AAMemoryLocation::isValidIRPositionForInit(), llvm::AANoAliasAddrSpace::isValidIRPositionForInit(), llvm::AANoFree::isValidIRPositionForInit(), llvm::AANonNull::isValidIRPositionForInit(), llvm::AANoSync::isValidIRPositionForInit(), llvm::AAPointerInfo::isValidIRPositionForInit(), llvm::AAPrivatizablePtr::isValidIRPositionForInit(), llvm::AAUnderlyingObjects::isValidIRPositionForInit(), promoteAllocaUserToVector(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().

isRISCVVectorTupleTy()

bool Type::isRISCVVectorTupleTy ( ) const

isScalableTargetExtTy()

bool Type::isScalableTargetExtTy ( ) const

isScalableTy() [1/2]

bool Type::isScalableTy ( ) const

isScalableTy() [2/2]

Return true if this is a type whose size is a known multiple of vscale.

Definition at line 61 of file Type.cpp.

Referenced by areExtractShuffleVectors(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canReplaceGEPIdxWithZero(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), llvm::memtag::StackInfoBuilder::getAllocaInterestingness(), llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::TargetTransformInfo::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), isAlwaysFoldable(), llvm::ConstantExpr::isSupportedGetElementPtr(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), shouldCanonicalizeGEPToPtrAdd(), shouldConvertImpl(), and splitMergedValStore().

isSingleValueType()

bool llvm::Type::isSingleValueType ( ) const inline

Return true if the type is a valid type for a register in codegen.

This includes all first-class types except struct and array types.

Definition at line 296 of file Type.h.

References isFloatingPointTy(), isIntegerTy(), isPointerTy(), isTargetExtTy(), isVectorTy(), and isX86_AMXTy().

Referenced by canConvertValue(), getAggregateSize(), legalizeScalarLoadStoreOnArrays(), llvm::InlineAsmLowering::lowerInlineAsm(), llvm::TargetLowering::ParseConstraints(), processInternalGlobal(), and llvm::SCCPInstVisitor::trackValueOfGlobalVariable().

isSized()

Return true if it makes sense to take the size of this type.

To get the actual size for a particular target, it is reasonable to use the DataLayout subsystem to do this.

Definition at line 311 of file Type.h.

References ArrayTyID, getTypeID(), IntegerTyID, isFloatingPointTy(), isVectorTy(), PointerTyID, StructTyID, TargetExtTyID, and X86_AMXTyID.

Referenced by canReplaceGEPIdxWithZero(), computeKnownBitsFromOperator(), llvm::AsmPrinter::emitGlobalAlias(), llvm::memtag::StackInfoBuilder::getAllocaInterestingness(), llvm::getBaseObjectSize(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), IsSmallObject(), llvm::TargetLowering::ParseConstraints(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), tocDataChecks(), valueEscapes(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitArgument(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().

isStructTy()

bool llvm::Type::isStructTy ( ) const inline

True if this is an instance of StructType.

Definition at line 261 of file Type.h.

References getTypeID(), and StructTyID.

Referenced by llvm::IRBuilderBase::CreateAggregateCast(), createWrapper(), llvm::VPInstruction::execute(), llvm::RISCVTargetLowering::fallBackToDAGISel(), foldGEPOfPhi(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), insertSinCosCall(), isConstantUsingVectorTy(), isStructure(), isVectorPromotionViableForSlice(), llvm::matchPeeledArrayPattern(), llvm::VPlanTransforms::materializePacksAndUnpacks(), and false::GepNode::operator<<.

isTargetExtTy()

bool llvm::Type::isTargetExtTy ( ) const inline

isTokenLikeTy()

bool Type::isTokenLikeTy ( ) const

Returns true if this is 'token' or a token-like target type.s.

Definition at line 1065 of file Type.cpp.

isTokenTy()

bool llvm::Type::isTokenTy ( ) const inline

isVectorTy()

bool llvm::Type::isVectorTy ( ) const inline

True if this is an instance of VectorType.

Definition at line 273 of file Type.h.

References FixedVectorTyID, getTypeID(), and ScalableVectorTyID.

Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), canEvaluateShuffled(), canonicalizeBitCastExtElt(), CC_MipsO32(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromOperator(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), createCmpXchgInstFun(), llvm::createFindLastIVReduction(), createLogicFromTable(), llvm::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedStore(), createMaskInstrs(), llvm::createMemCpyLoopKnownSize(), llvm::CastInst::CreatePointerCast(), llvm::emitGEPOffset(), llvm::VPInstruction::execute(), llvm::VPWidenCallRecipe::execute(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFloatDotIntrinsic(), expandIntegerDotIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findForkedSCEVs(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::RISCVTTIImpl::getAddressComputationCost(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::CastInst::getCastOpcode(), getCmpOpsType(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::ARMTTIImpl::getGatherScatterOpCost(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::ConstantExpr::getInsertElement(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::RISCVTTIImpl::getMemoryOpCost(), llvm::SPIRVGlobalRegistry::getOrCreateConsIntVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), getScalarType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), slpvectorizer::BoUpSLP::getSpillCost(), getTargetConstantBitsFromNode(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getUniformBase(), getValueOnEdge(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getVectorIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::X86TTIImpl::instCombineIntrinsic(), isConstantUsingVectorTy(), llvm::isImpliedCondition(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::SCEVPatternMatch::bind_cst_ty::match(), llvm::SCEVPatternMatch::cst_pred_ty< Predicate >::match(), processSelect(), replaceWithCallToVeclib(), llvm::salvageDebugInfoImpl(), shouldConvertImpl(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyGEPInst(), simplifyX86immShift(), transformToIndexedCompare(), TryToShrinkGlobalToBoolean(), upgradeX86MultiplyAddBytes(), llvm::PPCTTIImpl::vectorCostAdjustmentFactor(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), and llvm::InstCombinerImpl::visitTrunc().

isVoidTy()

bool llvm::Type::isVoidTy ( ) const inline

Return true if this is 'void'.

Definition at line 139 of file Type.h.

References getTypeID(), and VoidTyID.

Referenced by llvm::buildAPFixedPointInst(), copyMustTailReturn(), createDummyReturnBlock(), llvm::IRBuilderBase::CreateMalloc(), createRetPHINode(), llvm::Attributor::createShallowWrapper(), createWrapper(), llvm::Evaluator::EvaluateFunction(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::NVPTXTargetLowering::getPrototype(), getRetComponentType(), getScalableECFromSignature(), llvm::VPCostContext::getScalarizationOverhead(), llvm::RISCVTTIImpl::getTgtMemIntrinsic(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::objcarc::hasAttachedCallOpBundle(), llvm::coro::AnyRetconABI::init(), llvm::InlineFunctionImpl(), llvm::isLibFreeFunction(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::makeGuardControlFlowExplicit(), modifyIntrinsicCall(), llvm::InstDeleterIRStrategy::mutate(), numRetVals(), llvm::VPWidenCallRecipe::printRecipe(), llvm::promoteCall(), remarkFlatAddrspaceAccess(), replaceWithCallToVeclib(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), and scalarizeMaskedVectorHistogram().

isX86_AMXTy()

bool llvm::Type::isX86_AMXTy ( ) const inline

isX86_FP80Ty()

bool llvm::Type::isX86_FP80Ty ( ) const inline

LLVM_DEPRECATED()

Return a pointer to the current type.

This is equivalent to PointerType::get(Ctx, AddrSpace). TODO: Remove this after opaque pointer transition is complete.

References const, LLVM_ABI, and Type().

print()

Print the current type.

Omit the type details if NoDetails == true. E.g., let st = type { i32, i16 } When NoDetails is true, we only print st. Put differently, NoDetails prints the type as if inlined with the operands when printing an instruction.

Definition at line 5116 of file AsmWriter.cpp.

References llvm::dyn_cast(), llvm::StructType::isLiteral(), print(), and Type().

Referenced by emitGlobalConstantFP(), llvm::Attribute::getAsString(), getBranchCondString(), print(), llvm::vfs::TracingFileSystem::printImpl(), and PrintResults().

setSubclassData()

void llvm::Type::setSubclassData ( unsigned val) inlineprotected

subtype_begin()

subtype_iterator llvm::Type::subtype_begin ( ) const inline

subtype_end()

subtype_iterator llvm::Type::subtype_end ( ) const inline

subtype_rbegin()

subtype_reverse_iterator llvm::Type::subtype_rbegin ( ) const inline

subtype_rend()

subtype_reverse_iterator llvm::Type::subtype_rend ( ) const inline

subtypes()

LLVMContextImpl

ContainedTys

Type* const* llvm::Type::ContainedTys = nullptr protected

A pointer to the array of Types contained by this Type.

For example, this includes the arguments of a function type, the elements of a structure, the pointee of a pointer, the element type of an array, etc. This pointer may be 0 for types that don't contain other types (Integer, Double, Float).

Definition at line 113 of file Type.h.

Referenced by llvm::StructType::element_begin(), llvm::StructType::element_end(), getArrayElementType(), getContainedType(), llvm::StructType::getElementType(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), subtype_begin(), subtype_end(), llvm::TargetExtType::type_param_begin(), and llvm::TargetExtType::type_param_end().

NumContainedTys

unsigned llvm::Type::NumContainedTys = 0 protected

The documentation for this class was generated from the following files: