LLVM 22.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 | |
LLVM_ABI void | print (raw_ostream &O, bool IsForDebug=false, bool NoDetails=false) const |
Print the current type. | |
LLVM_ABI void | dump () const |
LLVMContext & | getContext () const |
Return the LLVMContext in which this type was uniqued. | |
TypeID | getTypeID () const |
Return the type id for the type. | |
bool | isVoidTy () const |
Return true if this is 'void'. | |
bool | isHalfTy () const |
Return true if this is 'half', a 16-bit IEEE fp type. | |
bool | isBFloatTy () const |
Return true if this is 'bfloat', a 16-bit bfloat type. | |
bool | is16bitFPTy () const |
Return true if this is a 16-bit float type. | |
bool | isFloatTy () const |
Return true if this is 'float', a 32-bit IEEE fp type. | |
bool | isDoubleTy () const |
Return true if this is 'double', a 64-bit IEEE fp type. | |
bool | isX86_FP80Ty () const |
Return true if this is x86 long double. | |
bool | isFP128Ty () const |
Return true if this is 'fp128'. | |
bool | isPPC_FP128Ty () const |
Return true if this is powerpc long double. | |
bool | isIEEELikeFPTy () const |
Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout, and does not have non-IEEE values, such as x86_fp80's unnormal values. | |
bool | isFloatingPointTy () const |
Return true if this is one of the floating-point types. | |
bool | isMultiUnitFPType () const |
Returns true if this is a floating-point type that is an unevaluated sum of multiple floating-point units. | |
LLVM_ABI const fltSemantics & | getFltSemantics () const |
bool | isX86_AMXTy () const |
Return true if this is X86 AMX. | |
bool | isTargetExtTy () const |
Return true if this is a target extension type. | |
LLVM_ABI bool | isScalableTargetExtTy () const |
Return true if this is a target extension type with a scalable layout. | |
LLVM_ABI bool | isScalableTy (SmallPtrSetImpl< const Type * > &Visited) const |
Return true if this is a type whose size is a known multiple of vscale. | |
LLVM_ABI bool | isScalableTy () const |
LLVM_ABI bool | containsNonGlobalTargetExtType (SmallPtrSetImpl< const Type * > &Visited) const |
Return true if this type is or contains a target extension type that disallows being used as a global. | |
LLVM_ABI bool | containsNonGlobalTargetExtType () const |
LLVM_ABI bool | containsNonLocalTargetExtType (SmallPtrSetImpl< const Type * > &Visited) const |
Return true if this type is or contains a target extension type that disallows being used as a local. | |
LLVM_ABI bool | containsNonLocalTargetExtType () const |
bool | isFPOrFPVectorTy () const |
Return true if this is a FP type or a vector of FP. | |
bool | isLabelTy () const |
Return true if this is 'label'. | |
bool | isMetadataTy () const |
Return true if this is 'metadata'. | |
bool | isTokenTy () const |
Return true if this is 'token'. | |
bool | isTokenLikeTy () const |
Returns true if this is 'token' or a token-like target type.s. | |
bool | isIntegerTy () const |
True if this is an instance of IntegerType. | |
LLVM_ABI bool | isIntegerTy (unsigned Bitwidth) const |
Return true if this is an IntegerType of the given width. | |
bool | isIntOrIntVectorTy () const |
Return true if this is an integer type or a vector of integer types. | |
bool | isIntOrIntVectorTy (unsigned BitWidth) const |
Return true if this is an integer type or a vector of integer types of the given width. | |
bool | isIntOrPtrTy () const |
Return true if this is an integer type or a pointer type. | |
bool | isFunctionTy () const |
True if this is an instance of FunctionType. | |
bool | isStructTy () const |
True if this is an instance of StructType. | |
bool | isArrayTy () const |
True if this is an instance of ArrayType. | |
bool | isPointerTy () const |
True if this is an instance of PointerType. | |
bool | isPtrOrPtrVectorTy () const |
Return true if this is a pointer type or a vector of pointer types. | |
bool | isVectorTy () const |
True if this is an instance of VectorType. | |
LLVM_ABI bool | isRISCVVectorTupleTy () const |
LLVM_ABI bool | canLosslesslyBitCastTo (Type *Ty) const |
Return true if this type could be converted with a lossless BitCast to type 'Ty'. | |
LLVM_ABI bool | isEmptyTy () const |
Return true if this type is empty, that is, it has no elements or all of its elements are empty. | |
LLVM_ABI bool | isFirstClassType () const |
Return true if the type is "first class", meaning it is a valid type for a Value. | |
bool | isSingleValueType () const |
Return true if the type is a valid type for a register in codegen. | |
bool | isAggregateType () const |
Return true if the type is an aggregate type. | |
bool | isSized (SmallPtrSetImpl< Type * > *Visited=nullptr) const |
Return true if it makes sense to take the size of this type. | |
LLVM_ABI TypeSize | getPrimitiveSizeInBits () const LLVM_READONLY |
Return the basic size of this type if it is a primitive type. | |
LLVM_ABI unsigned | getScalarSizeInBits () const LLVM_READONLY |
If this is a vector type, return the getPrimitiveSizeInBits value for the element type. | |
LLVM_ABI int | getFPMantissaWidth () const |
Return the width of the mantissa of this type. | |
Type * | getScalarType () const |
If this is a vector type, return the element type, otherwise return 'this'. | |
subtype_iterator | subtype_begin () const |
subtype_iterator | subtype_end () const |
ArrayRef< Type * > | subtypes () const |
subtype_reverse_iterator | subtype_rbegin () const |
subtype_reverse_iterator | subtype_rend () const |
Type * | getContainedType (unsigned i) const |
This method is used to implement the type iterator (defined at the end of the file). | |
unsigned | getNumContainedTypes () const |
Return the number of types in the derived type. | |
LLVM_ABI unsigned | getIntegerBitWidth () const |
LLVM_ABI Type * | getFunctionParamType (unsigned i) const |
LLVM_ABI unsigned | getFunctionNumParams () const |
LLVM_ABI bool | isFunctionVarArg () const |
LLVM_ABI StringRef | getStructName () const |
LLVM_ABI unsigned | getStructNumElements () const |
LLVM_ABI Type * | getStructElementType (unsigned N) const |
LLVM_ABI uint64_t | getArrayNumElements () const |
Type * | getArrayElementType () const |
LLVM_ABI StringRef | getTargetExtName () const |
LLVM_ABI Type * | getWithNewType (Type *EltTy) const |
Given vector type, change the element type, whilst keeping the old number of elements. | |
LLVM_ABI Type * | getWithNewBitWidth (unsigned NewBitWidth) const |
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes. | |
LLVM_ABI Type * | getExtendedType () const |
Given scalar/vector integer type, returns a type with elements twice as wide as in the original type. | |
LLVM_ABI unsigned | getPointerAddressSpace () const |
Get the address space of this pointer or pointer vector type. | |
LLVM_ABI | LLVM_DEPRECATED ("Use PointerType::get instead", "PointerType::get") PointerType *getPointerTo(unsigned AddrSpace=0) const |
Return a pointer to the current type. |
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.
References llvm::CallingConv::C.
Referenced by llvm::ArrayType::classof(), llvm::dxil::AnyResourceExtType::classof(), llvm::dxil::CBufferExtType::classof(), llvm::dxil::FeedbackTextureExtType::classof(), llvm::dxil::LayoutExtType::classof(), llvm::dxil::MSTextureExtType::classof(), llvm::dxil::RawBufferExtType::classof(), llvm::dxil::SamplerExtType::classof(), llvm::dxil::TextureExtType::classof(), llvm::dxil::TypedBufferExtType::classof(), llvm::FunctionType::classof(), llvm::IntegerType::classof(), llvm::PointerType::classof(), llvm::StructType::classof(), llvm::TargetExtType::classof(), llvm::TypedPointerType::classof(), llvm::VectorType::classof(), llvm::object::MinidumpFile::create(), llvm::StructType::create(), llvm::ArrayType::get(), llvm::FunctionType::get(), llvm::PointerType::get(), llvm::StructType::get(), llvm::TypedPointerType::get(), llvm::VectorType::get(), llvm::VectorType::get(), llvm::VectorType::get(), getArrayElementType(), getContainedType(), llvm::ArrayType::getElementType(), llvm::StructType::getElementType(), llvm::TypedPointerType::getElementType(), llvm::VectorType::getElementType(), getExtendedType(), getFunctionParamType(), llvm::VectorType::getInteger(), llvm::FunctionType::getParamType(), llvm::dxil::CBufferExtType::getResourceType(), llvm::dxil::MSTextureExtType::getResourceType(), llvm::dxil::RawBufferExtType::getResourceType(), llvm::dxil::TextureExtType::getResourceType(), llvm::dxil::TypedBufferExtType::getResourceType(), llvm::FunctionType::getReturnType(), getScalarTy(), getScalarType(), getStructElementType(), llvm::VectorType::getTruncatedElementVectorType(), llvm::StructType::getTypeAtIndex(), llvm::TargetExtType::getTypeParameter(), llvm::PointerType::getUnqual(), getWithNewBitWidth(), getWithNewType(), llvm::VectorType::getWithSizeAndScalar(), llvm::dxil::LayoutExtType::getWrappedType(), llvm::IntegerType::IntegerType(), isScalableTy(), isScalableTy(), llvm::dxil::RawBufferExtType::isStructured(), llvm::TypedPointerType::isValidElementType(), llvm::VectorType::isValidElementType(), LLVM_DEPRECATED(), llvm::StructType::operator=(), llvm::TypedPointerType::operator=(), print(), 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
bool Type::containsNonGlobalTargetExtType | ( | ) | const |
Definition at line 86 of file Type.cpp.
References llvm::cast().
bool Type::containsNonGlobalTargetExtType | ( | SmallPtrSetImpl< const Type * > & | Visited | ) | const |
bool Type::containsNonLocalTargetExtType | ( | ) | const |
Definition at line 102 of file Type.cpp.
References llvm::cast().
bool Type::containsNonLocalTargetExtType | ( | SmallPtrSetImpl< const Type * > & | Visited | ) | const |
Return true if this type is or contains a target extension type that disallows being used as a local.
Definition at line 91 of file Type.cpp.
References llvm::cast().
LLVM_DUMP_METHOD void Type::dump | ( | ) | const |
Definition at line 5482 of file AsmWriter.cpp.
References llvm::dbgs(), dump(), and print().
Referenced by dump().
|
inline |
Definition at line 408 of file Type.h.
References ArrayTyID, assert(), ContainedTys, getTypeID(), and Type().
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), dynamicallyLoadArray(), fixI8UseChain(), llvm::ARMTTIImpl::getNumBytesToPadGlobalArray(), isConstantUsingVectorTy(), legalizeScalarLoadStoreOnArrays(), transformGlobalArray(), TypeContainsPointers(), and llvm::WebAssembly::wasmSymbolSetType().
|
inline |
Definition at line 425 of file DerivedTypes.h.
References llvm::cast().
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), and llvm::getConstantDataArrayInfo().
|
static |
Definition at line 284 of file Type.cpp.
Referenced by DecodeFixedType(), llvm::IRBuilderBase::getBFloatTy(), getSVEContainerIRType(), LLVMBFloatTypeInContext(), shrinkFPConstant(), upgradeAArch64IntrinsicCall(), upgradeAMDGCNIntrinsicCall(), upgradeArmOrAarch64IntrinsicFunction(), llvm::UpgradeIntrinsicCall(), and upgradeNVVMIntrinsicCall().
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 381 of file Type.h.
References assert(), ContainedTys, NumContainedTys, and Type().
Referenced by llvm::X86TTIImpl::getIntrinsicInstrCost(), getNumDefTiles(), getScalarType(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost(), and llvm::TargetExtType::getTypeParameter().
|
inline |
Return the LLVMContext in which this type was uniqued.
Definition at line 128 of file Type.h.
Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::VFABI::createFunctionType(), llvm::MatrixBuilder::CreateIndex(), llvm::orc::createIRTypedAddress(), llvm::VPScalarIVStepsRecipe::execute(), foldConstantCastPair(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::StructType::get(), llvm::TypedPointerType::get(), llvm::ConstantExpr::getAlignOf(), getCBufRetType(), llvm::VNCoercion::getConstantMemInstValueForLoad(), llvm::BasicTTIImplBase< BasicTTIImpl >::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::VectorType::getInteger(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getNumberOfParts(), getOrCreateElementStruct(), llvm::X86TTIImpl::getReplicationShuffleCost(), getResRetType(), getReturnAttrs(), getReturnAttrs(), llvm::CallLowering::getReturnInfo(), llvm::ConstantExpr::getShuffleVector(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::AArch64TTIImpl::getSpliceCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getSVEContainerIRType(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::VectorType::getTruncatedElementVectorType(), getTypePartition(), llvm::RISCVTTIImpl::getVectorInstrCost(), getWithNewBitWidth(), llvm::ValueAsMetadata::handleRAUW(), llvm::CallLowering::insertSRetIncomingArgument(), llvm::CallLowering::insertSRetLoads(), llvm::CallLowering::insertSRetOutgoingArgument(), llvm::CallLowering::insertSRetStores(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), llvm::isUntypedEquivalentToTyExt(), llvm::TargetLowering::LowerCallTo(), llvm::FastISel::lowerCallTo(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), llvm::AArch64CallLowering::lowerReturn(), llvm::CmpInst::makeCmpResultType(), llvm::TargetLowering::ParseConstraints(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), setInfoSVEStN(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyGEPInst(), llvm::CallLowering::splitToValueTypes(), llvm::toScalarizedStructTy(), llvm::toVectorizedStructTy(), widenCImmType(), and llvm::MetadataAsValue::~MetadataAsValue().
|
static |
Definition at line 286 of file Type.cpp.
Referenced by convertImplicitDefToConstZero(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getDoubleTy(), llvm::sandboxir::Type::getDoubleTy(), getFloatTypeForLLT(), getIntrinsicParamType(), getKeyFPValMD(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getScalarTy(), getSVEContainerIRType(), getTypeFromOpParamType(), 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.
Definition at line 748 of file DerivedTypes.h.
References assert(), llvm::cast(), llvm::dyn_cast(), llvm::VectorType::getExtendedElementVectorType(), isIntOrIntVectorTy(), and Type().
Referenced by llvm::IndexedReference::computeRefCost(), and dropRedundantMaskingOfLeftShiftInput().
|
static |
Definition at line 126 of file Type.cpp.
References llvm::IntegerType::get().
Referenced by llvm::ConstantFP::get().
|
static |
Definition at line 285 of file Type.cpp.
Referenced by llvm::SPIRVGlobalRegistry::buildConstantFP(), convertImplicitDefToConstZero(), llvm::MDBuilder::createFPMath(), DecodeFixedType(), expandIToFP(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::RISCVTTIImpl::getCastInstrCost(), llvm::IRBuilderBase::getFloatTy(), llvm::sandboxir::Type::getFloatTy(), getFloatTypeForLLT(), llvm::AArch64TTIImpl::getFP16BF16PromoteCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), llvm::RISCVTTIImpl::getRegUsageForType(), getScalarTy(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromOpParamType(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMFloatTypeInContext(), LowerFPToInt(), llvm::parseBasicTypeName(), llvm::parseTypeString(), ReplaceFPIntrinsicWithCall(), shrinkFPConstant(), llvm::UpgradeIntrinsicCall(), and upgradePTESTIntrinsic().
const fltSemantics & Type::getFltSemantics | ( | ) | const |
Definition at line 107 of file Type.cpp.
References llvm::cast().
Referenced by atomicIgnoresDenormalModeOrFPModeIsFTZ(), canEvaluateTruncated(), computeKnownFPClass(), llvm::ConstantFoldCastInstruction(), llvm::TargetLowering::expandIS_FPCLASS(), FoldBitCast(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), isSaturatingMinMax(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
static |
Definition at line 290 of file Type.cpp.
Referenced by DecodeFixedType(), expandFPToI(), expandIToFP(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getFloatTypeForLLT(), and LLVMFP128TypeInContext().
int 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.
Definition at line 236 of file Type.cpp.
Referenced by expandIToFP(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), isKnownExactCastIntToFP(), shrinkFPConstantVector(), and llvm::InstCombinerImpl::visitFPTrunc().
|
inline |
Definition at line 162 of file DerivedTypes.h.
References llvm::cast().
Definition at line 158 of file DerivedTypes.h.
References llvm::cast(), and Type().
|
static |
Definition at line 283 of file Type.cpp.
Referenced by convertTo16Bit(), DecodeFixedType(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getFloatTypeForLLT(), llvm::IRBuilderBase::getHalfTy(), llvm::sandboxir::Type::getHalfTy(), getIntrinsicParamType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVFloatType(), getSVEContainerIRType(), llvm::VectorType::getTruncatedElementVectorType(), getTypeFromOpParamType(), llvm::GCNTTIImpl::instCombineIntrinsic(), LLVMHalfTypeInContext(), matchFPExtFromF16(), llvm::parseBasicTypeName(), llvm::parseTypeString(), shrinkFPConstant(), simplifyAMDGCNImageIntrinsic(), and upgradeX86IntrinsicCall().
|
static |
Definition at line 299 of file Type.cpp.
Referenced by llvm::AArch64TargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::IRBuilderBase::getInt128Ty(), and LLVMInt128TypeInContext().
|
static |
Definition at line 296 of file Type.cpp.
Referenced by convertTo16Bit(), llvm::createProfileSamplingVar(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), expand16BitIsFinite(), expand16BitIsInf(), expand16BitIsNaN(), expand16BitIsNormal(), llvm::ConstantDataVector::get(), llvm::offloading::getEntryTy(), llvm::IRBuilderBase::getInt16Ty(), llvm::sandboxir::Type::getInt16Ty(), getIntrinsicParamType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::offloading::getOffloadingEntryInitializer(), getSVEContainerIRType(), getTypeFromOpParamType(), llvm::isBytewiseValue(), LLVMInt16TypeInContext(), llvm::parseBasicTypeName(), llvm::ARMTargetLowering::shouldConvertSplatType(), and simplifyAMDGCNImageIntrinsic().
|
static |
Definition at line 294 of file Type.cpp.
Referenced by llvm::VPlanTransforms::addMiddleCheck(), llvm::SelectInst::areInvalidOperands(), calcPredicateUsingBooleans(), llvm::VPBlendRecipe::computeCost(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::ConstantFoldCompareInstruction(), llvm::MDBuilder::createCallbackEncoding(), llvm::sampleprofutil::createFSDiscriminatorVariable(), llvm::VFABI::createFunctionType(), createMemprofHistogramFlagVar(), createRawLoad(), createTypedBufferLoad(), createTypedBufferStore(), DisableAllLoopOptsOnLoop(), llvm::AtomicInfo::EmitAtomicCompareExchangeLibcall(), fillCommonArgs(), llvm::ConstantExpr::getAlignOf(), llvm::IRBuilderBase::getAllOnesMask(), llvm::dxil::ResourceInfo::getAsMetadata(), getBinaryWithCarryType(), llvm::LoopVectorizationCostModel::getDivRemSpeculationCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getExtendedReductionCost(), llvm::ConstantInt::getFalse(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::IRBuilderBase::getInt1Ty(), llvm::sandboxir::Type::getInt1Ty(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), getMask(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), getTypeFromOpParamType(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::SelectionDAGBuilder::handleKillDebugValue(), hoistConditionalLoadsStores(), instCombineSVECmpNE(), LLVMInt1TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::CmpInst::makeCmpResultType(), llvm::sandboxir::CmpInst::makeCmpResultType(), llvm::InsertCFGStrategy::mutate(), OptimizeGlobalAddressOfAllocation(), replaceWithTLIFunction(), setAssignmentTrackingModuleFlag(), SimplifyCondBranchToCondBranch(), simplifySwitchLookup(), llvm::at::trackAssignments(), tryToReplaceALMWithWideALM(), TryToShrinkGlobalToBoolean(), and llvm::InstCombinerImpl::visitAllocSite().
|
static |
Definition at line 297 of file Type.cpp.
Referenced by llvm::VPlanTransforms::addExplicitVectorLength(), adjustInliningThresholdUsingCallee(), llvm::annotateValueSite(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), calcPredicateUsingInteger(), calculateGEPOffset(), calculateVectorIndex(), OutlinableGroup::collectGVNStoreSets(), llvm::VPInstruction::computeCost(), llvm::ConstantFoldInsertElementInstruction(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::ARMConstantPoolConstant::Create(), llvm::MDBuilder::createBranchWeights(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::IRBuilderBase::CreateConstGEP1_32(), llvm::IRBuilderBase::CreateConstGEP2_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_32(), llvm::dxil::ResourceTypeInfo::createElementStruct(), llvm::IRBuilderBase::CreateGlobalStringPtr(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), llvm::createProfileSamplingVar(), createRelLookupTable(), createRoundingModeDecoration(), createSaturatedConversionDecoration(), createStringMetadata(), createSwitchStatement(), downcastI64toI32InsertExtractElements(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(), emitTargetTaskProxyFunction(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::expandUser(), findCostForOutputBlocks(), llvm::SanitizerStatReport::finish(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), getArgTypesFromOpParamTypes(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::dxil::ResourceInfo::getAsMetadata(), getBinaryWithCarryType(), getDefaultPersonalityFn(), getEntryPropAsMetadata(), llvm::offloading::getEntryTy(), llvm::CSKYInstrInfo::getGlobalBaseReg(), llvm::getInductionIntegerTy(), llvm::IRBuilderBase::getInt32Ty(), llvm::sandboxir::Type::getInt32Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), llvm::SelectionDAG::getMemcmp(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), getMul64(), llvm::offloading::getOffloadingEntryInitializer(), getOffsetFromIndices(), getPownType(), getPromotedType(), getResBindType(), getResPropsType(), getResRetType(), llvm::ConstantExpr::getSizeOf(), getSplitDoubleType(), getSVEContainerIRType(), getTagValueAsMetadata(), getTypeFromOpParamType(), llvm::HardwareLoopInfo::HardwareLoopInfo(), INITIALIZE_PASS(), insertCall(), llvm::BPFCoreSharedInfo::insertPassThrough(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), llvm::isBytewiseValue(), llvm::ARMTTIImpl::isHardwareLoopProfitable(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), llvm::ARMLegalizerInfo::legalizeCustom(), legalizeGetHighLowi64Bytes(), legalizeScalarLoadStoreOnArrays(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XCoreInstrInfo::loadImmediate(), llvm::XtensaInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerKernelArguments(), lowerLoadRelative(), lowerPtrAnnotation(), makeDoubleDoubleI32(), makeX86FP80X86FP80I32(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::EscapeEnumerator::Next(), llvm::parseBasicTypeName(), llvm::parseTypeString(), processBlockAddr(), replaceCalledFunction(), replaceWithGEP(), llvm::KCFIPass::run(), llvm::WasmEHPreparePass::run(), runImpl(), runPass(), llvm::scaleProfData(), SegmentOffset(), llvm::sandboxir::Region::setAux(), llvm::InstrProfCntrInstBase::setIndex(), llvm::setKCFIType(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyRelativeLoad(), splitGlobal(), splitMergedValStore(), transformRecipestoEVLRecipes(), tryToImproveAlign(), upcastI8AllocasAndUses(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), upgradeX86IntrinsicCall(), validExtractValueIndex(), validInsertValueIndex(), validShuffleVectorIndex(), and llvm::InstCombinerImpl::visitBitCast().
|
static |
Definition at line 298 of file Type.cpp.
Referenced by addModuleFlags(), llvm::GlobalObject::addTypeMetadata(), llvm::annotateValueSite(), llvm::memprof::buildCallstackMetadata(), llvm::MachineFunction::CallSiteInfo::CallSiteInfo(), llvm::VPInstruction::computeCost(), llvm::MDBuilder::createCallbackEncoding(), llvm::IRBuilderBase::CreateConstGEP1_64(), llvm::IRBuilderBase::CreateConstGEP2_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_64(), llvm::MDBuilder::createFunctionEntryCount(), createIRLevelProfileFlagVar(), llvm::MDBuilder::createIrrLoopHeaderWeight(), llvm::orc::createIRTypedAddress(), llvm::MDBuilder::createLLVMStats(), createMIBNode(), createOutlinedFunction(), llvm::MDBuilder::createPseudoProbeDesc(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::MDBuilder::createTBAAAccessTag(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::MDBuilder::createTBAATypeNode(), llvm::orc::IRSpeculationLayer::emit(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitHiddenKernelArgs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainderUpTo64Bits(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), extractNumericCGTypeId(), foldConstantCastPair(), foldInsSequenceIntoSplat(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::offloading::getEntryTy(), llvm::DIBasicType::getImpl(), llvm::IRBuilderBase::getInt64Ty(), llvm::sandboxir::Type::getInt64Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), getKeyValMD(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), getMul64(), llvm::offloading::getOffloadingEntryInitializer(), llvm::DIBuilder::getOrCreateSubrange(), llvm::DIBuilder::getOrCreateSubrange(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantVector::getSplat(), llvm::InstrProfIncrementInst::getStep(), getSVEContainerIRType(), getTagValueAsMetadata(), getTypeFromOpParamType(), llvm::MIRParserImpl::initializeCallSiteInfo(), instCombineSVEDup(), instCombineSVELast(), llvm::isBytewiseValue(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), LLVMInt64TypeInContext(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::DISubrangeType::MDNode, llvm::parseBasicTypeName(), llvm::orc::ReOptimizeLayer::reoptimizeIfCallFrequent(), llvm::scaleProfData(), llvm::GlobalObject::setVCallVisibilityMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), llvm::RISCVTTIImpl::shouldConsiderAddressTypePromotion(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyX86extrq(), simplifyX86insertq(), tryToReplaceALMWithWideALM(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), llvm::UpgradeTBAANode(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitExtractElementInst().
|
static |
Definition at line 295 of file Type.cpp.
Referenced by llvm::memtag::alignAndPadAlloca(), allocateFrameInCaller(), BuildConstantFromSCEV(), classifyConstantWithOpaquePtr(), createGlobalFwdRef(), llvm::createMemCpyLoopKnownSize(), createMemMoveLoopKnownSize(), createMemMoveLoopUnknownSize(), llvm::coro::BaseCloner::deriveNewFramePointer(), llvm::orc::IRSpeculationLayer::emit(), fillCommonArgs(), foldGEPChainAsU8Access(), llvm::ConstantDataVector::get(), llvm::SelectionDAG::getAtomicMemset(), llvm::IRBuilderBase::getInt8Ty(), llvm::sandboxir::Type::getInt8Ty(), llvm::BasicTTIImplBase< BasicTTIImpl >::getInterleavedMemoryOpCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), getPointeeTypeByCallInst(), llvm::sandboxir::Utils::getPointerDiffInBytes(), getPointerOperandAndType(), llvm::dxil::DXILOpBuilder::getResBind(), getResBindType(), getSVEContainerIRType(), getTypeFromOpParamType(), getValueOrPoison(), llvm::isBytewiseValue(), isPointerAlwaysReplaceable(), llvm::isUntypedEquivalentToTyExt(), LLVMInt8TypeInContext(), llvm::AArch64CallLowering::lowerCall(), llvm::coro::LowererBase::makeSubFnCall(), OptimizeGlobalAddressOfAllocation(), llvm::parseBasicTypeName(), llvm::SPIRV::parseBuiltinCallArgumentType(), runImpl(), runImpl(), simplifyX86extrq(), simplifyX86insertq(), llvm::coro::AsyncABI::splitCoroutine(), splitGlobal(), llvm::toTypedPointer(), tryToFoldLiveIns(), tryToOptimizeStoreOfAllocationToGlobal(), tryToShorten(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), validateLifetimeStart(), and llvm::InstCombinerImpl::visitAllocSite().
|
inline |
Definition at line 99 of file DerivedTypes.h.
References llvm::cast().
Referenced by canBeCheaplyTransformed(), computeKnownFPClass(), eliminateDeadSwitchCases(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::RecurrenceDescriptor::getSentinelValue(), hasSameExtUse(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), matchSubIntegerPackFromVector(), llvm::HashRecognize::recognizeCRC(), simplifyX86varShift(), tryNarrowMathIfNoOverflow(), unpackFromRegLoc(), and unpackFromRegLoc().
|
static |
Definition at line 301 of file Type.cpp.
Referenced by buildFrameType(), checkVectorTypesForPromotion(), computeRecurrenceType(), createBitOrPointerCast(), createCmpXchgInstFun(), llvm::FixedPointBuilder< IRBuilderTy >::CreateFloatingToFixed(), createMaskInstrs(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::LoongArchTargetLowering::emitExpandAtomicRMW(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), expandIsFPClass(), llvm::X86TTIImpl::getArithmeticReductionCost(), getConstantVector(), llvm::IntegerType::getExtendedType(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::IRBuilderBase::getIntNTy(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::DataLayout::getLargestLegalIntType(), getMemCmpLoad(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getReplicationShuffleCost(), getScalarTy(), llvm::DataLayout::getSmallestLegalIntType(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::ScalarEvolution::getTripCountFromExitCount(), getWithNewBitWidth(), inlineGetBaseAndOffset(), llvm::isBytewiseValue(), isIntegerWideningViable(), isValidProtoForSizeReturningNew(), isVectorPromotionViableForSlice(), llvm::LegalizerHelper::libcall(), llvm::RISCVTargetLowering::lowerInterleaveIntrinsicToStore(), lowerKernelArguments(), makeStatepointExplicitImpl(), mergeConsecutivePartStores(), llvm::parseBasicTypeName(), processConstantStringArg(), promoteAllocaUserToVector(), llvm::recognizeBSwapOrBitReverseIdiom(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), simplifyX86movmsk(), and splitMergedValStore().
|
static |
Definition at line 282 of file Type.cpp.
Referenced by LLVMLabelTypeInContext().
|
static |
Definition at line 287 of file Type.cpp.
Referenced by DecodeFixedType(), llvm::MetadataAsValue::get(), llvm::EVT::getTypeForEVT(), LLVMMetadataTypeInContext(), llvm::dxil::ValueEnumerator::ValueEnumerator(), and llvm::ValueEnumerator::ValueEnumerator().
|
inline |
Return the number of types in the derived type.
Definition at line 387 of file Type.h.
References NumContainedTys.
Referenced by llvm::TargetExtType::getNumTypeParameters().
|
inline |
Get the address space of this pointer or pointer vector type.
Definition at line 771 of file DerivedTypes.h.
References llvm::cast(), and getScalarType().
Referenced by llvm::AMDGPUAAResult::alias(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), aspaceWrapOperand(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), classifyGlobalCtorPointerType(), llvm::orc::cloneGlobalAliasDecl(), collectMemAccessInfo(), llvm::ConstantFoldCastOperand(), convertScratchAtomicToFlatAtomic(), convertValue(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::expandMemMoveAsLoop(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), llvm::CastInst::getCastOpcode(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::RISCVTTIImpl::getIntImmCostInst(), getMemSetPattern16Value(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::GEPOperator::getPointerAddressSpace(), llvm::GetElementPtrInst::getPointerAddressSpace(), llvm::LoadInst::getPointerAddressSpace(), llvm::PtrToAddrInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::getPointersDiff(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), HandleByValArgument(), handleSpaceCheckIntrinsics(), inlineGetBaseAndOffset(), llvm::AMDGPU::instrumentAddressImpl(), llvm::AA::isAssumedThreadLocalObject(), llvm::AMDGPU::isDynamicLDS(), llvm::CastInst::isEliminableCastPair(), llvm::AANoAlias::isImpliedByIR(), llvm::AANonNull::isImpliedByIR(), isKnownNonNullFromDominatingCondition(), isKnownNonZeroFromAssume(), llvm::AMDGPU::isLDSVariableToLower(), isNoopPtrIntCastPair(), isNoWrap(), isUnsupportedAMDGPUAddrspace(), llvm::TargetLowering::LowerCallTo(), llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::RISCVTargetLowering::lowerInterleavedLoad(), llvm::RISCVTargetLowering::lowerInterleavedStore(), maybePrintCallAddrSpace(), optimizeOnceStoredGlobal(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::NVPTXTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::SPIRVTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::CallLowering::setArgFlags(), shouldInstrumentReadWriteFromAddress(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitReturnInst().
|
static |
Definition at line 291 of file Type.cpp.
Referenced by DecodeFixedType(), LLVMPPCFP128TypeInContext(), and shrinkFPConstant().
TypeSize Type::getPrimitiveSizeInBits | ( | ) | const |
Return the basic size of this type if it is a primitive type.
These are fixed by LLVM and are not target-dependent. This will return zero if the type does not have a size or is not a primitive type.
If this is a scalable vector type, the scalable property will be set and the runtime size will be a positive integer multiple of the base size.
Note that this may not reflect the size of memory allocated for an instance of the type or the number of bytes that are written when an instance of the type is stored to memory. The DataLayout class provides additional query functions to provide this information.
Definition at line 198 of file Type.cpp.
Referenced by llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), areExtractShuffleVectors(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canWidenLoad(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), collectInsertionElements(), combineConstantPoolLoads(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), convertStrToInt(), createCmpXchgInstFun(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPPERMMask(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::PPCTargetLowering::emitStoreConditional(), expandIsFPClass(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpEquality(), foldIdentityExtractShuffle(), foldLoadsRecursive(), foldVecTruncToExtElt(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantDataSequential::getElementByteSize(), llvm::VectorType::getInteger(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), getTargetConstantBitsFromNode(), llvm::ScalarEvolution::getTripCountFromExitCount(), llvm::VectorType::getTruncatedElementVectorType(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::VectorType::getWithSizeAndScalar(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::CastInst::isBitCastable(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isZExtFree(), matchPartStore(), printConstant(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), rebuildSplatCst(), rebuildZeroUpperCst(), llvm::replaceAllDbgUsesWith(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedLoad(), scalarizeMaskedStore(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyICmpInst(), simplifySwitchLookup(), simplifyX86immShift(), simplifyX86pack(), upcastI8AllocasAndUses(), upgradeAVX512MaskToSelect(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), upgradeX86IntrinsicCall(), and upgradeX86VPERMT2Intrinsics().
|
static |
unsigned Type::getScalarSizeInBits | ( | ) | const |
If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
Otherwise return the getPrimitiveSizeInBits value for this type.
Definition at line 231 of file Type.cpp.
Referenced by canEvaluateShiftedShift(), canEvaluateTruncated(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canScalarizeAccess(), canTryToConstantAddTwoShiftAmounts(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), compareCmp(), llvm::VPWidenSelectRecipe::computeCost(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsMul(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::SelectionDAG::ComputeNumSignBits(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldIntegerCast(), ConvertShiftToMul(), llvm::copyRangeMetadata(), llvm::IRBuilderBase::CreateFPCast(), llvm::MatrixBuilder::CreateIndex(), llvm::MatrixBuilder::CreateIndexAssumption(), llvm::IRBuilderBase::CreateIntCast(), createScalarIVSteps(), llvm::VPBuilder::createScalarZExtOrTrunc(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateStepVector(), llvm::CastInst::CreateTruncOrBitCast(), llvm::IRBuilderBase::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrTrunc(), decompose(), dropRedundantMaskingOfLeftShiftInput(), llvm::VPScalarIVStepsRecipe::execute(), expandVPWidenIntOrFpInduction(), FlattenLoopPair(), FoldBitCast(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldItoFPtoI(), foldSelectICmpAnd(), foldSelectICmpAndAnd(), foldSelectICmpLshrAshr(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldTruncShuffle(), foldVecExtTruncToExtElt(), llvm::TargetLoweringBase::getBitWidthForCttzElements(), getElSizeLog2Diff(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), getHistogramCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::GCNTTIImpl::getLoadVectorFactor(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), getTargetConstantBitsFromNode(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::getWiderInductionTy(), llvm::VectorType::getWithSizeAndScalar(), llvm::X86TTIImpl::instCombineIntrinsic(), isConsecutiveInterleaveGroup(), llvm::CastInst::isEliminableCastPair(), llvm::SystemZTTIImpl::isFoldableLoad(), llvm::AArch64TTIImpl::isLegalBroadcastLoad(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::CastInst::isNoopCast(), llvm::AMDGPUTargetLowering::isTruncateFree(), llvm::AMDGPUTargetLowering::isZExtFree(), matchOrConcat(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), processAShr(), processTrunc(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::salvageDebugInfoImpl(), simplifyAndInst(), simplifyAShrInst(), llvm::simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyRecipe(), simplifyUnaryIntrinsic(), simplifyX86pack(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::Constant::toConstantRange(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryNarrowMathIfNoOverflow(), tryToRecognizeTableBasedCttz(), upgradeAVX512MaskToSelect(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), and llvm::InstCombinerImpl::visitZExt().
|
inlinestatic |
Definition at line 461 of file Type.h.
References llvm::CallingConv::C, getDoubleTy(), getFloatTy(), getIntNTy(), llvm_unreachable, and Type().
Referenced by llvm::ConstantDataArray::get().
|
inline |
If this is a vector type, return the element type, otherwise return 'this'.
Definition at line 352 of file Type.h.
References getContainedType(), getScalarType(), inline, isVectorTy(), and Type().
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), calculateGEPOffset(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), canonicalizeGEPOfConstGEPI8(), llvm::CastInst::castIsValid(), computeKnownBits(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughBitcast(), llvm::IRBuilderBase::CreateStepVector(), createTypedBufferStore(), decompose(), llvm::emitGEPOffset(), evaluateInDifferentElementOrder(), llvm::VPScalarIVStepsRecipe::execute(), expandAbs(), expandAnyOrAllIntrinsic(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandExpIntrinsic(), expandFloatDotIntrinsic(), expandFRem(), expandIntegerDotIntrinsic(), expandLogIntrinsic(), llvm::SelectionDAG::expandMultipleResultFPLibCall(), expandNormalizeIntrinsic(), expandSignIntrinsic(), FoldBitCast(), foldFCmpFpTrunc(), foldFCmpFSubIntoFCmp(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), llvm::AArch64TTIImpl::getArithmeticReductionCost(), getCmpOpsType(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::Constant::getIntegerValue(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), getOneFP(), llvm::VectorType::getOneNthElementsVectorType(), getPointerAddressSpace(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), getScalarType(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::TargetTransformInfo::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getWidenedType(), llvm::VectorType::getWithSizeAndScalar(), getZeroFP(), hasSameExtUse(), isFPOrFPVectorTy(), isIntOrIntVectorTy(), isIntOrIntVectorTy(), isKnownNonZeroFromOperator(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalMaskedStore(), isPtrOrPtrVectorTy(), llvm::HexagonSubtarget::isTypeForHVX(), isUnsupportedAMDGPUAddrspace(), optimizeCallInst(), optimizeSection(), replaceWithCallToVeclib(), resourceAccessNeeds64BitExpansion(), rmwOpMayLowerToLibcall(), llvm::CallLowering::setArgFlags(), llvm::ARMTargetLowering::shouldConvertSplatType(), shouldInstrumentReadWriteFromAddress(), shrinkInsertElt(), shrinkSplatShuffle(), simplifyAMDGCNImageIntrinsic(), upgradeNVVMIntrinsicCall(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
Definition at line 393 of file DerivedTypes.h.
References llvm::cast(), N, and Type().
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), expandBufferLoadIntrinsic(), fillIndirectionTable(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), isConstantUsingVectorTy(), simplifyX86addcarry(), and TypeContainsPointers().
|
inline |
Definition at line 385 of file DerivedTypes.h.
References llvm::cast().
Referenced by llvm::SPIRV::lowerBuiltinType(), and false::GepNode::operator<<.
|
inline |
Definition at line 389 of file DerivedTypes.h.
References llvm::cast().
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), isConstantUsingVectorTy(), and TypeContainsPointers().
|
inlineprotected |
Definition at line 97 of file Type.h.
Referenced by llvm::PointerType::getAddressSpace(), llvm::TypedPointerType::getAddressSpace(), llvm::IntegerType::getBitWidth(), llvm::TargetExtType::getNumIntParameters(), llvm::StructType::isLiteral(), llvm::StructType::isOpaque(), llvm::StructType::isPacked(), llvm::FunctionType::isVarArg(), and setSubclassData().
|
inline |
Definition at line 868 of file DerivedTypes.h.
References llvm::cast().
|
static |
Definition at line 288 of file Type.cpp.
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::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), getArrayElementType(), llvm::ExecutionEngine::getConstantValue(), getOneFP(), llvm::getPointerAddressSpace(), llvm::VectorType::getTruncatedElementVectorType(), getZeroFP(), llvm::SPIRV::handle(), llvm::SPIRV::irhandle_explict_layout_type(), is16bitFPTy(), isAggregateType(), isArrayTy(), isBFloatTy(), isDoubleTy(), isFloatingPointTy(), isFloatTy(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIEEELikeFPTy(), isIntegerTy(), isLabelTy(), isMetadataTy(), isMultiUnitFPType(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), isTargetExtTy(), isTokenTy(), isVectorTy(), isVoidTy(), isX86_AMXTy(), isX86_FP80Ty(), needsFPFromSig(), needsFPStubFromParams(), ReplaceFPIntrinsicWithCall(), rmwOpMayLowerToLibcall(), llvm::MCJIT::runFunction(), TypeContainsPointers(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), and llvm::Interpreter::visitShuffleVectorInst().
|
static |
Definition at line 281 of file Type.cpp.
Referenced by llvm::VPHistogramRecipe::computeCost(), createBPFUnreachable(), llvm::MIRParserImpl::createDummyFunction(), CreateFailBB(), createFrameHelperMachineFunction(), llvm::IRBuilderBase::CreateFree(), llvm::RandomIRBuilder::createFunctionDefinition(), llvm::createMemLibcall(), llvm::orc::ReOptimizeLayer::createReoptimizeCall(), llvm::createSanitizerCtor(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::declareSanitizerInitFunction(), DecodeFixedType(), llvm::orc::IRSpeculationLayer::emit(), llvm::AtomicInfo::EmitAtomicLoadLibcall(), llvm::AtomicInfo::EmitAtomicStoreLibcall(), emitInlineAsm(), emitSMEStateSaveRestore(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::VPInterleaveEVLRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), llvm::SelectionDAG::expandMultipleResultFPLibCall(), expandToSwitch(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), getFreshReductionFunc(), getFunctionTypeFromAsyncSuspend(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::SelectionDAG::getMemset(), llvm::getOrCreateSanitizerCtorAndInitFunctions(), getOrInsertValueProfilingCall(), llvm::coro::Shape::getResumeFunctionType(), llvm::EVT::getTypeForEVT(), getTypeFromOpParamType(), llvm::IRBuilderBase::getVoidTy(), InsertCall(), insertCall(), insertCallBeforeInstruction(), insertInlineAsmProcess(), InsertSafepointPoll(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::ARMTargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), insertUseHolderAfter(), LLVMVoidTypeInContext(), lowerAwaitSuspend(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), llvm::TargetLowering::LowerCallTo(), llvm::VETargetLowering::lowerDYNAMIC_STACKALLOC(), llvm::SparcTargetLowering::LowerF128Op(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SelectionDAG::makeStateFunctionCall(), makeStatepointExplicitImpl(), llvm::InsertFunctionStrategy::mutate(), llvm::parseBasicTypeName(), llvm::parseTypeString(), llvm::DeclareRuntimeLibcallsPass::run(), runImpl(), and llvm::Interpreter::visitReturnInst().
|
static |
Definition at line 305 of file Type.cpp.
Referenced by llvm::EVT::getTypeForEVT().
|
static |
Definition at line 310 of file Type.cpp.
Referenced by llvm::EVT::getTypeForEVT().
Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.
Definition at line 764 of file DerivedTypes.h.
References assert(), getContext(), getIntNTy(), getWithNewType(), isIntOrIntVectorTy(), and Type().
Referenced by extractIntPart(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::X86TTIImpl::getCastInstrCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), llvm::X86TTIImpl::getIntrinsicInstrCost(), and llvm::BasicTTIImplBase< BasicTTIImpl >::getTypeBasedIntrinsicInstrCost().
Given vector type, change the element type, whilst keeping the old number of elements.
For non-vectors simply returns EltTy
.
Definition at line 758 of file DerivedTypes.h.
References llvm::dyn_cast(), llvm::VectorType::get(), and Type().
Referenced by llvm::AArch64TTIImpl::getFP16BF16PromoteCost(), getWithNewBitWidth(), shrinkSplatShuffle(), simplifyAMDGCNImageIntrinsic(), llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitPtrToInt().
|
static |
Definition at line 292 of file Type.cpp.
Referenced by createAllocaInstAtEntry(), DecodeFixedType(), llvm::EVT::getTypeForEVT(), and LLVMX86AMXTypeInContext().
|
static |
Definition at line 289 of file Type.cpp.
Referenced by getFloatTypeForLLT(), LLVMX86FP80TypeInContext(), makeX86FP80X86FP80(), makeX86FP80X86FP80I32(), makeX86FP80X86FP80X86FP80(), and makeX86FP80X86FP80X86FP80X86FP80().
|
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 304 of file Type.h.
References ArrayTyID, getTypeID(), and StructTyID.
Referenced by advanceToNextLeafType(), llvm::SPIRVGlobalRegistry::buildAssignType(), llvm::CastInst::castIsValid(), and lowerKernelArguments().
|
inline |
True if this is an instance of ArrayType.
Definition at line 264 of file Type.h.
References ArrayTyID, and getTypeID().
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), llvm::ARMTTIImpl::getNumBytesToPadGlobalArray(), llvm::SPIRVGlobalRegistry::getOrCreateConstIntArray(), isArray(), and isConstantUsingVectorTy().
|
inline |
Return true if this is 'bfloat', a 16-bit bfloat type.
Definition at line 145 of file Type.h.
References BFloatTyID, and getTypeID().
Referenced by emitDebugValueComment(), expandIToFP(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::RISCVTTIImpl::getRegUsageForType(), isLegalElementTypeForRVV(), isLegalMaskedLoadStore(), isV2BF16(), isV2F16OrV2BF16(), and upgradeNVVMIntrinsicCall().
|
inline |
Return true if this is 'double', a 64-bit IEEE fp type.
Definition at line 156 of file Type.h.
References DoubleTyID, and getTypeID().
Referenced by emitDebugValueComment(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandIToFP(), getCBufRetType(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::ExecutionEngine::LoadValueFromMemory(), optimizeDoubleFP(), printConstant(), rebuildConstant(), resourceAccessNeeds64BitExpansion(), and shrinkFPConstant().
bool Type::isEmptyTy | ( | ) | const |
Return true if this type is empty, that is, it has no elements or all of its elements are empty.
Definition at line 181 of file Type.cpp.
Referenced by llvm::slpvectorizer::BoUpSLP::canMapToVector(), and findArgumentCopyElisionCandidates().
bool Type::isFirstClassType | ( | ) | const |
Return true if the type is "first class", meaning it is a valid type for a Value.
Definition at line 250 of file Type.cpp.
Referenced by llvm::CastInst::castIsValid(), llvm::FunctionComparator::cmpConstants(), foldConstantCastPair(), llvm::CastInst::getCastOpcode(), and llvm::CastInst::isBitCastable().
|
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::VPReductionRecipe::computeCost(), convertTo16Bit(), llvm::VPlanTransforms::convertToConcreteRecipes(), createBitOrPointerCast(), createCmpXchgInstFun(), createMaskInstrs(), emitTransformedIndex(), llvm::VPScalarIVStepsRecipe::execute(), expandAnyOrAllIntrinsic(), expandFloatDotIntrinsic(), expandFRem(), expandSignIntrinsic(), expandVPWidenIntOrFpInduction(), foldSelectShuffleWith1Binop(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::HexagonTTIImpl::getMemoryOpCost(), getMemSetPatternValue(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::VectorType::getTruncatedElementVectorType(), llvm::X86TTIImpl::getVectorInstrCost(), isFPOrFPVectorTy(), llvm::InductionDescriptor::isInductionPHI(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), optimizeLatchExitInductionUser(), llvm::TargetLoweringBase::shouldCastAtomicLoadInIR(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), llvm::TargetLoweringBase::shouldConvertPhiType(), simplifyAMDGCNImageIntrinsic(), supportedAddressingMode(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().
|
inline |
Return true if this is 'float', a 32-bit IEEE fp type.
Definition at line 153 of file Type.h.
References FloatTyID, and getTypeID().
Referenced by canContractSqrtToRsq(), emitDebugValueComment(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::ExecutionEngine::LoadValueFromMemory(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), and upgradeAMDGCNIntrinsicCall().
|
inline |
Return true if this is 'fp128'.
Definition at line 162 of file Type.h.
References FP128TyID, and getTypeID().
Referenced by llvm::SparcTargetLowering::LowerF128_LibCallArg(), and llvm::SparcTargetLowering::LowerF128Op().
|
inline |
Return true if this is a FP type or a vector of FP.
Definition at line 225 of file Type.h.
References getScalarType(), and isFloatingPointTy().
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), llvm::CastInst::castIsValid(), CC_MipsO32(), llvm::ConstantFoldCompareInstruction(), FoldBitCast(), foldBitCastBitwiseLogic(), foldCopySignIdioms(), llvm::HexagonTTIImpl::getCastInstrCost(), and upgradeAVX512MaskToSelect().
|
inline |
True if this is an instance of FunctionType.
Definition at line 258 of file Type.h.
References FunctionTyID, and getTypeID().
Referenced by llvm::AArch64Subtarget::classifyGlobalFunctionReference(), llvm::convertToDeclaration(), llvm::AsmPrinter::emitGlobalAlias(), llvm::emitLinkerFlagsForGlobalCOFF(), isFunctionGlobalAddress(), llvm::SystemZSubtarget::isPC32DBLSymbol(), and llvm::SITargetLowering::shouldEmitGOTReloc().
|
inline |
Definition at line 154 of file DerivedTypes.h.
References llvm::cast().
|
inline |
Return true if this is 'half', a 16-bit IEEE fp type.
Definition at line 142 of file Type.h.
References getTypeID(), and HalfTyID.
Referenced by canContractSqrtToRsq(), canSafelyConvertTo16Bit(), emitDebugValueComment(), expandIToFP(), getCBufRetType(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegUsageForType(), llvm::X86TTIImpl::getStoreMinimumVF(), getTargetConstantBitsFromNode(), llvm::InductionDescriptor::isInductionPHI(), isLegalElementTypeForRVV(), llvm::ARMTargetLowering::isLegalInterleavedAccessType(), isLegalMaskedLoadStore(), isV2F16(), isV2F16OrV2BF16(), optimizeSection(), printConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), and simplifyAMDGCNImageIntrinsic().
|
inline |
Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout, and does not have non-IEEE values, such as x86_fp80's unnormal values.
Definition at line 170 of file Type.h.
References BFloatTyID, DoubleTyID, FloatTyID, FP128TyID, getTypeID(), and HalfTyID.
Referenced by isFloatingPointTy().
|
inline |
True if this is an instance of IntegerType.
Definition at line 240 of file Type.h.
References getTypeID(), and IntegerTyID.
Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), canConvertValue(), llvm::canPeelLastIteration(), canSafelyConvertTo16Bit(), llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::VPExpressionRecipe::computeCost(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldLoadThroughBitcast(), convertTo16Bit(), countToEliminateCompares(), llvm::CastInst::CreateBitOrPointerCast(), createNodeForSelectViaUMinSeq(), createScalarIVSteps(), llvm::decomposeLinearExpression(), emitTransformedIndex(), llvm::VPScalarIVStepsRecipe::execute(), expandBounds(), expandBufferLoadIntrinsic(), expandBufferStoreIntrinsic(), expandIntegerDotIntrinsic(), expandSignIntrinsic(), expandVPWidenIntOrFpInduction(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), foldTwoEntryPHINode(), genLoopLimit(), getAISize(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::CastInst::getCastOpcode(), getCBufRetType(), llvm::getConstantDataArrayInfo(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getExtractElement(), getHistogramCost(), llvm::DataLayout::getIndexedOffsetInType(), llvm::ConstantExpr::getInsertElement(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::ARMTTIImpl::getNumBytesToPadGlobalArray(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::SPIRVGlobalRegistry::getOrCreateOpTypeCoopMatr(), llvm::RISCVTTIImpl::getPartialReductionCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::AArch64TTIImpl::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::hasIterationCountInvariantInParent(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::CastInst::isEliminableCastPair(), llvm::InductionDescriptor::isInductionPHI(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntOrIntVectorTy(), isIntOrIntVectorTy(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::X86TTIImpl::isProfitableToSinkOperands(), isSingleValueType(), llvm::ConstantDataSequential::isString(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::AAPotentialConstantValues::isValidIRPositionForInit(), llvm::AAValueConstantRange::isValidIRPositionForInit(), isVectorPromotionViableForSlice(), llvm::AArch64TargetLowering::isZExtFree(), llvm::MSP430TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::NVPTXTargetLowering::LowerCall(), llvm::SITargetLowering::LowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::AArch64CallLowering::lowerFormalArguments(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::AMDGPUCallLowering::lowerTailCall(), llvm::IntrinsicLowering::LowerToByteSwap(), matchIntrinsicType(), matchPartStore(), optimizeLatchExitInductionUser(), printConstant(), llvm::replaceAllDbgUsesWith(), resourceAccessNeeds64BitExpansion(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), runOnKernelFunction(), shouldCanonicalizeGEPToPtrAdd(), llvm::TargetLoweringBase::shouldConvertPhiType(), llvm::SystemZTargetLowering::shouldExpandAtomicRMWInIR(), shouldUpgradeNVPTXTMAG2SIntrinsics(), llvm::LoongArchTargetLowering::signExtendConstant(), llvm::RISCVTargetLowering::signExtendConstant(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), simplifyRecipe(), simplifyX86addcarry(), simplifyX86immShift(), splitMergedValStore(), swapICmpOperandsToExposeCSEOpportunities(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToRecognizeTableBasedCttz(), unpackFromRegLoc(), unpackFromRegLoc(), updatePredecessorProfileMetadata(), llvm::UpgradeIntrinsicCall(), upgradeNVVMIntrinsicCall(), upgradeX86IntrinsicCall(), upgradeX86IntrinsicsWith8BitMask(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::InstCombinerImpl::visitInsertElementInst().
Return true if this is an IntegerType of the given width.
Definition at line 58 of file Type.cpp.
References llvm::ArrayType::get().
|
inline |
Return true if this is an integer type or a vector of integer types.
Definition at line 246 of file Type.h.
References getScalarType(), and isIntegerTy().
Referenced by llvm::CastInst::castIsValid(), llvm::ConstantFoldCompareInstruction(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateZExtOrTrunc(), foldAndOrOfICmpEqConstantAndICmp(), FoldBitCast(), foldBitCastBitwiseLogic(), llvm::InstCombinerImpl::foldICmpAddConstant(), foldICmpEqualityWithOffset(), foldSelectICmpLshrAshr(), foldTruncShuffle(), llvm::ConstantExpr::get(), getBoolVecFromMask(), llvm::VectorType::getExtendedElementVectorType(), getExtendedType(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::ConstantExpr::getPtrToAddr(), llvm::ConstantExpr::getPtrToInt(), getSafeDivisor(), llvm::GetElementPtrInst::getTypeAtIndex(), llvm::SystemZTTIImpl::getVectorInstrCost(), getWithNewBitWidth(), llvm::CastInst::isEliminableCastPair(), isKnownNonEqual(), isKnownNonZeroFromOperator(), llvm::DemandedBits::isUseDead(), llvm::recognizeBSwapOrBitReverseIdiom(), simplifyAddInst(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpOfBools(), simplifyMulInst(), simplifyOrInst(), simplifySelectWithICmpCond(), simplifySubInst(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitLShr().
Return true if this is an integer type or a vector of integer types of the given width.
Definition at line 250 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 255 of file Type.h.
References isIntegerTy(), and isPointerTy().
Referenced by getMemSetPatternValue(), and isBitCastSemanticsPreserving().
|
inline |
Return true if this is 'label'.
Definition at line 228 of file Type.h.
References getTypeID(), and LabelTyID.
|
inline |
Return true if this is 'metadata'.
Definition at line 231 of file Type.h.
References getTypeID(), and MetadataTyID.
|
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 PointerType.
Definition at line 267 of file Type.h.
References getTypeID(), and PointerTyID.
Referenced by llvm::AliasSetTracker::add(), addConditions(), llvm::AAResults::alias(), BuildConstantFromSCEV(), canBeCheaplyTransformed(), canConvertValue(), llvm::canReplacePointersIfEqual(), llvm::canReplacePointersInUseIfEqual(), CompareValueComplexity(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldLoadThroughBitcast(), copyFunctionByValArgs(), llvm::copyMetadataForLoad(), llvm::CastInst::CreateBitOrPointerCast(), createBitOrPointerCast(), createCmpXchgInstFun(), createOutlinedFunction(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), evaluateICmpRelation(), expandVPWidenPointerInduction(), fixFunctionTypeIfPtrArgs(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::MemoryLocation::getForDest(), getFunctionPointerElemType(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::AAResults::getModRefInfo(), llvm::BasicAAResult::getModRefInfo(), llvm::ScalarEvolution::getMulExpr(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::getUnderlyingObject(), llvm::Attributor::identifyDefaultAbstractAttributes(), llvm::SCEVWrapPredicate::implies(), llvm::inferAttribute(), llvm::InductionDescriptor::isInductionPHI(), llvm::InductionDescriptor::isInductionPHI(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), isLegalMaskedLoadStore(), llvm::isLibFreeFunction(), isPtrOrPtrVectorTy(), isSingleValueType(), llvm::AADereferenceable::isValidIRPositionForInit(), llvm::AAInvariantLoadPointer::isValidIRPositionForInit(), llvm::AAMemoryBehavior::isValidIRPositionForInit(), llvm::AANoAlias::isValidIRPositionForInit(), llvm::AANoCapture::isValidIRPositionForInit(), isVectorPromotionViable(), llvm::MipsCallLowering::lowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), optimizeLatchExitInductionUser(), optimizeOnceStoredGlobal(), promoteAllocaUserToVector(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::MCJIT::runFunction(), runOnDeviceFunction(), runOnKernelFunction(), llvm::salvageDebugInfoImpl(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), shouldConvertToRelLookupTable(), llvm::tryPromoteCall(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitPHINode(), and llvm::InstCombinerImpl::visitReturnInst().
|
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(), and llvm::InstCombinerImpl::foldICmpBitCast().
|
inline |
Return true if this is a pointer type or a vector of pointer types.
Definition at line 270 of file Type.h.
References getScalarType(), and isPointerTy().
Referenced by canConvertValue(), llvm::CastInst::castIsValid(), llvm::VNCoercion::coerceAvailableValueToLoadType(), combineLoadToOperationType(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::CastInst::isEliminableCastPair(), isKnownNonZeroFromOperator(), llvm::AAAddressSpace::isValidIRPositionForInit(), llvm::AAAlign::isValidIRPositionForInit(), llvm::AAAllocationInfo::isValidIRPositionForInit(), llvm::AAMemoryLocation::isValidIRPositionForInit(), llvm::AANoAliasAddrSpace::isValidIRPositionForInit(), llvm::AANoFree::isValidIRPositionForInit(), llvm::AANonNull::isValidIRPositionForInit(), llvm::AANoSync::isValidIRPositionForInit(), llvm::AAPointerInfo::isValidIRPositionForInit(), llvm::AAPrivatizablePtr::isValidIRPositionForInit(), llvm::AAUnderlyingObjects::isValidIRPositionForInit(), promoteAllocaUserToVector(), simplifyCastInst(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().
bool Type::isScalableTargetExtTy | ( | ) | const |
Return true if this is a target extension type with a scalable layout.
Definition at line 120 of file Type.cpp.
References llvm::ScalableVectorType::get().
bool Type::isScalableTy | ( | ) | const |
Definition at line 70 of file Type.cpp.
References llvm::cast(), llvm::VectorType::get(), and Type().
bool Type::isScalableTy | ( | SmallPtrSetImpl< const Type * > & | Visited | ) | const |
Return true if this is a type whose size is a known multiple of vscale.
Definition at line 62 of file Type.cpp.
References llvm::cast(), llvm::StructType::get(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and Type().
Referenced by areExtractShuffleVectors(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canReplaceGEPIdxWithZero(), llvm::AArch64TargetLowering::fallBackToDAGISel(), llvm::RISCVTargetLowering::fallBackToDAGISel(), llvm::memtag::StackInfoBuilder::getAllocaInterestingness(), llvm::TargetTransformInfoImplCRTPBase< T >::getGEPCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ARMTTIImpl::getShuffleCost(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::TargetTransformInfo::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), isAlwaysFoldable(), llvm::ConstantExpr::isSupportedGetElementPtr(), llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(), llvm::AArch64TargetLowering::lowerInterleaveIntrinsicToStore(), shouldCanonicalizeGEPToPtrAdd(), shouldConvertImpl(), and splitMergedValStore().
|
inline |
Return true if the type is a valid type for a register in codegen.
This includes all first-class types except struct and array types.
Definition at line 296 of file Type.h.
References isFloatingPointTy(), isIntegerTy(), isPointerTy(), isTargetExtTy(), isVectorTy(), and isX86_AMXTy().
Referenced by canConvertValue(), getAggregateSize(), legalizeScalarLoadStoreOnArrays(), llvm::InlineAsmLowering::lowerInlineAsm(), llvm::TargetLowering::ParseConstraints(), processInternalGlobal(), and llvm::SCCPInstVisitor::trackValueOfGlobalVariable().
|
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 311 of file Type.h.
References ArrayTyID, getTypeID(), IntegerTyID, isFloatingPointTy(), isVectorTy(), PointerTyID, StructTyID, TargetExtTyID, and X86_AMXTyID.
Referenced by canReplaceGEPIdxWithZero(), computeKnownBitsFromOperator(), llvm::AsmPrinter::emitGlobalAlias(), llvm::memtag::StackInfoBuilder::getAllocaInterestingness(), llvm::getBaseObjectSize(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), IsSmallObject(), llvm::TargetLowering::ParseConstraints(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), tocDataChecks(), valueEscapes(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitArgument(), llvm::InstCombinerImpl::visitGetElementPtrInst(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
|
inline |
True if this is an instance of StructType.
Definition at line 261 of file Type.h.
References getTypeID(), and StructTyID.
Referenced by llvm::IRBuilderBase::CreateAggregateCast(), createWrapper(), llvm::VPInstruction::execute(), foldGEPOfPhi(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), insertSinCosCall(), isConstantUsingVectorTy(), isStructure(), isVectorPromotionViableForSlice(), llvm::VPlanTransforms::materializeBuildVectors(), and false::GepNode::operator<<.
|
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(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), and isSingleValueType().
bool Type::isTokenLikeTy | ( | ) | const |
|
inline |
Return true if this is 'token'.
Definition at line 234 of file Type.h.
References getTypeID(), and TokenTyID.
Referenced by llvm::SelectInst::areInvalidOperands(), llvm::removeAllNonTerminatorAndEHPadInstructions(), and SplitLandingPadPredecessorsImpl().
|
inline |
True if this is an instance of VectorType.
Definition at line 273 of file Type.h.
References FixedVectorTyID, getTypeID(), and ScalableVectorTyID.
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), canEvaluateShuffled(), canonicalizeBitCastExtElt(), CC_MipsO32(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromOperator(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), createCmpXchgInstFun(), llvm::createFindLastIVReduction(), createLogicFromTable(), llvm::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedStore(), createMaskInstrs(), llvm::createMemCpyLoopKnownSize(), llvm::CastInst::CreatePointerCast(), llvm::emitGEPOffset(), llvm::VPInstruction::execute(), llvm::VPWidenCallRecipe::execute(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFloatDotIntrinsic(), expandIntegerDotIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findForkedSCEVs(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::RISCVTTIImpl::getAddressComputationCost(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::CastInst::getCastOpcode(), getCmpOpsType(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::ARMTTIImpl::getGatherScatterOpCost(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::ConstantExpr::getInsertElement(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::RISCVTTIImpl::getMemoryOpCost(), llvm::SPIRVGlobalRegistry::getOrCreateConsIntVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), getScalarType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), getTargetConstantBitsFromNode(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getUniformBase(), getValueOnEdge(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getVectorIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::X86TTIImpl::instCombineIntrinsic(), isConstantUsingVectorTy(), llvm::isImpliedCondition(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::SCEVPatternMatch::bind_cst_ty::match(), llvm::SCEVPatternMatch::cst_pred_ty< Predicate >::match(), processSelect(), replaceWithCallToVeclib(), llvm::salvageDebugInfoImpl(), shouldConvertImpl(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyGEPInst(), simplifyX86immShift(), transformToIndexedCompare(), TryToShrinkGlobalToBoolean(), upgradeX86MultiplyAddBytes(), llvm::PPCTTIImpl::vectorCostAdjustmentFactor(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), and llvm::InstCombinerImpl::visitTrunc().
|
inline |
Return true if this is 'void'.
Definition at line 139 of file Type.h.
References getTypeID(), and VoidTyID.
Referenced by llvm::VPReplicateRecipe::computeCost(), copyMustTailReturn(), llvm::IRBuilderBase::CreateMalloc(), createRetPHINode(), llvm::Attributor::createShallowWrapper(), createWrapper(), llvm::Evaluator::EvaluateFunction(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::NVPTXTargetLowering::getPrototype(), getRetComponentType(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::objcarc::hasAttachedCallOpBundle(), llvm::coro::AnyRetconABI::init(), llvm::InlineFunctionImpl(), llvm::isLibFreeFunction(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::makeGuardControlFlowExplicit(), modifyIntrinsicCall(), llvm::InstDeleterIRStrategy::mutate(), numRetVals(), llvm::VPWidenCallRecipe::print(), llvm::promoteCall(), remarkFlatAddrspaceAccess(), replaceWithCallToVeclib(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), and scalarizeMaskedVectorHistogram().
|
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(), createTileStore(), getNumDefTiles(), and isSingleValueType().
|
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(), and llvm::ExecutionEngine::getConstantValue().
|
pure virtual |
void 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.
Definition at line 5132 of file AsmWriter.cpp.
References llvm::dyn_cast(), llvm::StructType::isLiteral(), print(), and Type().
Referenced by emitGlobalConstantFP(), llvm::Attribute::getAsString(), getBranchCondString(), print(), llvm::vfs::TracingFileSystem::printImpl(), and PrintResults().
|
inlineprotected |
Definition at line 99 of file Type.h.
References assert(), and getSubclassData().
Referenced by llvm::IntegerType::IntegerType().
|
inline |
Definition at line 363 of file Type.h.
References ContainedTys.
Referenced by subtype_rend(), and subtypes().
|
inline |
Definition at line 364 of file Type.h.
References ContainedTys, and NumContainedTys.
Referenced by subtype_rbegin(), and subtypes().
|
inline |
Definition at line 371 of file Type.h.
References subtype_end().
|
inline |
Definition at line 374 of file Type.h.
References subtype_begin().
Definition at line 365 of file Type.h.
References llvm::ArrayRef(), subtype_begin(), and subtype_end().
Referenced by llvm::getDeinterleavedVectorType().
|
friend |
Definition at line 91 of file Type.h.
References LLVMContextImpl.
Referenced by llvm::TypedPointerType::get(), and LLVMContextImpl.
A pointer to the array of Types contained by this Type.
For example, this includes the arguments of a function type, the elements of a structure, the pointee of a pointer, the element type of an array, etc. This pointer may be 0 for types that don't contain other types (Integer, Double, Float).
Definition at line 113 of file Type.h.
Referenced by llvm::StructType::element_begin(), llvm::StructType::element_end(), getArrayElementType(), getContainedType(), llvm::StructType::getElementType(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), subtype_begin(), subtype_end(), llvm::TargetExtType::type_param_begin(), and llvm::TargetExtType::type_param_end().
|
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(), subtype_end(), and llvm::TargetExtType::type_param_end().