LLVM 20.0.0git
|
The instances of the Type class are immutable: once they are created, they are never changed. More...
#include "llvm/IR/Type.h"
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 | |
void | print (raw_ostream &O, bool IsForDebug=false, bool NoDetails=false) const |
Print the current type. | |
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 as defined by APFloat::isIEEE(), 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. | |
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. | |
bool | isScalableTargetExtTy () const |
Return true if this is a target extension type with a scalable layout. | |
bool | isScalableTy () const |
Return true if this is a type whose size is a known multiple of vscale. | |
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 | isIntegerTy () const |
True if this is an instance of IntegerType. | |
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 | isOpaquePointerTy () const |
True if this is an instance of an opaque 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. | |
bool | canLosslesslyBitCastTo (Type *Ty) const |
Return true if this type could be converted with a lossless BitCast to type 'Ty'. | |
bool | isEmptyTy () const |
Return true if this type is empty, that is, it has no elements or all of its elements are empty. | |
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. | |
TypeSize | getPrimitiveSizeInBits () const LLVM_READONLY |
Return the basic size of this type if it is a primitive type. | |
unsigned | getScalarSizeInBits () const LLVM_READONLY |
If this is a vector type, return the getPrimitiveSizeInBits value for the element type. | |
int | getFPMantissaWidth () const |
Return the width of the mantissa of this type. | |
bool | isIEEE () const |
Return whether the type is IEEE compatible, as defined by the eponymous method in APFloat. | |
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. | |
unsigned | getIntegerBitWidth () const |
Type * | getFunctionParamType (unsigned i) const |
unsigned | getFunctionNumParams () const |
bool | isFunctionVarArg () const |
StringRef | getStructName () const |
unsigned | getStructNumElements () const |
Type * | getStructElementType (unsigned N) const |
uint64_t | getArrayNumElements () const |
Type * | getArrayElementType () const |
StringRef | getTargetExtName () const |
Type * | getNonOpaquePointerElementType () const |
Only use this method in code that is not reachable with opaque pointers, or part of deprecated methods that will be removed as part of the opaque pointers transition. | |
Type * | getWithNewType (Type *EltTy) const |
Given vector type, change the element type, whilst keeping the old number of elements. | |
Type * | getWithNewBitWidth (unsigned NewBitWidth) const |
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes. | |
Type * | getExtendedType () const |
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type. | |
unsigned | getPointerAddressSpace () const |
Get the address space of this pointer or pointer vector type. | |
PointerType * | getPointerTo (unsigned AddrSpace=0) const |
Return a pointer to the current type. | |
Protected Member Functions | |
Type (LLVMContext &C, TypeID tid) | |
~Type ()=default | |
unsigned | getSubclassData () const |
void | setSubclassData (unsigned val) |
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.
using llvm::Type::subtype_iterator = Type * const * |
using llvm::Type::subtype_reverse_iterator = std::reverse_iterator<subtype_iterator> |
enum llvm::Type::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 | |
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. |
|
inlineexplicitprotected |
Definition at line 93 of file Type.h.
Referenced by llvm::object::MinidumpFile::create(), skipModsAndTypedefs(), and llvm::BTFParser::symbolize().
|
protecteddefault |
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
void llvm::Type::dump | ( | ) | const |
|
inline |
Definition at line 399 of file Type.h.
References ArrayTyID, assert(), ContainedTys, and getTypeID().
Referenced by combineAndLoadToBZHI(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), isConstantUsingVectorTy(), llvm::AANoFPClass::isValidIRPositionForInit(), llvm::WebAssembly::isWebAssemblyTableType(), transformGlobalArray(), and llvm::WebAssembly::wasmSymbolSetType().
|
inline |
|
static |
This method is used to implement the type iterator (defined at the end of the file).
For derived types, this returns the types 'contained' in the derived type.
Definition at line 372 of file Type.h.
References assert(), ContainedTys, and NumContainedTys.
Referenced by getScalarType(), llvm::TargetExtType::getTypeParameter(), and llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad().
|
inline |
Return the LLVMContext in which this type was uniqued.
Definition at line 128 of file Type.h.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::convertPointerToIntegerType(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::StructType::create(), llvm::VFABI::createFunctionType(), llvm::MatrixBuilder::CreateIndex(), llvm::VPlan::createInitialVPlan(), llvm::orc::createIRTypedAddress(), llvm::FunctionLoweringInfo::CreateRegs(), llvm::VPScalarIVStepsRecipe::execute(), llvm::FlushFPConstant(), FoldBitCast(), foldConstantCastPair(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::ConstantVector::get(), llvm::ConstantArray::get(), llvm::InlineAsm::get(), llvm::ConstantInt::get(), llvm::ConstantPointerNull::get(), llvm::ConstantTargetNone::get(), llvm::TypedPointerType::get(), llvm::StructType::get(), llvm::UndefValue::get(), llvm::PoisonValue::get(), llvm::ConstantAggregateZero::get(), llvm::ConstantFP::get(), llvm::ConstantExpr::getAlignOf(), llvm::Constant::getAllOnesValue(), llvm::AArch64TTIImpl::getArithmeticReductionCostSVE(), llvm::AAValueConstantRange::getAssumedConstant(), llvm::AAPotentialConstantValues::getAssumedConstant(), llvm::VNCoercion::getConstantMemInstValueForLoad(), llvm::BasicBlock::getContext(), llvm::Function::getContext(), llvm::Value::getContext(), llvm::EVT::getEVT(), llvm::IntegerType::getExtendedType(), llvm::ConstantInt::getFalse(), getFoldedCast(), getIdentityValueForAtomicOp(), llvm::ConstantDataSequential::getImpl(), llvm::DataLayout::getIndexType(), llvm::ConstantFP::getInfinity(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::VectorType::getInteger(), llvm::Constant::getIntegerValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::DataLayout::getIntPtrType(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::TargetLoweringBase::getMemValueType(), llvm::AArch64TTIImpl::getMinMaxReductionCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::ConstantFP::getNaN(), llvm::Constant::getNullValue(), getPromotedType(), llvm::ConstantFP::getQNaN(), llvm::BasicTTIImplBase< T >::getRegUsageForType(), llvm::X86TTIImpl::getReplicationShuffleCost(), llvm::coro::Shape::getResumeFunctionType(), getReturnAttrs(), getRuntimeVFAsFloat(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantFP::getSNaN(), llvm::ConstantVector::getSplat(), llvm::AArch64TTIImpl::getSpliceCost(), getStepVector(), llvm::BasicTTIImplBase< T >::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getSVEContainerIRType(), getTargetTypeInfo(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), llvm::VectorType::getTruncatedElementVectorType(), llvm::getTypedPointerWrapper(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), getTypePartition(), llvm::TargetLoweringBase::getValueType(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::ConstantFP::getZero(), hasLifetimeMarkers(), llvm::CallLowering::insertSRetIncomingArgument(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), llvm::isUntypedEquivalentToTyExt(), LLVMConstIntOfArbitraryPrecision(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64CallLowering::lowerReturn(), llvm::CmpInst::makeCmpResultType(), memVTFromLoadIntrData(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::needToDelay(), llvm::TargetLowering::ParseConstraints(), llvm::LoopStructure::parseLoopStructure(), rebuildExtCst(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::StructType::setBody(), setInfoSVEStN(), llvm::StructType::setName(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyGEPInst(), solveTypeName(), llvm::CallLowering::splitToValueTypes(), llvm::toTypedPointer(), tryToFPToSat(), willGenerateVectors(), and llvm::MetadataAsValue::~MetadataAsValue().
|
static |
Referenced by convertImplicitDefToConstZero(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getDoubleTy(), getFloatTypeForLLT(), getIntrinsicParamType(), getKeyFPValMD(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getScalarTy(), getSVEContainerIRType(), getTypeFromParameterKind(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMDoubleTypeInContext(), LowerFPToInt(), makeDoubleDouble(), makeDoubleDoubleDouble(), makeDoubleDoubleDoubleDouble(), makeDoubleDoubleI32(), llvm::parseBasicTypeName(), ReplaceFPIntrinsicWithCall(), and shrinkFPConstant().
|
inline |
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type.
For vectors, preserves element count.
Referenced by dropRedundantMaskingOfLeftShiftInput().
|
static |
Referenced by llvm::ConstantFP::get().
|
static |
Referenced by llvm::SPIRVGlobalRegistry::buildConstantFP(), convertImplicitDefToConstZero(), llvm::MDBuilder::createFPMath(), DecodeFixedType(), expandIToFP(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getFloatTy(), getFloatTypeForLLT(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getScalarTy(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromParameterKind(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMFloatTypeInContext(), LowerFPToInt(), llvm::parseBasicTypeName(), llvm::parseTypeString(), ReplaceFPIntrinsicWithCall(), shrinkFPConstant(), llvm::UpgradeIntrinsicCall(), and upgradePTESTIntrinsic().
const fltSemantics & llvm::Type::getFltSemantics | ( | ) | const |
Referenced by atomicIgnoresDenormalModeOrFPModeIsFTZ(), canEvaluateTruncated(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::ConstantFoldCastInstruction(), emitRsqIEEE1ULP(), llvm::TargetLowering::expandIS_FPCLASS(), llvm::FlushFPConstant(), FoldBitCast(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::ConstantFP::get(), llvm::Constant::getAllOnesValue(), getIdentityValueForAtomicOp(), llvm::ConstantFP::getInfinity(), llvm::ConstantFP::getNaN(), llvm::Constant::getNullValue(), llvm::ConstantFP::getQNaN(), llvm::ConstantFP::getSNaN(), llvm::ConstantFP::getZero(), inputDenormalIsDAZ(), inputDenormalIsIEEE(), inputDenormalIsIEEEOrPosZero(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::KnownFPClass::isKnownNeverLogicalPosZero(), isSaturatingMinMax(), outputDenormalIsIEEEOrPosZero(), and llvm::KnownFPClass::propagateDenormal().
|
static |
int llvm::Type::getFPMantissaWidth | ( | ) | const |
Return the width of the mantissa of this type.
This is only valid on floating-point types. If the FP type does not have a stable mantissa (e.g. ppc long double), this method returns -1.
Referenced by expandIToFP(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), isKnownExactCastIntToFP(), shrinkFPConstantVector(), and llvm::InstCombinerImpl::visitFPTrunc().
|
inline |
|
static |
Referenced by convertTo16Bit(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getFloatTypeForLLT(), llvm::IRBuilderBase::getHalfTy(), getIntrinsicParamType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromParameterKind(), LLVMHalfTypeInContext(), matchFPExtFromF16(), llvm::parseBasicTypeName(), llvm::parseTypeString(), shrinkFPConstant(), simplifyAMDGCNImageIntrinsic(), and upgradeX86IntrinsicCall().
|
static |
Referenced by llvm::IntegerType::get(), llvm::IRBuilderBase::getInt128Ty(), and LLVMInt128TypeInContext().
|
static |
Referenced by convertTo16Bit(), llvm::createProfileSamplingVar(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), llvm::IRBuilderBase::getInt16Ty(), getIntrinsicParamType(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), getSVEContainerIRType(), getTypeFromParameterKind(), llvm::isBytewiseValue(), LLVMInt16TypeInContext(), llvm::parseBasicTypeName(), llvm::ARMTargetLowering::shouldConvertSplatType(), and simplifyAMDGCNImageIntrinsic().
|
static |
Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::SelectInst::areInvalidOperands(), calcPredicateUsingBooleans(), llvm::ConstantFoldCompareInstruction(), CreateAssert(), llvm::MDBuilder::createCallbackEncoding(), llvm::sampleprofutil::createFSDiscriminatorVariable(), llvm::VFABI::createFunctionType(), llvm::VPlan::createInitialVPlan(), createMemprofHistogramFlagVar(), DisableAllLoopOptsOnLoop(), fillCommonArgs(), llvm::IntegerType::get(), llvm::ConstantExpr::getAlignOf(), llvm::IRBuilderBase::getAllOnesMask(), llvm::dxil::ResourceInfo::getAsMetadata(), llvm::LoopVectorizationCostModel::getDivRemSpeculationCost(), llvm::ConstantInt::getFalse(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::IRBuilderBase::getInt1Ty(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), llvm::RISCVTTIImpl::getShuffleCost(), getTargetTypeInfo(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), getTypeFromParameterKind(), llvm::SelectionDAGBuilder::handleKillDebugValue(), instCombineSVECmpNE(), LLVMInt1TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::CmpInst::makeCmpResultType(), llvm::InsertCFGStrategy::mutate(), OptimizeGlobalAddressOfAllocation(), replaceWithTLIFunction(), rewrite(), setAssignmentTrackingModuleFlag(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), SimplifyCondBranchToCondBranch(), switchToLookupTable(), llvm::at::trackAssignments(), TryToShrinkGlobalToBoolean(), and llvm::InstCombinerImpl::visitAllocSite().
|
static |
Referenced by llvm::Module::addModuleFlag(), adjustInliningThresholdUsingCallee(), llvm::annotateValueSite(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::SPIRVGlobalRegistry::buildConstantInt(), calcPredicateUsingInteger(), calculateVectorIndex(), OutlinableGroup::collectGVNStoreSets(), llvm::ConstantFoldInsertElementInstruction(), llvm::convertPointerToIntegerType(), 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::OpenMPIRBuilder::createGlobalFlag(), llvm::IRBuilderBase::CreateGlobalStringPtr(), llvm::OpenMPIRBuilder::createOffloadEntry(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), llvm::createProfileSamplingVar(), createRelLookupTable(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), createStringMetadata(), createSwitchStatement(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(), emitTargetTaskProxyFunction(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::expandUser(), findCostForOutputBlocks(), llvm::SanitizerStatReport::finish(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::dxil::ResourceInfo::getAsMetadata(), getDefaultPersonalityFn(), getDXILOpFunctionType(), llvm::offloading::getEntryTy(), llvm::CSKYInstrInfo::getGlobalBaseReg(), llvm::IRBuilderBase::getInt32Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::offloading::getOffloadingEntryInitializer(), getOffsetFromIndices(), getPownType(), getPromotedType(), getResRetType(), llvm::ConstantExpr::getSizeOf(), getSVEContainerIRType(), getTypeFromParameterKind(), 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(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XtensaInstrInfo::loadImmediate(), llvm::XCoreInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerLoadRelative(), lowerPtrAnnotation(), makeDoubleDoubleI32(), makeX86FP80X86FP80I32(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::EscapeEnumerator::Next(), llvm::parseBasicTypeName(), llvm::parseTypeString(), populateOperands(), processSwitches(), replaceCalledFunction(), replaceWithGEP(), llvm::KCFIPass::run(), llvm::WasmEHPreparePass::run(), runImpl(), runPass(), llvm::scaleProfData(), SegmentOffset(), llvm::setKCFIType(), llvm::Module::setModuleFlag(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyRelativeLoad(), splitGlobal(), splitMergedValStore(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::OpenMPIRBuilder::unrollLoopPartial(), updateNVPTXMetadata(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), upgradeX86IntrinsicCall(), validExtractValueIndex(), validInsertValueIndex(), validShuffleVectorIndex(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGEPOfGEP(), and llvm::BasicBlock::~BasicBlock().
|
static |
Referenced by addModuleFlags(), llvm::GlobalObject::addTypeMetadata(), llvm::annotateValueSite(), llvm::memprof::buildCallstackMetadata(), 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::OpenMPIRBuilder::emitOffloadingArraysArgument(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), foldConstantCastPair(), foldInsSequenceIntoSplat(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getInt64Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), getKeyValMD(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::DIBuilder::getOrCreateSubrange(), llvm::OpenMPIRBuilder::getSizeInBytes(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantVector::getSplat(), llvm::InstrProfIncrementInst::getStep(), getSVEContainerIRType(), getTypeFromParameterKind(), llvm::InlineFunction(), insertLifetimeMarkersSurroundingCall(), instCombineSVEDup(), instCombineSVELast(), instrumentOneFunc(), llvm::isBytewiseValue(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), LLVMInt64TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::parseBasicTypeName(), llvm::scaleProfData(), llvm::Module::setLargeDataThreshold(), llvm::GlobalObject::setVCallVisibilityMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyX86extrq(), simplifyX86insertq(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeTBAANode(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitExtractElementInst().
|
static |
Referenced by llvm::memtag::alignAndPadAlloca(), BuildConstantFromSCEV(), classifyConstantWithOpaquePtr(), createGlobalFwdRef(), createMemMoveLoopUnknownSize(), llvm::orc::IRSpeculationLayer::emit(), fillCommonArgs(), foldGEPChainAsU8Access(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), llvm::SelectionDAG::getAtomicMemset(), llvm::IRBuilderBase::getInt8Ty(), llvm::BasicTTIImplBase< T >::getInterleavedMemoryOpCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), getPointerOperandAndType(), getSVEContainerIRType(), getTypeFromParameterKind(), getValueOrPoison(), llvm::isBytewiseValue(), isPointerAlwaysReplaceable(), llvm::isUntypedEquivalentToTyExt(), LLVMInt8TypeInContext(), llvm::AArch64CallLowering::lowerCall(), llvm::coro::LowererBase::makeSubFnCall(), OptimizeGlobalAddressOfAllocation(), llvm::parseBasicTypeName(), llvm::SPIRV::parseBuiltinCallArgumentBaseType(), runImpl(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), simplifyX86extrq(), simplifyX86insertq(), splitAsyncCoroutine(), splitGlobal(), llvm::toTypedPointer(), tryToOptimizeStoreOfAllocationToGlobal(), tryToShorten(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), and validateLifetimeStart().
|
inline |
Referenced by canBeCheaplyTransformed(), canonicalizeForInvariantConditionInjection(), computeKnownFPClass(), ConvertShiftToMul(), decompose(), eliminateDeadSwitchCases(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpWithCastOp(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::ConstantExpr::getIntrinsicIdentity(), getKmpcForDynamicFiniForType(), getKmpcForDynamicInitForType(), getKmpcForDynamicNextForType(), getKmpcForStaticInitForType(), getKmpcForStaticLoopForType(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getTypeName(), llvm::DataLayout::getTypeSizeInBits(), llvm::PPCTTIImpl::hasActiveVectorLength(), hasSameExtUse(), llvm::HexagonEvaluator::HexagonEvaluator(), injectPendingInvariantConditions(), llvm::GCNTTIImpl::instCombineIntrinsic(), isLegalCrossLaneType(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), isLoadCombineCandidateImpl(), llvm::ConstantInt::isValueValidForType(), lowerFunnelShifts(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), simplifyX86varShift(), unpackFromRegLoc(), llvm::OpenMPIRBuilder::unrollLoopPartial(), and llvm::InstCombinerImpl::visitExtractElementInst().
|
static |
Referenced by buildFrameType(), computeRecurrenceType(), createBitOrPointerCast(), createMaskInstrs(), llvm::X86TTIImpl::getArithmeticReductionCost(), getConstantVector(), llvm::IntegerType::getExtendedType(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::IRBuilderBase::getIntNTy(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::DataLayout::getLargestLegalIntType(), getMemCmpLoad(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getReplicationShuffleCost(), getScalarTy(), llvm::DataLayout::getSmallestLegalIntType(), llvm::ScalarEvolution::getTripCountFromExitCount(), inlineGetBaseAndOffset(), llvm::isBytewiseValue(), isIntegerWideningViable(), isValidProtoForSizeReturningNew(), isVectorPromotionViableForSlice(), llvm::LegalizerHelper::libcall(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedStore(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), makeStatepointExplicitImpl(), llvm::parseBasicTypeName(), processConstantStringArg(), llvm::recognizeBSwapOrBitReverseIdiom(), and splitMergedValStore().
|
static |
Referenced by LLVMLabelTypeInContext().
|
static |
|
inline |
Only use this method in code that is not reachable with opaque pointers, or part of deprecated methods that will be removed as part of the opaque pointers transition.
Definition at line 410 of file Type.h.
References llvm_unreachable.
|
inline |
Return the number of types in the derived type.
Definition at line 378 of file Type.h.
References NumContainedTys.
Referenced by llvm::TargetExtType::getNumTypeParameters().
|
inline |
Get the address space of this pointer or pointer vector type.
Referenced by llvm::AMDGPUAAResult::alias(), llvm::NVPTXAAResult::alias(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), aspaceWrapOperand(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), classifyGlobalCtorPointerType(), llvm::orc::cloneGlobalAliasDecl(), llvm::ConstantFoldCastOperand(), convertValue(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::expandMemMoveAsLoop(), llvm::InstCombinerImpl::foldGEPICmp(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), llvm::CastInst::getCastOpcode(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::sandboxir::AddrSpaceCastInst::getDestAddressSpace(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::AMDGPUAAResult::getModRefInfoMask(), llvm::NVPTXAAResult::getModRefInfoMask(), llvm::LoadInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::GetElementPtrInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::GEPOperator::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::getPointersDiff(), llvm::getPtrStride(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), llvm::sandboxir::AddrSpaceCastInst::getSrcAddressSpace(), llvm::DataLayout::getTypeSizeInBits(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getValueKind(), HandleByValArgument(), hasLifetimeMarkers(), inlineGetBaseAndOffset(), llvm::AMDGPU::instrumentAddress(), llvm::AA::isAssumedThreadLocalObject(), llvm::AMDGPU::isDynamicLDS(), llvm::CastInst::isEliminableCastPair(), llvm::AANonNull::isImpliedByIR(), llvm::AANoAlias::isImpliedByIR(), llvm::AMDGPU::isLDSVariableToLower(), isNoopPtrIntCastPair(), isUnsupportedAMDGPUAddrspace(), llvm::WebAssembly::isWebAssemblyExternrefType(), llvm::WebAssembly::isWebAssemblyFuncrefType(), llvm::TargetLowering::LowerCallTo(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), maybePrintCallAddrSpace(), optimizeOnceStoredGlobal(), PrintResults(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::CallLowering::setArgFlags(), shouldInstrumentReadWriteFromAddress(), llvm::slpvectorizer::BoUpSLP::transformNodes(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::InstCombinerImpl::visitAllocaInst(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
PointerType * llvm::Type::getPointerTo | ( | unsigned | AddrSpace = 0 | ) | const |
Return a pointer to the current type.
This is equivalent to PointerType::get(Foo, AddrSpace). TODO: Remove this after opaque pointer transition is complete.
Referenced by getIntrinsicParamType().
|
static |
Referenced by DecodeFixedType(), LLVMPPCFP128TypeInContext(), and shrinkFPConstant().
TypeSize llvm::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.
Referenced by llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), areExtractShuffleVectors(), llvm::PPCTTIImpl::areTypesABICompatible(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canWidenLoad(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), collectInsertionElements(), combineConstantPoolLoads(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::ConstantFoldCastInstruction(), createCmpXchgInstFun(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPPERMMask(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpEquality(), foldIdentityExtractShuffle(), foldLoadsRecursive(), foldVecTruncToExtElt(), llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantDataSequential::getElementByteSize(), getIdentityValueForAtomicOp(), llvm::VectorType::getInteger(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::LanaiTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCostInst(), llvm::PPCTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getIntImmCostInst(), llvm::X86TTIImpl::getIntImmCostInst(), llvm::AArch64TTIImpl::getIntImmCostIntrin(), llvm::PPCTTIImpl::getIntImmCostIntrin(), llvm::SystemZTTIImpl::getIntImmCostIntrin(), llvm::X86TTIImpl::getIntImmCostIntrin(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getSplatableConstant(), getTargetConstantBitsFromNode(), llvm::ScalarEvolution::getTripCountFromExitCount(), llvm::VectorType::getTruncatedElementVectorType(), getTypeSizeIndex(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::CastInst::isBitCastable(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::AArch64TTIImpl::isLegalMaskedLoadStore(), isMMAType(), isMultipleOfTypeSize(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isZExtFree(), matchType(), printConstant(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), rebuildSplatCst(), rebuildZeroUpperCst(), llvm::replaceAllDbgUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), scalarConstantToHexString(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedLoad(), scalarizeMaskedStore(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyICmpInst(), simplifyX86immShift(), simplifyX86pack(), switchToLookupTable(), upgradeAVX512MaskToSelect(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), upgradeX86IntrinsicCall(), and upgradeX86VPERMT2Intrinsics().
|
static |
Return a type based on an identifier.
unsigned llvm::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.
Referenced by llvm::addDiffRuntimeChecks(), llvm::ValueLatticeElement::asConstantRange(), canEvaluateSExtd(), canEvaluateShiftedShift(), canEvaluateTruncated(), canonicalizeAbs(), canonicalizeLogicFirst(), canTryToConstantAddTwoShiftAmounts(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), cmpExcludesZero(), combineAndLoadToBZHI(), llvm::InstCombinerImpl::commonShiftTransforms(), compareCmp(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromICmpCond(), computeKnownBitsFromOperator(), llvm::computeMinimumValueSizes(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::computeOverflowForSignedMul(), llvm::ConstantFoldIntegerCast(), llvm::convertPointerToIntegerType(), llvm::copyRangeMetadata(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::CastInst::CreateFPCast(), llvm::IRBuilderBase::CreateFPCast(), llvm::MatrixBuilder::CreateIndex(), llvm::IRBuilderBase::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), createScalarIVSteps(), 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(), despeculateCountZeros(), dropRedundantMaskingOfLeftShiftInput(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InstCombinerImpl::foldAddWithConstant(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldICmpXNegX(), llvm::InstCombinerImpl::foldItoFPtoI(), foldSelectICmpAndAnd(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldTruncInsEltPair(), foldTruncShuffle(), generateCreationChecksForBinOp(), llvm::RISCVTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), getBitWidth(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), getElSizeLog2Diff(), llvm::getExpressionForConstant(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), getHistogramCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::GCNTTIImpl::getLoadVectorFactor(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), getRuntimeVFAsFloat(), llvm::MinMaxIntrinsic::getSaturationPoint(), llvm::X86TTIImpl::getScalarizationOverhead(), getScalarSizeInBits(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), getSplatableConstant(), getStepVector(), getTargetConstantBitsFromNode(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::getWiderType(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::X86TargetLowering::isCheapToSpeculateCttz(), llvm::CastInst::isEliminableCastPair(), llvm::SystemZTTIImpl::isFoldableLoad(), isKnownExactCastIntToFP(), llvm::AArch64TTIImpl::isLegalBroadcastLoad(), llvm::ARMTTIImpl::isLegalMaskedGather(), llvm::ARMTTIImpl::isLegalMaskedLoad(), isMMAType(), llvm::CastInst::isNoopCast(), llvm::AMDGPUTargetLowering::isTruncateFree(), isVectorLaneType(), llvm::X86TargetLowering::isVectorShiftByScalarCheap(), llvm::AMDGPUTargetLowering::isZExtFree(), matchOrConcat(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), llvm::ARMTTIImpl::preferInLoopReduction(), processAShr(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::ScalarEvolution::LoopGuards::rewrite(), llvm::salvageDebugInfoImpl(), simplifyAndInst(), simplifyAShrInst(), llvm::simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyRecipe(), simplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyUnaryIntrinsic(), simplifyX86pack(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::Constant::toConstantRange(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), tryToRecognizePopCount(), tryToRecognizeTableBasedCttz(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), upgradeX86IntrinsicCall(), upgradeX86VPERMT2Intrinsics(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
inlinestatic |
Definition at line 460 of file Type.h.
References llvm::CallingConv::C, getDoubleTy(), getFloatTy(), getIntNTy(), and llvm_unreachable.
|
inline |
If this is a vector type, return the element type, otherwise return 'this'.
Definition at line 343 of file Type.h.
References getContainedType(), and isVectorTy().
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), llvm::CastInst::castIsValid(), checkType(), computeKnownBits(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), ComputeNumSignBitsImpl(), llvm::ConstantFoldLoadThroughBitcast(), llvm::IRBuilderBase::CreateStepVector(), llvm::emitGEPOffset(), llvm::VPWidenCallRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandAbs(), expandAnyIntrinsic(), expandExpIntrinsic(), expandLengthIntrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), llvm::ConstantFP::get(), llvm::ConstantInt::get(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::TargetTransformInfoImplBase::getArithmeticInstrCost(), llvm::TargetTransformInfo::getArithmeticInstrCost(), getCmpOpsType(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExactLogBase2(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::ConstantFP::getInfinity(), llvm::Constant::getIntegerValue(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getMaxForClamp(), llvm::ARMTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::ConstantFP::getNaN(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantFP::getQNaN(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::ConstantFP::getSNaN(), getStepVector(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getVectorInstrCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getWidenedType(), llvm::ConstantFP::getZero(), getZeroFP(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::hasConditionalLoadStoreForType(), hasSameExtUse(), inputDenormalIsDAZ(), inputDenormalIsIEEE(), inputDenormalIsIEEEOrPosZero(), isBufferFatPtrOrVector(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::AArch64TargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::PPCTargetLowering::isFMAFasterThanFMulAndFAdd(), isFPOrFPVectorTy(), isIntOrIntVectorTy(), llvm::KnownFPClass::isKnownNeverLogicalPosZero(), isKnownNonZeroFromOperator(), llvm::AArch64TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::AArch64TTIImpl::isLegalMaskedLoadStore(), isPtrOrPtrVectorTy(), llvm::HexagonSubtarget::isTypeForHVX(), isValidElementType(), isVectorPromotionViable(), optimizeCallInst(), optimizeSection(), outputDenormalIsIEEEOrPosZero(), llvm::KnownFPClass::propagateDenormal(), rebuildExtCst(), llvm::CallLowering::setArgFlags(), llvm::ARMTargetLowering::shouldConvertSplatType(), shrinkInsertElt(), simplifyAMDGCNImageIntrinsic(), llvm::UpgradeIntrinsicCall(), upgradeX86ConcatShift(), upgradeX86Rotate(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitXor(), and WriteConstantInternal().
|
inline |
Referenced by llvm::SPIRV::lowerBuiltinType(), and solveTypeName().
|
inline |
|
inlineprotected |
Definition at line 97 of file Type.h.
Referenced by llvm::StructType::containsScalableVectorType(), llvm::PointerType::getAddressSpace(), llvm::TypedPointerType::getAddressSpace(), llvm::IntegerType::getBitWidth(), llvm::TargetExtType::getNumIntParameters(), llvm::StructType::isLiteral(), llvm::StructType::isOpaque(), llvm::StructType::isPacked(), llvm::StructType::isSized(), llvm::FunctionType::isVarArg(), llvm::StructType::setBody(), and setSubclassData().
|
inline |
|
static |
Referenced by DecodeFixedType(), LLVMBuildCatchSwitch(), LLVMBuildCleanupPad(), and LLVMTokenTypeInContext().
|
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::isa_impl< PointerType, Type >::doit(), executeFAddInst(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFDivInst(), executeFMulInst(), executeFNegInst(), executeFRemInst(), executeFSubInst(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), getArrayElementType(), llvm::ExecutionEngine::getConstantValue(), llvm::EVT::getEVT(), llvm::getFloatFn(), llvm::AMDGPULibFuncBase::Param::getFromTy(), getMangledTypeStr(), llvm::Constant::getNullValue(), getOverloadKind(), llvm::getPointerAddressSpace(), llvm::NVPTXTargetLowering::getPrototype(), llvm::VectorType::getTruncatedElementVectorType(), getTypeID(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getTypeName(), llvm::DataLayout::getTypeSizeInBits(), llvm::MVT::getVT(), getZeroFP(), llvm::hasFloatFn(), is16bitFPTy(), isAggregateType(), isArrayTy(), isBFloatTy(), isDoubleTy(), isFirstClassType(), isFloatingPointTy(), isFloatTy(), llvm::AArch64TargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::PPCTargetLowering::isFMAFasterThanFMulAndFAdd(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIEEELikeFPTy(), isIntegerTy(), isLabelTy(), isLeakCheckerRoot(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isLegalCrossLaneType(), isMetadataTy(), isMultiUnitFPType(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), isTargetExtTy(), isTokenTy(), llvm::VectorType::isValidElementType(), llvm::ConstantFP::isValueValidForType(), isVectorTy(), isVoidTy(), isX86_AMXTy(), isX86_FP80Ty(), llvm::ExecutionEngine::LoadValueFromMemory(), needsFPFromSig(), needsFPStubFromParams(), ReplaceFPIntrinsicWithCall(), llvm::ExecutionEngine::StoreValueToMemory(), llvm::Interpreter::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::Interpreter::visitShuffleVectorInst(), and llvm::Interpreter::visitVAArgInst().
|
static |
Referenced by CreateAssert(), llvm::MIRParserImpl::createDummyFunction(), CreateFailBB(), createFrameHelperMachineFunction(), llvm::IRBuilderBase::CreateFree(), llvm::RandomIRBuilder::createFunctionDefinition(), llvm::createMemLibcall(), llvm::createSanitizerCtor(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::declareSanitizerInitFunction(), DecodeFixedType(), llvm::orc::IRSpeculationLayer::emit(), emitInlineAsm(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::VPWidenStoreEVLRecipe::execute(), expandToSwitch(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), getFreshReductionFunc(), getFunctionTypeFromAsyncSuspend(), llvm::SelectionDAG::getMemset(), llvm::getOrCreateSanitizerCtorAndInitFunctions(), getOrInsertValueProfilingCall(), getTargetTypeInfo(), llvm::EVT::getTypeForEVT(), getTypeFromParameterKind(), llvm::IRBuilderBase::getVoidTy(), 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(), runImpl(), and llvm::Interpreter::visitReturnInst().
|
static |
Referenced by llvm::EVT::getTypeForEVT().
|
static |
Referenced by llvm::EVT::getTypeForEVT().
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.
Referenced by llvm::InstCombinerImpl::foldICmpShlConstant(), and llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost().
Given vector type, change the element type, whilst keeping the old number of elements.
For non-vectors simply returns EltTy
.
Referenced by llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitPtrToInt().
|
static |
Referenced by createAllocaInstAtEntry(), DecodeFixedType(), llvm::EVT::getTypeForEVT(), and LLVMX86AMXTypeInContext().
|
static |
|
inline |
Return true if this is a 16-bit float type.
Definition at line 148 of file Type.h.
References BFloatTyID, getTypeID(), and HalfTyID.
Referenced by rebuildConstant().
|
inline |
Return true if the type is an aggregate type.
This means it is valid as the first operand of an insertvalue or extractvalue instruction. This includes struct and array types, but does not include vector types.
Definition at line 291 of file Type.h.
References ArrayTyID, getTypeID(), and StructTyID.
Referenced by advanceToNextLeafType(), llvm::CastInst::castIsValid(), llvm::ConstantFoldLoadThroughBitcast(), firstRealType(), llvm::ExecutionEngine::getConstantValue(), IsTypePassedAsArray(), lowerKernelArguments(), nextRealType(), and ShouldPassAsArray().
|
inline |
True if this is an instance of ArrayType.
Definition at line 248 of file Type.h.
References ArrayTyID, and getTypeID().
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::PPCTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::ConstantAggregateZero::get(), llvm::SPIRVGlobalRegistry::getOrCreateConstIntArray(), isArray(), isConstantUsingVectorTy(), llvm::VNCoercion::isFirstClassAggregateOrScalableType(), llvm::AANoFPClass::isValidIRPositionForInit(), and llvm::WebAssembly::isWebAssemblyTableType().
|
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::AArch64TTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), isBFloat2(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHalf2OrBFloat2(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::AArch64TTIImpl::isLegalToVectorizeReduction(), IsTypePassedAsArray(), LLVMConstRealGetDouble(), matchIntrinsicType(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), ShouldPassAsArray(), llvm::UpgradeIntrinsicCall(), and llvm::InstCombinerImpl::visitFPTrunc().
|
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(), encodeVecTypeHint(), expandIToFP(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::GCNTTIImpl::instCombineIntrinsic(), isAtomicRMWLegalXChgTy(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::X86TTIImpl::isLegalAltInstr(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalNTStore(), llvm::isMathLibCallNoop(), isVectorLaneType(), LLVMConstRealGetDouble(), llvm::ExecutionEngine::LoadValueFromMemory(), matchIntrinsicType(), matchType(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), solveTypeName(), and updateFlags().
bool llvm::Type::isEmptyTy | ( | ) | const |
Return true if this type is empty, that is, it has no elements or all of its elements are empty.
Referenced by areGlobalsPotentiallyEqual(), and llvm::CallLowering::ArgInfo::ArgInfo().
|
inline |
Return true if the type is "first class", meaning it is a valid type for a Value.
Definition at line 277 of file Type.h.
References FunctionTyID, getTypeID(), and VoidTyID.
Referenced by llvm::CastInst::castIsValid(), llvm::FunctionComparator::cmpConstants(), foldConstantCastPair(), llvm::CastInst::getCastOpcode(), getFoldedCast(), llvm::CastInst::isBitCastable(), llvm::FunctionType::isValidArgumentType(), and llvm::Value::Value().
|
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(), convertTo16Bit(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), createBitOrPointerCast(), createCmpXchgInstFun(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandAnyIntrinsic(), FoldBitCast(), foldSelectShuffleWith1Binop(), llvm::Constant::getAllOnesValue(), llvm::TargetTransformInfoImplBase::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), llvm::getExpressionForConstant(), getMaxForClamp(), llvm::HexagonTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), getRuntimeVFAsFloat(), llvm::AArch64TTIImpl::getScalarizationOverhead(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getStepVector(), llvm::VectorType::getTruncatedElementVectorType(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::AA::getWithType(), isFPOrFPVectorTy(), llvm::InductionDescriptor::isInductionPHI(), isSingleValueType(), isSized(), isSupportedAtomicType(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::VectorType::isValidElementType(), matchType(), MaybeVectorizeType(), llvm::MipsCCState::PreAnalyzeCallOperand(), llvm::MipsCCState::PreAnalyzeFormalArgument(), llvm::TargetLoweringBase::shouldCastAtomicLoadInIR(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), llvm::TargetLoweringBase::shouldConvertPhiType(), simplifyAMDGCNImageIntrinsic(), solveDIType(), solveTypeName(), supportedAddressingMode(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
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::SITargetLowering::emitExpandAtomicRMW(), encodeVecTypeHint(), executeFCMP_ORD(), executeFCMP_UNO(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::GCNTTIImpl::instCombineIntrinsic(), isAtomicRMWLegalXChgTy(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::X86TTIImpl::isLegalAltInstr(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalNTStore(), llvm::isMathLibCallNoop(), isVectorLaneType(), LLVMConstRealGetDouble(), llvm::ExecutionEngine::LoadValueFromMemory(), matchIntrinsicType(), matchType(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), and solveTypeName().
|
inline |
Return true if this is 'fp128'.
Definition at line 162 of file Type.h.
References FP128TyID, and getTypeID().
Referenced by llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), matchIntrinsicType(), and llvm::MipsCCState::originalTypeIsF128().
|
inline |
Return true if this is a FP type or a vector of FP.
Definition at line 212 of file Type.h.
References getScalarType(), and isFloatingPointTy().
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), llvm::CastInst::castIsValid(), llvm::FPMathOperator::classof(), llvm::ConstantFoldCall(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromUniformValue(), llvm::CastInst::CreateFPCast(), foldBitCastBitwiseLogic(), foldCopySignIdioms(), llvm::HexagonTTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getCastInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), getDecodedBinaryOpcode(), getDecodedUnaryOpcode(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::AttributeFuncs::isNoFPClassCompatibleType(), llvm::AANoFPClass::isValidIRPositionForInit(), matchIntrinsicType(), llvm::MipsCCState::originalTypeIsVectorFloat(), upgradeAVX512MaskToSelect(), and upgradeX86VPERMT2Intrinsics().
|
inline |
True if this is an instance of FunctionType.
Definition at line 242 of file Type.h.
References FunctionTyID, and getTypeID().
Referenced by llvm::AArch64Subtarget::classifyGlobalFunctionReference(), llvm::convertToDeclaration(), llvm::AsmPrinter::emitGlobalAlias(), llvm::emitLinkerFlagsForGlobalCOFF(), llvm::GlobalVariable::GlobalVariable(), isFunctionGlobalAddress(), llvm::PointerType::isLoadableOrStorableType(), llvm::SystemZSubtarget::isPC32DBLSymbol(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), and llvm::SITargetLowering::shouldEmitGOTReloc().
|
inline |
|
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(), encodeVecTypeHint(), expandIToFP(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), getTargetConstantBitsFromNode(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHalf2(), isHalf2OrBFloat2(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::ARMTargetLowering::isLegalInterleavedAccessType(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::isMathLibCallNoop(), IsTypePassedAsArray(), LLVMConstRealGetDouble(), matchFPExtFromF16(), matchIntrinsicType(), optimizeSection(), printConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), ShouldPassAsArray(), and simplifyAMDGCNImageIntrinsic().
bool llvm::Type::isIEEE | ( | ) | const |
Return whether the type is IEEE compatible, as defined by the eponymous method in APFloat.
Referenced by llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout as defined by APFloat::isIEEE(), and does not have non-IEEE values, such as x86_fp80's unnormal values.
Definition at line 170 of file Type.h.
References BFloatTyID, DoubleTyID, FloatTyID, FP128TyID, getTypeID(), and HalfTyID.
Referenced by llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), and isFloatingPointTy().
|
inline |
True if this is an instance of IntegerType.
Definition at line 224 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(), askForAssumedConstant(), canConvertValue(), canHoistIVInc(), canSafelyConvertTo16Bit(), llvm::VNCoercion::coerceAvailableValueToLoadType(), collectUnswitchCandidatesWithInjections(), combineAndLoadToBZHI(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), ComputePTXValueVTs(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadThroughBitcast(), convertTo16Bit(), countToEliminateCompares(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::CastInst::CreateBitOrPointerCast(), createCast(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), createNodeForSelectViaUMinSeq(), createScalarIVSteps(), llvm::createStepForVF(), llvm::OpenMPIRBuilder::createTeams(), decompose(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandBounds(), llvm::X86TargetLowering::ExpandInlineAsm(), llvm::extractConstantMask(), FoldBitCast(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), foldTwoEntryPHINode(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), genLoopLimit(), getAISize(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::AArch64TargetLowering::getAsmOperandValueType(), llvm::CastInst::getCastOpcode(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::getConstantDataArrayInfo(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::LanaiTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), getIntImmCostImpl(), llvm::AArch64TTIImpl::getIntImmCostInst(), llvm::PPCTTIImpl::getIntImmCostInst(), llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getIntImmCostInst(), llvm::X86TTIImpl::getIntImmCostInst(), llvm::AArch64TTIImpl::getIntImmCostIntrin(), llvm::PPCTTIImpl::getIntImmCostIntrin(), llvm::SystemZTTIImpl::getIntImmCostIntrin(), llvm::X86TTIImpl::getIntImmCostIntrin(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getLoadStoreAddrMode(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), getMaxForClamp(), getMinForClamp(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ScalarEvolution::getPtrToIntExpr(), llvm::RISCVTTIImpl::getShuffleCost(), getSignedIntOrFpConstant(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getStepVector(), llvm::AArch64TTIImpl::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getTargetConstantBitsFromNode(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::hasConditionalLoadStoreForType(), llvm::hasIterationCountInvariantInParent(), llvm::HexagonEvaluator::HexagonEvaluator(), hoistMinMax(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineSVECondLast(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), llvm::CastInst::isEliminableCastPair(), llvm::isGEPBasedOnPointerToString(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntOrIntVectorTy(), isIntOrPtrTy(), llvm::SystemZTargetLowering::isLegalAddressingMode(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), isSingleValueType(), llvm::ConstantDataSequential::isString(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::HexagonSubtarget::isTypeForHVX(), IsTypePassedAsArray(), llvm::VectorType::isValidElementType(), llvm::AAValueConstantRange::isValidIRPositionForInit(), llvm::AAPotentialConstantValues::isValidIRPositionForInit(), llvm::ConstantInt::isValueValidForType(), isVectorLaneType(), isVectorPromotionViableForSlice(), llvm::AArch64TargetLowering::isZExtFree(), llvm::MSP430TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::SITargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::AMDGPUCallLowering::lowerTailCall(), llvm::IntrinsicLowering::LowerToByteSwap(), matchIntrinsicType(), matchType(), llvm::MipsCCState::originalTypeIsF128(), printConstant(), llvm::replaceAllDbgUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::TargetLoweringBase::shouldConvertPhiType(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SystemZTargetLowering::shouldExpandAtomicRMWInIR(), ShouldPassAsArray(), llvm::X86TargetLowering::shouldSinkOperands(), llvm::LoongArchTargetLowering::signExtendConstant(), llvm::RISCVTargetLowering::signExtendConstant(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), simplifyX86immShift(), solveDIType(), solveTypeName(), splitMergedValStore(), swapICmpOperandsToExposeCSEOpportunities(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToRecognizeTableBasedCttz(), llvm::AttributeFuncs::typeIncompatible(), unpackFromRegLoc(), updatePredecessorProfileMetadata(), llvm::UpgradeIntrinsicCall(), upgradeX86IntrinsicCall(), upgradeX86IntrinsicsWith8BitMask(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLShr(), and WriteConstantInternal().
Return true if this is an IntegerType of the given width.
|
inline |
Return true if this is an integer type or a vector of integer types.
Definition at line 230 of file Type.h.
References getScalarType(), and isIntegerTy().
Referenced by llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::add(), llvm::PPCTTIImpl::areTypesABICompatible(), llvm::ValueLatticeElement::asConstantRange(), buildMultiplyTree(), llvm::CastInst::castIsValid(), llvm::InstCombinerImpl::commonIDivTransforms(), computeKnownBits(), llvm::ConstantFoldLoadFromUniformValue(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreateIntegerCast(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::createMinMaxOp(), llvm::CastInst::CreatePointerCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateZExtOrTrunc(), foldAndOrOfICmpEqConstantAndICmp(), foldBitCastBitwiseLogic(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldSelectICmpLshrAshr(), foldTruncShuffle(), llvm::ConstantExpr::get(), getBoolVecFromMask(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), getDecodedBinaryOpcode(), getDecodedUnaryOpcode(), llvm::VectorType::getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), getMaskedTypeForICmpPair(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getPtrToInt(), getSafeDivisor(), llvm::X86TTIImpl::getScalarizationOverhead(), llvm::ConstantInt::getTrue(), llvm::ConstantExpr::getTrunc(), llvm::SystemZTTIImpl::getVectorInstrCost(), llvm::haveNoCommonBitsSet(), llvm::CastInst::isEliminableCastPair(), llvm::isImpliedCondition(), isKnownNonEqual(), isKnownNonZeroFromOperator(), isNeutralValue(), llvm::DemandedBits::isUseDead(), LowerNegateToMultiply(), matchIntrinsicType(), llvm::recognizeBSwapOrBitReverseIdiom(), simplifyAddInst(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpOfBools(), simplifyMulInst(), simplifyOrInst(), simplifySubInst(), tryToRecognizePopCount(), llvm::AttributeFuncs::typeIncompatible(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitZExt().
Return true if this is an integer type or a vector of integer types of the given width.
Definition at line 234 of file Type.h.
References llvm::BitWidth, getScalarType(), and isIntegerTy().
|
inline |
Return true if this is an integer type or a pointer type.
Definition at line 239 of file Type.h.
References isIntegerTy(), and isPointerTy().
Referenced by computeKnownBitsFromOperator(), llvm::ScalarEvolution::getNoopOrAnyExtend(), llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), isBitCastSemanticsPreserving(), llvm::ScalarEvolution::isSCEVable(), isSupportedAtomicType(), and MaybeVectorizeType().
|
inline |
Return true if this is 'label'.
Definition at line 215 of file Type.h.
References getTypeID(), and LabelTyID.
Referenced by llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), and llvm::TypedPointerType::isValidElementType().
|
inline |
Return true if this is 'metadata'.
Definition at line 218 of file Type.h.
References getTypeID(), and MetadataTyID.
Referenced by llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::TypedPointerType::isValidElementType(), and matchIntrinsicType().
|
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.
|
inline |
True if this is an instance of an opaque PointerType.
Definition at line 255 of file Type.h.
References isPointerTy().
|
inline |
True if this is an instance of PointerType.
Definition at line 251 of file Type.h.
References getTypeID(), and PointerTyID.
Referenced by llvm::AliasSetTracker::add(), addConditions(), BuildConstantFromSCEV(), canBeCheaplyTransformed(), canConvertValue(), llvm::canReplacePointersInUseIfEqual(), llvm::ScalarEvolution::LoopGuards::collect(), CompareValueComplexity(), computeKnownBits(), computeKnownBitsFromCmp(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldLoadThroughBitcast(), llvm::convertPointerToIntegerType(), llvm::copyMetadataForLoad(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), createBitOrPointerCast(), llvm::CastInst::CreateBitOrPointerCast(), createCast(), createCmpXchgInstFun(), decompose(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), evaluateICmpRelation(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), llvm::RandomIRBuilder::findPointer(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), getExactSDiv(), llvm::getExpressionForConstant(), llvm::MemoryLocation::getForDest(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::ScalarEvolution::getMinusSCEV(), llvm::AAResults::getModRefInfo(), llvm::ScalarEvolution::getMulExpr(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::getPtrStride(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::ScalarEvolution::getTypeSizeInBits(), llvm::ScalarEvolution::getUDivExpr(), llvm::getUnderlyingObject(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::Attributor::identifyDefaultAbstractAttributes(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), llvm::InductionDescriptor::isInductionPHI(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::isLibFreeFunction(), isNoopBitcast(), isOpaquePointerTy(), isPtrOrPtrVectorTy(), isSingleValueType(), llvm::VectorType::isValidElementType(), isVectorLaneType(), isVectorPromotionViable(), llvm::WebAssembly::isWebAssemblyExternrefType(), llvm::WebAssembly::isWebAssemblyFuncrefType(), llvm::MipsCallLowering::lowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), matchType(), optimizeOnceStoredGlobal(), promoteAllocaUserToVector(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceWithConstant(), llvm::MCJIT::runFunction(), llvm::salvageDebugInfoImpl(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), shouldConvertToRelLookupTable(), simplifyICmpInst(), solveDIType(), solveTypeName(), TryToShrinkGlobalToBoolean(), llvm::AttributeFuncs::typeIncompatible(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitPHINode().
|
inline |
Return true if this is powerpc long double.
Definition at line 165 of file Type.h.
References getTypeID(), and PPC_FP128TyID.
Referenced by emitGlobalConstantFP(), FoldBitCast(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::PPCTTIImpl::getRegisterClassForType(), isValidElementType(), and matchIntrinsicType().
|
inline |
Return true if this is a pointer type or a vector of pointer types.
Definition at line 258 of file Type.h.
References getScalarType(), and isPointerTy().
Referenced by llvm::CastInst::castIsValid(), llvm::VNCoercion::coerceAvailableValueToLoadType(), combineLoadToOperationType(), computeKnownBits(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), llvm::DataLayout::getIndexType(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::DataLayout::getIntPtrType(), llvm::ConstantExpr::getIntToPtr(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::DataLayout::getPointerTypeSizeInBits(), getScalarSizeInBits(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::CastInst::isEliminableCastPair(), isKnownNonZeroFromOperator(), llvm::AANoSync::isValidIRPositionForInit(), llvm::AANonNull::isValidIRPositionForInit(), llvm::AANoAlias::isValidIRPositionForInit(), llvm::AANoFree::isValidIRPositionForInit(), llvm::AADereferenceable::isValidIRPositionForInit(), llvm::AAAlign::isValidIRPositionForInit(), llvm::AANoCapture::isValidIRPositionForInit(), llvm::AAPrivatizablePtr::isValidIRPositionForInit(), llvm::AAMemoryBehavior::isValidIRPositionForInit(), llvm::AAMemoryLocation::isValidIRPositionForInit(), llvm::AAPointerInfo::isValidIRPositionForInit(), llvm::AAUnderlyingObjects::isValidIRPositionForInit(), llvm::AAAddressSpace::isValidIRPositionForInit(), llvm::AAAllocationInfo::isValidIRPositionForInit(), promoteAllocaUserToVector(), simplifyCastInst(), llvm::AttributeFuncs::typeIncompatible(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().
bool llvm::Type::isScalableTargetExtTy | ( | ) | const |
Return true if this is a target extension type with a scalable layout.
Referenced by llvm::getLLTForType().
bool llvm::Type::isScalableTy | ( | ) | const |
Return true if this is a type whose size is a known multiple of vscale.
Referenced by llvm::GEPOperator::accumulateConstantOffset(), canReplaceGEPIdxWithZero(), collectSRATypes(), llvm::ComputeValueVTs(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::isDereferenceableAndAlignedPointer(), llvm::memtag::StackInfoBuilder::isInterestingAlloca(), llvm::AArch64TargetLowering::isLegalAddressingMode(), llvm::StructType::isSized(), llvm::ConstantExpr::isSupportedGetElementPtr(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), llvm::FunctionLoweringInfo::set(), simplifyGEPInst(), splitMergedValStore(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
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 283 of file Type.h.
References isFloatingPointTy(), isIntegerTy(), isPointerTy(), isTargetExtTy(), isVectorTy(), and isX86_AMXTy().
Referenced by canConvertValue(), getAggregateSize(), llvm::InlineAsmLowering::lowerInlineAsm(), llvm::TargetLowering::ParseConstraints(), processInternalGlobal(), stripAggregateTypeWrapping(), and llvm::SCCPInstVisitor::trackValueOfGlobalVariable().
|
inline |
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 298 of file Type.h.
References ArrayTyID, getTypeID(), IntegerTyID, isFloatingPointTy(), isVectorTy(), PointerTyID, StructTyID, TargetExtTyID, and X86_AMXTyID.
Referenced by areGlobalsPotentiallyEqual(), llvm::PPCTTIImpl::areTypesABICompatible(), buildFrameDebugInfo(), canReplaceGEPIdxWithZero(), computeKnownBitsFromOperator(), llvm::AsmPrinter::emitGlobalAlias(), llvm::DataLayout::getGEPIndicesForOffset(), llvm::getLLTForType(), llvm::Value::getPointerAlignment(), llvm::DataLayout::getTypeSizeInBits(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), isDenselyPacked(), llvm::isDereferenceableAndAlignedPointer(), llvm::RISCVELFTargetObjectFile::isGlobalInSmallSection(), llvm::memtag::StackInfoBuilder::isInterestingAlloca(), llvm::AArch64TargetLowering::isLegalAddressingMode(), llvm::SITargetLowering::isLegalAddressingMode(), llvm::HexagonTargetLowering::isLegalAddressingMode(), llvm::StructType::isSized(), IsSmallObject(), llvm::TargetLowering::ParseConstraints(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), simplifyGEPInst(), tocDataChecks(), valueEscapes(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitArgument(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
|
inline |
True if this is an instance of StructType.
Definition at line 245 of file Type.h.
References getTypeID(), and StructTyID.
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::ConstantFoldLoadThroughBitcast(), createCast(), createWrapper(), llvm::ConstantAggregateZero::get(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), insertSinCosCall(), isConstantUsingVectorTy(), llvm::VNCoercion::isFirstClassAggregateOrScalableType(), isStructure(), isVectorPromotionViableForSlice(), matchType(), llvm::MipsCCState::originalTypeIsF128(), solveDIType(), solveTypeName(), llvm::Value::Value(), llvm::InlineAsm::verify(), and llvm::InstCombinerImpl::visitGetElementPtrInst().
|
inline |
Return true if this is a target extension type.
Definition at line 203 of file Type.h.
References getTypeID(), and TargetExtTyID.
Referenced by llvm::applyWrappers(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), and isSingleValueType().
|
inline |
Return true if this is 'token'.
Definition at line 221 of file Type.h.
References getTypeID(), and TokenTyID.
Referenced by llvm::SelectInst::areInvalidOperands(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), llvm::getLLTForType(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::TypedPointerType::isValidElementType(), matchIntrinsicType(), llvm::SinkInstructionStrategy::mutate(), llvm::removeAllNonTerminatorAndEHPadInstructions(), and SplitLandingPadPredecessorsImpl().
|
inline |
True if this is an instance of VectorType.
Definition at line 261 of file Type.h.
References FixedVectorTyID, getTypeID(), and ScalableVectorTyID.
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), canEvaluateShuffled(), canonicalizeBitCastExtElt(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromOperator(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadThroughBitcast(), createCmpXchgInstFun(), createLogicFromTable(), llvm::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedExpandLoad(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::createMemCpyLoopKnownSize(), llvm::CastInst::CreatePointerCast(), despeculateCountZeros(), llvm::emitGEPOffset(), llvm::VPInstruction::execute(), llvm::VPWidenCallRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), executeFCMP_BOOL(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UNO(), executeSelectInst(), expandAbs(), expandAnyIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandExpIntrinsic(), expandIntegerDot(), expandLengthIntrinsic(), expandLogIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findForkedSCEVs(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpTruncConstant(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldTruncShuffle(), llvm::ConstantAggregateZero::get(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), getCmpOpsType(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::ARMTTIImpl::getGatherScatterOpCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getInsertElement(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), getMaxForClamp(), llvm::RISCVTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::SPIRVGlobalRegistry::getOrCreateConsIntVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), getReducedType(), llvm::RISCVTTIImpl::getRegUsageForType(), getScalarType(), llvm::ARMTTIImpl::getShuffleCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), getUniformBase(), getValueOnEdge(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), insertValues(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::X86TargetLowering::isCheapToSpeculateCttz(), isConstantUsingVectorTy(), llvm::CastInst::isEliminableCastPair(), llvm::isImpliedCondition(), llvm::PPCTargetLowering::isLegalAddressingMode(), llvm::SystemZTargetLowering::isLegalAddressingMode(), isMMAType(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), IsTypePassedAsArray(), llvm::ShuffleVectorInst::isValidOperands(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::PatternMatch::ElementWiseBitCast_match< Op_t >::match(), llvm::MipsCCState::originalTypeIsVectorFloat(), llvm::MipsCCState::PreAnalyzeCallOperand(), llvm::MipsCCState::PreAnalyzeFormalArgument(), processSelect(), replaceWithCallToVeclib(), llvm::salvageDebugInfoImpl(), shouldConvertImpl(), ShouldPassAsArray(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyGEPInst(), simplifyX86immShift(), supportedAddressingMode(), threadCmpOverSelect(), transformToIndexedCompare(), TryToShrinkGlobalToBoolean(), llvm::PPCTTIImpl::vectorCostAdjustmentFactor(), llvm::Interpreter::visitAShr(), llvm::InstCombinerImpl::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::Interpreter::visitLShr(), llvm::Interpreter::visitShl(), llvm::InstCombinerImpl::visitTrunc(), llvm::Interpreter::visitUnaryOperator(), and WriteConstantInternal().
|
inline |
Return true if this is 'void'.
Definition at line 139 of file Type.h.
References getTypeID(), and VoidTyID.
Referenced by llvm::AllocaInst::AllocaInst(), llvm::CallLowering::ArgInfo::ArgInfo(), llvm::coro::Shape::buildFrom(), llvm::computeValueLLTs(), llvm::ComputeValueVTs(), copyMustTailReturn(), llvm::IRBuilderBase::CreateMalloc(), createRetPHINode(), llvm::Attributor::createShallowWrapper(), createWrapper(), llvm::Evaluator::EvaluateFunction(), llvm::OpenMPIRBuilder::finalize(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::objcarc::hasAttachedCallOpBundle(), llvm::InlineFunction(), llvm::isLibFreeFunction(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::TypedPointerType::isValidElementType(), llvm::SPIRV::lowerBuiltin(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::makeGuardControlFlowExplicit(), matchIntrinsicType(), matchType(), modifyIntrinsicCall(), llvm::SinkInstructionStrategy::mutate(), llvm::InstDeleterIRStrategy::mutate(), llvm::VPWidenCallRecipe::print(), llvm::VPReplicateRecipe::print(), llvm::promoteCall(), llvm::ExecutionEngine::runFunctionAsMain(), scalarizeMaskedVectorHistogram(), llvm::AttributeFuncs::typeIncompatible(), llvm::Value::Value(), and llvm::InlineAsm::verify().
|
inline |
Return true if this is X86 AMX.
Definition at line 200 of file Type.h.
References getTypeID(), and X86_AMXTyID.
Referenced by combineLoadToOperationType(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadFromUniformValue(), createTileStore(), isSingleValueType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::TypedPointerType::isValidElementType(), and matchIntrinsicType().
|
inline |
Return true if this is x86 long double.
Definition at line 159 of file Type.h.
References getTypeID(), and X86_FP80TyID.
Referenced by expandIToFP(), llvm::ExecutionEngine::getConstantValue(), and isValidElementType().
void llvm::Type::print | ( | raw_ostream & | O, |
bool | IsForDebug = false , |
||
bool | NoDetails = false |
||
) | const |
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.
Referenced by emitGlobalConstantFP(), llvm::Attribute::getAsString(), getBranchCondString(), getTypeName(), and PrintResults().
|
inlineprotected |
Definition at line 99 of file Type.h.
References assert(), and getSubclassData().
Referenced by llvm::StructType::containsScalableVectorType(), llvm::IntegerType::IntegerType(), llvm::StructType::isSized(), and llvm::StructType::setBody().
|
inline |
Definition at line 354 of file Type.h.
References ContainedTys.
Referenced by subtype_rend(), and subtypes().
|
inline |
Definition at line 355 of file Type.h.
References ContainedTys, and NumContainedTys.
Referenced by subtype_rbegin(), and subtypes().
|
inline |
Definition at line 362 of file Type.h.
References subtype_end().
|
inline |
Definition at line 365 of file Type.h.
References subtype_begin().
Definition at line 356 of file Type.h.
References subtype_begin(), and subtype_end().
|
friend |
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(), llvm::StructType::setBody(), subtype_begin(), subtype_end(), llvm::TargetExtType::type_param_begin(), llvm::TargetExtType::type_param_end(), and llvm::VectorType::VectorType().
|
protected |
Keeps track of how many Type*'s there are in the ContainedTys list.
Definition at line 106 of file Type.h.
Referenced by llvm::StructType::element_end(), getContainedType(), llvm::StructType::getElementType(), getNumContainedTypes(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::param_end(), llvm::StructType::setBody(), subtype_end(), llvm::TargetExtType::type_param_end(), and llvm::VectorType::VectorType().