LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::Type Class Reference

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

#include "llvm/IR/Type.h"

Inheritance diagram for llvm::Type:
Inheritance graph
[legend]

Public Types

enum  TypeID {
  HalfTyID = 0 , BFloatTyID , FloatTyID , DoubleTyID ,
  X86_FP80TyID , FP128TyID , PPC_FP128TyID , VoidTyID ,
  LabelTyID , MetadataTyID , X86_AMXTyID , TokenTyID ,
  IntegerTyID , FunctionTyID , PointerTyID , StructTyID ,
  ArrayTyID , FixedVectorTyID , ScalableVectorTyID , TypedPointerTyID ,
  TargetExtTyID
}
 Definitions of all of the base types for the Type system. More...
 
using subtype_iterator = Type *const *
 
using subtype_reverse_iterator = std::reverse_iterator< subtype_iterator >
 

Public Member Functions

void print (raw_ostream &O, bool IsForDebug=false, bool NoDetails=false) const
 Print the current type.
 
void dump () const
 
LLVMContextgetContext () const
 Return the LLVMContext in which this type was uniqued.
 
TypeID getTypeID () const
 Return the type id for the type.
 
bool isVoidTy () const
 Return true if this is 'void'.
 
bool isHalfTy () const
 Return true if this is 'half', a 16-bit IEEE fp type.
 
bool isBFloatTy () const
 Return true if this is 'bfloat', a 16-bit bfloat type.
 
bool is16bitFPTy () const
 Return true if this is a 16-bit float type.
 
bool isFloatTy () const
 Return true if this is 'float', a 32-bit IEEE fp type.
 
bool isDoubleTy () const
 Return true if this is 'double', a 64-bit IEEE fp type.
 
bool isX86_FP80Ty () const
 Return true if this is x86 long double.
 
bool isFP128Ty () const
 Return true if this is 'fp128'.
 
bool isPPC_FP128Ty () const
 Return true if this is powerpc long double.
 
bool isIEEELikeFPTy () const
 Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout as defined by APFloat::isIEEE(), and does not have non-IEEE values, such as x86_fp80's unnormal values.
 
bool isFloatingPointTy () const
 Return true if this is one of the floating-point types.
 
bool isMultiUnitFPType () const
 Returns true if this is a floating-point type that is an unevaluated sum of multiple floating-point units.
 
const fltSemanticsgetFltSemantics () const
 
bool isX86_AMXTy () const
 Return true if this is X86 AMX.
 
bool isTargetExtTy () const
 Return true if this is a target extension type.
 
bool isScalableTargetExtTy () const
 Return true if this is a target extension type with a scalable layout.
 
bool isScalableTy () const
 Return true if this is a type whose size is a known multiple of vscale.
 
bool isFPOrFPVectorTy () const
 Return true if this is a FP type or a vector of FP.
 
bool isLabelTy () const
 Return true if this is 'label'.
 
bool isMetadataTy () const
 Return true if this is 'metadata'.
 
bool isTokenTy () const
 Return true if this is 'token'.
 
bool isIntegerTy () const
 True if this is an instance of IntegerType.
 
bool isIntegerTy (unsigned Bitwidth) const
 Return true if this is an IntegerType of the given width.
 
bool isIntOrIntVectorTy () const
 Return true if this is an integer type or a vector of integer types.
 
bool isIntOrIntVectorTy (unsigned BitWidth) const
 Return true if this is an integer type or a vector of integer types of the given width.
 
bool isIntOrPtrTy () const
 Return true if this is an integer type or a pointer type.
 
bool isFunctionTy () const
 True if this is an instance of FunctionType.
 
bool isStructTy () const
 True if this is an instance of StructType.
 
bool isArrayTy () const
 True if this is an instance of ArrayType.
 
bool isPointerTy () const
 True if this is an instance of PointerType.
 
bool isOpaquePointerTy () const
 True if this is an instance of an opaque PointerType.
 
bool isPtrOrPtrVectorTy () const
 Return true if this is a pointer type or a vector of pointer types.
 
bool isVectorTy () const
 True if this is an instance of VectorType.
 
bool canLosslesslyBitCastTo (Type *Ty) const
 Return true if this type could be converted with a lossless BitCast to type 'Ty'.
 
bool isEmptyTy () const
 Return true if this type is empty, that is, it has no elements or all of its elements are empty.
 
bool isFirstClassType () const
 Return true if the type is "first class", meaning it is a valid type for a Value.
 
bool isSingleValueType () const
 Return true if the type is a valid type for a register in codegen.
 
bool isAggregateType () const
 Return true if the type is an aggregate type.
 
bool isSized (SmallPtrSetImpl< Type * > *Visited=nullptr) const
 Return true if it makes sense to take the size of this type.
 
TypeSize getPrimitiveSizeInBits () const LLVM_READONLY
 Return the basic size of this type if it is a primitive type.
 
unsigned getScalarSizeInBits () const LLVM_READONLY
 If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
 
int getFPMantissaWidth () const
 Return the width of the mantissa of this type.
 
bool isIEEE () const
 Return whether the type is IEEE compatible, as defined by the eponymous method in APFloat.
 
TypegetScalarType () 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
 
TypegetContainedType (unsigned i) const
 This method is used to implement the type iterator (defined at the end of the file).
 
unsigned getNumContainedTypes () const
 Return the number of types in the derived type.
 
unsigned getIntegerBitWidth () const
 
TypegetFunctionParamType (unsigned i) const
 
unsigned getFunctionNumParams () const
 
bool isFunctionVarArg () const
 
StringRef getStructName () const
 
unsigned getStructNumElements () const
 
TypegetStructElementType (unsigned N) const
 
uint64_t getArrayNumElements () const
 
TypegetArrayElementType () const
 
StringRef getTargetExtName () const
 
TypegetNonOpaquePointerElementType () const
 Only use this method in code that is not reachable with opaque pointers, or part of deprecated methods that will be removed as part of the opaque pointers transition.
 
TypegetWithNewType (Type *EltTy) const
 Given vector type, change the element type, whilst keeping the old number of elements.
 
TypegetWithNewBitWidth (unsigned NewBitWidth) const
 Given an integer or vector type, change the lane bitwidth to NewBitwidth, whilst keeping the old number of lanes.
 
TypegetExtendedType () const
 Given scalar/vector integer type, returns a type with elements twice as wide as in the original type.
 
unsigned getPointerAddressSpace () const
 Get the address space of this pointer or pointer vector type.
 
PointerTypegetPointerTo (unsigned AddrSpace=0) const
 Return a pointer to the current type.
 

Static Public Member Functions

static TypegetPrimitiveType (LLVMContext &C, TypeID IDNumber)
 Return a type based on an identifier.
 
static TypegetVoidTy (LLVMContext &C)
 
static TypegetLabelTy (LLVMContext &C)
 
static TypegetHalfTy (LLVMContext &C)
 
static TypegetBFloatTy (LLVMContext &C)
 
static TypegetFloatTy (LLVMContext &C)
 
static TypegetDoubleTy (LLVMContext &C)
 
static TypegetMetadataTy (LLVMContext &C)
 
static TypegetX86_FP80Ty (LLVMContext &C)
 
static TypegetFP128Ty (LLVMContext &C)
 
static TypegetPPC_FP128Ty (LLVMContext &C)
 
static TypegetX86_AMXTy (LLVMContext &C)
 
static TypegetTokenTy (LLVMContext &C)
 
static IntegerTypegetIntNTy (LLVMContext &C, unsigned N)
 
static IntegerTypegetInt1Ty (LLVMContext &C)
 
static IntegerTypegetInt8Ty (LLVMContext &C)
 
static IntegerTypegetInt16Ty (LLVMContext &C)
 
static IntegerTypegetInt32Ty (LLVMContext &C)
 
static IntegerTypegetInt64Ty (LLVMContext &C)
 
static IntegerTypegetInt128Ty (LLVMContext &C)
 
template<typename ScalarTy >
static TypegetScalarTy (LLVMContext &C)
 
static TypegetFloatingPointTy (LLVMContext &C, const fltSemantics &S)
 
static TypegetWasm_ExternrefTy (LLVMContext &C)
 
static TypegetWasm_FuncrefTy (LLVMContext &C)
 

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 *constContainedTys = nullptr
 A pointer to the array of Types contained by this Type.
 

Friends

class LLVMContextImpl
 

Detailed Description

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

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

Definition at line 45 of file Type.h.

Member Typedef Documentation

◆ subtype_iterator

Definition at line 352 of file Type.h.

◆ subtype_reverse_iterator

Definition at line 360 of file Type.h.

Member Enumeration Documentation

◆ TypeID

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

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

Enumerator
HalfTyID 

16-bit floating point type

BFloatTyID 

16-bit floating point type (7-bit significand)

FloatTyID 

32-bit floating point type

DoubleTyID 

64-bit floating point type

X86_FP80TyID 

80-bit floating point type (X87)

FP128TyID 

128-bit floating point type (112-bit significand)

PPC_FP128TyID 

128-bit floating point type (two 64-bits, PowerPC)

VoidTyID 

type with no size

LabelTyID 

Labels.

MetadataTyID 

Metadata.

X86_AMXTyID 

AMX vectors (8192 bits, X86 specific)

TokenTyID 

Tokens.

IntegerTyID 

Arbitrary bit width integers.

FunctionTyID 

Functions.

PointerTyID 

Pointers.

StructTyID 

Structures.

ArrayTyID 

Arrays.

FixedVectorTyID 

Fixed width SIMD vector type.

ScalableVectorTyID 

Scalable SIMD vector type.

TypedPointerTyID 

Typed pointer used by some GPU targets.

TargetExtTyID 

Target extension type.

Definition at line 54 of file Type.h.

Constructor & Destructor Documentation

◆ Type()

llvm::Type::Type ( LLVMContext C,
TypeID  tid 
)
inlineexplicitprotected

◆ ~Type()

llvm::Type::~Type ( )
protecteddefault

Member Function Documentation

◆ canLosslesslyBitCastTo()

bool llvm::Type::canLosslesslyBitCastTo ( Type Ty) const

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

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

◆ dump()

void llvm::Type::dump ( ) const

◆ getArrayElementType()

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

◆ getArrayNumElements()

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

◆ getBFloatTy()

static Type * llvm::Type::getBFloatTy ( LLVMContext C)
static

◆ getContainedType()

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

This method is used to implement the type iterator (defined at the end of the file).

For derived types, this returns the types 'contained' in the derived type.

Definition at line 372 of file Type.h.

References assert(), ContainedTys, and NumContainedTys.

Referenced by getScalarType(), llvm::TargetExtType::getTypeParameter(), and llvm::RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad().

◆ getContext()

LLVMContext & llvm::Type::getContext ( ) const
inline

Return the LLVMContext in which this type was uniqued.

Definition at line 128 of file Type.h.

Referenced by llvm::VNCoercion::coerceAvailableValueToLoadType(), llvm::convertPointerToIntegerType(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::StructType::create(), llvm::VFABI::createFunctionType(), llvm::MatrixBuilder::CreateIndex(), llvm::VPlan::createInitialVPlan(), llvm::orc::createIRTypedAddress(), llvm::FunctionLoweringInfo::CreateRegs(), llvm::VPScalarIVStepsRecipe::execute(), llvm::FlushFPConstant(), FoldBitCast(), foldConstantCastPair(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::ConstantVector::get(), llvm::ConstantArray::get(), llvm::InlineAsm::get(), llvm::ConstantInt::get(), llvm::ConstantPointerNull::get(), llvm::ConstantTargetNone::get(), llvm::TypedPointerType::get(), llvm::StructType::get(), llvm::UndefValue::get(), llvm::PoisonValue::get(), llvm::ConstantAggregateZero::get(), llvm::ConstantFP::get(), llvm::ConstantExpr::getAlignOf(), llvm::Constant::getAllOnesValue(), llvm::AArch64TTIImpl::getArithmeticReductionCostSVE(), llvm::AAValueConstantRange::getAssumedConstant(), llvm::AAPotentialConstantValues::getAssumedConstant(), llvm::VNCoercion::getConstantMemInstValueForLoad(), llvm::BasicBlock::getContext(), llvm::Function::getContext(), llvm::Value::getContext(), llvm::EVT::getEVT(), llvm::IntegerType::getExtendedType(), llvm::ConstantInt::getFalse(), getFoldedCast(), getIdentityValueForAtomicOp(), llvm::ConstantDataSequential::getImpl(), llvm::DataLayout::getIndexType(), llvm::ConstantFP::getInfinity(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::VectorType::getInteger(), llvm::Constant::getIntegerValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::DataLayout::getIntPtrType(), llvm::ARMTTIImpl::getIntrinsicInstrCost(), llvm::VNCoercion::getMemInstValueForLoad(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::TargetLoweringBase::getMemValueType(), llvm::AArch64TTIImpl::getMinMaxReductionCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::ConstantFP::getNaN(), llvm::Constant::getNullValue(), getPromotedType(), llvm::ConstantFP::getQNaN(), llvm::BasicTTIImplBase< T >::getRegUsageForType(), llvm::X86TTIImpl::getReplicationShuffleCost(), llvm::coro::Shape::getResumeFunctionType(), getReturnAttrs(), getRuntimeVFAsFloat(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantFP::getSNaN(), llvm::ConstantVector::getSplat(), llvm::AArch64TTIImpl::getSpliceCost(), getStepVector(), llvm::BasicTTIImplBase< T >::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getSVEContainerIRType(), getTargetTypeInfo(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), llvm::VectorType::getTruncatedElementVectorType(), llvm::getTypedPointerWrapper(), llvm::BasicTTIImplBase< T >::getTypeLegalizationCost(), getTypePartition(), llvm::TargetLoweringBase::getValueType(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::ConstantFP::getZero(), hasLifetimeMarkers(), llvm::CallLowering::insertSRetIncomingArgument(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), llvm::X86TTIImpl::isLegalBroadcastLoad(), llvm::RISCVTargetLowering::isLegalInterleavedAccessType(), llvm::isUntypedEquivalentToTyExt(), LLVMConstIntOfArbitraryPrecision(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64CallLowering::lowerReturn(), llvm::CmpInst::makeCmpResultType(), memVTFromLoadIntrData(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::needToDelay(), llvm::TargetLowering::ParseConstraints(), llvm::LoopStructure::parseLoopStructure(), rebuildExtCst(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::StructType::setBody(), setInfoSVEStN(), llvm::StructType::setName(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyGEPInst(), solveTypeName(), llvm::CallLowering::splitToValueTypes(), llvm::toTypedPointer(), tryToFPToSat(), willGenerateVectors(), and llvm::MetadataAsValue::~MetadataAsValue().

◆ getDoubleTy()

static Type * llvm::Type::getDoubleTy ( LLVMContext C)
static

◆ getExtendedType()

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

Given scalar/vector integer type, returns a type with elements twice as wide as in the original type.

For vectors, preserves element count.

Referenced by dropRedundantMaskingOfLeftShiftInput().

◆ getFloatingPointTy()

static Type * llvm::Type::getFloatingPointTy ( LLVMContext C,
const fltSemantics S 
)
static

Referenced by llvm::ConstantFP::get().

◆ getFloatTy()

static Type * llvm::Type::getFloatTy ( LLVMContext C)
static

◆ getFltSemantics()

const fltSemantics & llvm::Type::getFltSemantics ( ) const

◆ getFP128Ty()

static Type * llvm::Type::getFP128Ty ( LLVMContext C)
static

◆ getFPMantissaWidth()

int llvm::Type::getFPMantissaWidth ( ) const

Return the width of the mantissa of this type.

This is only valid on floating-point types. If the FP type does not have a stable mantissa (e.g. ppc long double), this method returns -1.

Referenced by expandIToFP(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), isKnownExactCastIntToFP(), shrinkFPConstantVector(), and llvm::InstCombinerImpl::visitFPTrunc().

◆ getFunctionNumParams()

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

◆ getFunctionParamType()

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

◆ getHalfTy()

static Type * llvm::Type::getHalfTy ( LLVMContext C)
static

◆ getInt128Ty()

static IntegerType * llvm::Type::getInt128Ty ( LLVMContext C)
static

◆ getInt16Ty()

static IntegerType * llvm::Type::getInt16Ty ( LLVMContext C)
static

◆ getInt1Ty()

static IntegerType * llvm::Type::getInt1Ty ( LLVMContext C)
static

Referenced by llvm::OpenMPIRBuilder::applySimd(), llvm::SelectInst::areInvalidOperands(), calcPredicateUsingBooleans(), llvm::ConstantFoldCompareInstruction(), CreateAssert(), llvm::MDBuilder::createCallbackEncoding(), llvm::sampleprofutil::createFSDiscriminatorVariable(), llvm::VFABI::createFunctionType(), llvm::VPlan::createInitialVPlan(), createMemprofHistogramFlagVar(), DisableAllLoopOptsOnLoop(), fillCommonArgs(), llvm::IntegerType::get(), llvm::ConstantExpr::getAlignOf(), llvm::IRBuilderBase::getAllOnesMask(), llvm::dxil::ResourceInfo::getAsMetadata(), llvm::LoopVectorizationCostModel::getDivRemSpeculationCost(), llvm::ConstantInt::getFalse(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::IRBuilderBase::getInt1Ty(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::RISCVTTIImpl::getIntrinsicInstrCost(), llvm::RISCVTTIImpl::getShuffleCost(), getTargetTypeInfo(), llvm::BasicTTIImplBase< T >::getTreeReductionCost(), llvm::ConstantInt::getTrue(), getTypeFromParameterKind(), llvm::SelectionDAGBuilder::handleKillDebugValue(), instCombineSVECmpNE(), LLVMInt1TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::CmpInst::makeCmpResultType(), llvm::InsertCFGStrategy::mutate(), OptimizeGlobalAddressOfAllocation(), replaceWithTLIFunction(), rewrite(), setAssignmentTrackingModuleFlag(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), SimplifyCondBranchToCondBranch(), switchToLookupTable(), llvm::at::trackAssignments(), TryToShrinkGlobalToBoolean(), and llvm::InstCombinerImpl::visitAllocSite().

◆ getInt32Ty()

static IntegerType * llvm::Type::getInt32Ty ( LLVMContext C)
static

Referenced by llvm::Module::addModuleFlag(), adjustInliningThresholdUsingCallee(), llvm::annotateValueSite(), llvm::AMDGPURegisterBankInfo::applyMappingImpl(), llvm::SPIRVGlobalRegistry::buildConstantInt(), calcPredicateUsingInteger(), calculateVectorIndex(), OutlinableGroup::collectGVNStoreSets(), llvm::ConstantFoldInsertElementInstruction(), llvm::convertPointerToIntegerType(), llvm::ShuffleVectorInst::convertShuffleMaskForBitcode(), llvm::ARMConstantPoolConstant::Create(), llvm::MDBuilder::createBranchWeights(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::IRBuilderBase::CreateConstGEP1_32(), llvm::IRBuilderBase::CreateConstGEP2_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_32(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_32(), llvm::OpenMPIRBuilder::createGlobalFlag(), llvm::IRBuilderBase::CreateGlobalStringPtr(), llvm::OpenMPIRBuilder::createOffloadEntry(), llvm::IRBuilderBase::CreatePreserveArrayAccessIndex(), llvm::IRBuilderBase::CreatePreserveStructAccessIndex(), llvm::createProfileSamplingVar(), createRelLookupTable(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), createStringMetadata(), createSwitchStatement(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64SelectionDAGInfo::EmitStreamingCompatibleMemLibCall(), emitTargetTaskProxyFunction(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), llvm::expandUser(), findCostForOutputBlocks(), llvm::SanitizerStatReport::finish(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::dxil::ResourceInfo::getAsMetadata(), getDefaultPersonalityFn(), getDXILOpFunctionType(), llvm::offloading::getEntryTy(), llvm::CSKYInstrInfo::getGlobalBaseReg(), llvm::IRBuilderBase::getInt32Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), llvm::OpenMPIRBuilder::getKernelArgsVector(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::offloading::getOffloadingEntryInitializer(), getOffsetFromIndices(), getPownType(), getPromotedType(), getResRetType(), llvm::ConstantExpr::getSizeOf(), getSVEContainerIRType(), getTypeFromParameterKind(), llvm::HardwareLoopInfo::HardwareLoopInfo(), INITIALIZE_PASS(), insertCall(), llvm::BPFCoreSharedInfo::insertPassThrough(), insertSpills(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineRDFFR(), instCombineSVECmpNE(), llvm::isBytewiseValue(), llvm::ARMTTIImpl::isHardwareLoopProfitable(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), llvm::ARMLegalizerInfo::legalizeCustom(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XtensaInstrInfo::loadImmediate(), llvm::XCoreInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerLoadRelative(), lowerPtrAnnotation(), makeDoubleDoubleI32(), makeX86FP80X86FP80I32(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::EscapeEnumerator::Next(), llvm::parseBasicTypeName(), llvm::parseTypeString(), populateOperands(), processSwitches(), replaceCalledFunction(), replaceWithGEP(), llvm::KCFIPass::run(), llvm::WasmEHPreparePass::run(), runImpl(), runPass(), llvm::scaleProfData(), SegmentOffset(), llvm::setKCFIType(), llvm::Module::setModuleFlag(), llvm::ARMTargetLowering::shouldConvertSplatType(), simplifyRelativeLoad(), splitGlobal(), splitMergedValStore(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::OpenMPIRBuilder::unrollLoopPartial(), updateNVPTXMetadata(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), upgradeX86IntrinsicCall(), validExtractValueIndex(), validInsertValueIndex(), validShuffleVectorIndex(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGEPOfGEP(), and llvm::BasicBlock::~BasicBlock().

◆ getInt64Ty()

static IntegerType * llvm::Type::getInt64Ty ( LLVMContext C)
static

Referenced by addModuleFlags(), llvm::GlobalObject::addTypeMetadata(), llvm::annotateValueSite(), llvm::memprof::buildCallstackMetadata(), llvm::MDBuilder::createCallbackEncoding(), llvm::IRBuilderBase::CreateConstGEP1_64(), llvm::IRBuilderBase::CreateConstGEP2_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP1_64(), llvm::IRBuilderBase::CreateConstInBoundsGEP2_64(), llvm::MDBuilder::createFunctionEntryCount(), createIRLevelProfileFlagVar(), llvm::MDBuilder::createIrrLoopHeaderWeight(), llvm::orc::createIRTypedAddress(), llvm::MDBuilder::createLLVMStats(), createMIBNode(), createOutlinedFunction(), llvm::MDBuilder::createPseudoProbeDesc(), llvm::IRBuilderBase::CreatePtrDiff(), llvm::MDBuilder::createTBAAAccessTag(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::MDBuilder::createTBAATypeNode(), llvm::orc::IRSpeculationLayer::emit(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitHiddenKernelArgs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), foldConstantCastPair(), foldInsSequenceIntoSplat(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), llvm::X86TTIImpl::getArithmeticReductionCost(), llvm::IRBuilderBase::getInt64Ty(), getIntrinsicParamType(), llvm::X86TargetLowering::getIRStackGuard(), getKeyValMD(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::DIBuilder::getOrCreateSubrange(), llvm::OpenMPIRBuilder::getSizeInBytes(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantVector::getSplat(), llvm::InstrProfIncrementInst::getStep(), getSVEContainerIRType(), getTypeFromParameterKind(), llvm::InlineFunction(), insertLifetimeMarkersSurroundingCall(), instCombineSVEDup(), instCombineSVELast(), instrumentOneFunc(), llvm::isBytewiseValue(), llvm::PPCTTIImpl::isHardwareLoopProfitable(), LLVMInt64TypeInContext(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::parseBasicTypeName(), llvm::scaleProfData(), llvm::Module::setLargeDataThreshold(), llvm::GlobalObject::setVCallVisibilityMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), simplifyX86extrq(), simplifyX86insertq(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeTBAANode(), upgradeX86IntrinsicCall(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitExtractElementInst().

◆ getInt8Ty()

static IntegerType * llvm::Type::getInt8Ty ( LLVMContext C)
static

◆ getIntegerBitWidth()

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

Referenced by canBeCheaplyTransformed(), canonicalizeForInvariantConditionInjection(), computeKnownFPClass(), ConvertShiftToMul(), decompose(), eliminateDeadSwitchCases(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandFPToI(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpWithCastOp(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::ARMTTIImpl::getIntImmCostInst(), llvm::ConstantExpr::getIntrinsicIdentity(), getKmpcForDynamicFiniForType(), getKmpcForDynamicInitForType(), getKmpcForDynamicNextForType(), getKmpcForStaticInitForType(), getKmpcForStaticLoopForType(), llvm::RecurrenceDescriptor::getRecurrenceIdentity(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getTypeName(), llvm::DataLayout::getTypeSizeInBits(), llvm::PPCTTIImpl::hasActiveVectorLength(), hasSameExtUse(), llvm::HexagonEvaluator::HexagonEvaluator(), injectPendingInvariantConditions(), llvm::GCNTTIImpl::instCombineIntrinsic(), isLegalCrossLaneType(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), isLoadCombineCandidateImpl(), llvm::ConstantInt::isValueValidForType(), lowerFunnelShifts(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), simplifyX86varShift(), unpackFromRegLoc(), llvm::OpenMPIRBuilder::unrollLoopPartial(), and llvm::InstCombinerImpl::visitExtractElementInst().

◆ getIntNTy()

static IntegerType * llvm::Type::getIntNTy ( LLVMContext C,
unsigned  N 
)
static

◆ getLabelTy()

static Type * llvm::Type::getLabelTy ( LLVMContext C)
static

Referenced by LLVMLabelTypeInContext().

◆ getMetadataTy()

static Type * llvm::Type::getMetadataTy ( LLVMContext C)
static

◆ getNonOpaquePointerElementType()

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

Only use this method in code that is not reachable with opaque pointers, or part of deprecated methods that will be removed as part of the opaque pointers transition.

Definition at line 410 of file Type.h.

References llvm_unreachable.

◆ getNumContainedTypes()

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

Return the number of types in the derived type.

Definition at line 378 of file Type.h.

References NumContainedTys.

Referenced by llvm::TargetExtType::getNumTypeParameters().

◆ getPointerAddressSpace()

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

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

Referenced by llvm::AMDGPUAAResult::alias(), llvm::NVPTXAAResult::alias(), annotateDereferenceableBytes(), annotateNonNullNoUndefBasedOnAccess(), aspaceWrapOperand(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), classifyGlobalCtorPointerType(), llvm::orc::cloneGlobalAliasDecl(), llvm::ConstantFoldCastOperand(), convertValue(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::expandMemMoveAsLoop(), llvm::InstCombinerImpl::foldGEPICmp(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), llvm::CastInst::getCastOpcode(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::sandboxir::AddrSpaceCastInst::getDestAddressSpace(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::AMDGPUAAResult::getModRefInfoMask(), llvm::NVPTXAAResult::getModRefInfoMask(), llvm::LoadInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::GetElementPtrInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::GEPOperator::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::getPointersDiff(), llvm::getPtrStride(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), llvm::AddrSpaceCastOperator::getSrcAddressSpace(), llvm::sandboxir::AddrSpaceCastInst::getSrcAddressSpace(), llvm::DataLayout::getTypeSizeInBits(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getValueKind(), HandleByValArgument(), hasLifetimeMarkers(), inlineGetBaseAndOffset(), llvm::AMDGPU::instrumentAddress(), llvm::AA::isAssumedThreadLocalObject(), llvm::AMDGPU::isDynamicLDS(), llvm::CastInst::isEliminableCastPair(), llvm::AANonNull::isImpliedByIR(), llvm::AANoAlias::isImpliedByIR(), llvm::AMDGPU::isLDSVariableToLower(), isNoopPtrIntCastPair(), isUnsupportedAMDGPUAddrspace(), llvm::WebAssembly::isWebAssemblyExternrefType(), llvm::WebAssembly::isWebAssemblyFuncrefType(), llvm::TargetLowering::LowerCallTo(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), maybePrintCallAddrSpace(), optimizeOnceStoredGlobal(), PrintResults(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), llvm::CallLowering::setArgFlags(), shouldInstrumentReadWriteFromAddress(), llvm::slpvectorizer::BoUpSLP::transformNodes(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::InstCombinerImpl::visitAllocaInst(), and llvm::InstCombinerImpl::visitGetElementPtrInst().

◆ getPointerTo()

PointerType * llvm::Type::getPointerTo ( unsigned  AddrSpace = 0) const

Return a pointer to the current type.

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

Referenced by getIntrinsicParamType().

◆ getPPC_FP128Ty()

static Type * llvm::Type::getPPC_FP128Ty ( LLVMContext C)
static

◆ getPrimitiveSizeInBits()

TypeSize llvm::Type::getPrimitiveSizeInBits ( ) const

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

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

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

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

Referenced by llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), areExtractShuffleVectors(), llvm::PPCTTIImpl::areTypesABICompatible(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canWidenLoad(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), collectInsertionElements(), combineConstantPoolLoads(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::SelectionDAG::computeKnownBits(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::ConstantFoldCastInstruction(), createCmpXchgInstFun(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPPERMMask(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::PPCTargetLowering::emitMaskedAtomicCmpXchgIntrinsic(), llvm::PPCTargetLowering::emitMaskedAtomicRMWIntrinsic(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::extractConstantMask(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpEquality(), foldIdentityExtractShuffle(), foldLoadsRecursive(), foldVecTruncToExtElt(), llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantDataSequential::getElementByteSize(), getIdentityValueForAtomicOp(), llvm::VectorType::getInteger(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::LanaiTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCostInst(), llvm::PPCTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getIntImmCostInst(), llvm::X86TTIImpl::getIntImmCostInst(), llvm::AArch64TTIImpl::getIntImmCostIntrin(), llvm::PPCTTIImpl::getIntImmCostIntrin(), llvm::SystemZTTIImpl::getIntImmCostIntrin(), llvm::X86TTIImpl::getIntImmCostIntrin(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::RISCVTTIImpl::getShuffleCost(), llvm::X86TTIImpl::getShuffleCost(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getSplatableConstant(), getTargetConstantBitsFromNode(), llvm::ScalarEvolution::getTripCountFromExitCount(), llvm::VectorType::getTruncatedElementVectorType(), getTypeSizeIndex(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::CastInst::isBitCastable(), llvm::ARMTTIImpl::isLegalMaskedLoad(), llvm::AArch64TTIImpl::isLegalMaskedLoadStore(), isMMAType(), isMultipleOfTypeSize(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isZExtFree(), matchType(), printConstant(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), rebuildSplatCst(), rebuildZeroUpperCst(), llvm::replaceAllDbgUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), scalarConstantToHexString(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedLoad(), scalarizeMaskedStore(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::AArch64TargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::ARMTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::PPCTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::LoongArchTargetLowering::shouldExpandAtomicRMWInIR(), llvm::PPCTargetLowering::shouldExpandAtomicRMWInIR(), llvm::RISCVTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyICmpInst(), simplifyX86immShift(), simplifyX86pack(), switchToLookupTable(), upgradeAVX512MaskToSelect(), llvm::UpgradeIntrinsicCall(), upgradeMaskedLoad(), upgradeX86IntrinsicCall(), and upgradeX86VPERMT2Intrinsics().

◆ getPrimitiveType()

static Type * llvm::Type::getPrimitiveType ( LLVMContext C,
TypeID  IDNumber 
)
static

Return a type based on an identifier.

◆ getScalarSizeInBits()

unsigned llvm::Type::getScalarSizeInBits ( ) const

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

Otherwise return the getPrimitiveSizeInBits value for this type.

Referenced by llvm::addDiffRuntimeChecks(), llvm::ValueLatticeElement::asConstantRange(), canEvaluateSExtd(), canEvaluateShiftedShift(), canEvaluateTruncated(), canonicalizeAbs(), canonicalizeLogicFirst(), canTryToConstantAddTwoShiftAmounts(), llvm::CastInst::castIsValid(), CheckAndCreateOffsetAdd(), cmpExcludesZero(), combineAndLoadToBZHI(), llvm::InstCombinerImpl::commonShiftTransforms(), compareCmp(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromICmpCond(), computeKnownBitsFromOperator(), llvm::computeMinimumValueSizes(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::computeOverflowForSignedMul(), llvm::ConstantFoldIntegerCast(), llvm::convertPointerToIntegerType(), llvm::copyRangeMetadata(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), llvm::ARMTargetLowering::createComplexDeinterleavingIR(), llvm::CastInst::CreateFPCast(), llvm::IRBuilderBase::CreateFPCast(), llvm::MatrixBuilder::CreateIndex(), llvm::IRBuilderBase::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), createScalarIVSteps(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrBitCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateStepVector(), llvm::CastInst::CreateTruncOrBitCast(), llvm::IRBuilderBase::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrBitCast(), llvm::IRBuilderBase::CreateZExtOrTrunc(), despeculateCountZeros(), dropRedundantMaskingOfLeftShiftInput(), llvm::VPScalarIVStepsRecipe::execute(), llvm::InstCombinerImpl::foldAddWithConstant(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), foldICmpXNegX(), llvm::InstCombinerImpl::foldItoFPtoI(), foldSelectICmpAndAnd(), foldSelectICmpLshrAshr(), llvm::InstCombinerImpl::FoldShiftByConstant(), foldShiftedShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldShiftOfShiftedBinOp(), llvm::InstCombinerImpl::foldSignBitTest(), foldSignedTruncationCheck(), foldTruncInsEltPair(), foldTruncShuffle(), generateCreationChecksForBinOp(), llvm::RISCVTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), getBitWidth(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), getElSizeLog2Diff(), llvm::getExpressionForConstant(), llvm::RISCVTTIImpl::getExtendedReductionCost(), llvm::IntegerType::getExtendedType(), getHistogramCost(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::GCNTTIImpl::getLoadVectorFactor(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::X86TTIImpl::getMinMaxReductionCost(), getRuntimeVFAsFloat(), llvm::MinMaxIntrinsic::getSaturationPoint(), llvm::X86TTIImpl::getScalarizationOverhead(), getScalarSizeInBits(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), getSplatableConstant(), getStepVector(), getTargetConstantBitsFromNode(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::getWiderType(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::X86TargetLowering::isCheapToSpeculateCttz(), llvm::CastInst::isEliminableCastPair(), llvm::SystemZTTIImpl::isFoldableLoad(), isKnownExactCastIntToFP(), llvm::AArch64TTIImpl::isLegalBroadcastLoad(), llvm::ARMTTIImpl::isLegalMaskedGather(), llvm::ARMTTIImpl::isLegalMaskedLoad(), isMMAType(), llvm::CastInst::isNoopCast(), llvm::AMDGPUTargetLowering::isTruncateFree(), isVectorLaneType(), llvm::X86TargetLowering::isVectorShiftByScalarCheap(), llvm::AMDGPUTargetLowering::isZExtFree(), matchOrConcat(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), llvm::ARMTTIImpl::preferInLoopReduction(), processAShr(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::ScalarEvolution::LoopGuards::rewrite(), llvm::salvageDebugInfoImpl(), simplifyAndInst(), simplifyAShrInst(), llvm::simplifyBinaryIntrinsic(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyRecipe(), simplifyShlInst(), llvm::InstCombinerImpl::simplifyShrShlDemandedBits(), simplifyUnaryIntrinsic(), simplifyX86pack(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::Constant::toConstantRange(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), tryToRecognizePopCount(), tryToRecognizeTableBasedCttz(), upgradeARMIntrinsicCall(), upgradeAVX512MaskToSelect(), upgradeX86IntrinsicCall(), upgradeX86VPERMT2Intrinsics(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ getScalarTy()

template<typename ScalarTy >
static Type * llvm::Type::getScalarTy ( LLVMContext C)
inlinestatic

Definition at line 460 of file Type.h.

References llvm::CallingConv::C, getDoubleTy(), getFloatTy(), getIntNTy(), and llvm_unreachable.

◆ getScalarType()

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

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

Definition at line 343 of file Type.h.

References getContainedType(), and isVectorTy().

Referenced by llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), atomicIgnoresDenormalModeOrFPModeIsFTZ(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), llvm::CastInst::castIsValid(), checkType(), computeKnownBits(), computeKnownBitsFromOperator(), computeKnownFPClass(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), ComputeNumSignBitsImpl(), llvm::ConstantFoldLoadThroughBitcast(), llvm::IRBuilderBase::CreateStepVector(), llvm::emitGEPOffset(), llvm::VPWidenCallRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandAbs(), expandAnyIntrinsic(), expandExpIntrinsic(), expandLengthIntrinsic(), expandLogIntrinsic(), expandNormalizeIntrinsic(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), llvm::ConstantFP::get(), llvm::ConstantInt::get(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::TargetTransformInfoImplBase::getArithmeticInstrCost(), llvm::TargetTransformInfo::getArithmeticInstrCost(), getCmpOpsType(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExactLogBase2(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::ConstantFP::getInfinity(), llvm::Constant::getIntegerValue(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getMaxForClamp(), llvm::ARMTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::ConstantFP::getNaN(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantFP::getQNaN(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::ConstantFP::getSNaN(), getStepVector(), llvm::RISCVTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), llvm::BasicTTIImplBase< T >::getVectorInstrCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), getWidenedType(), llvm::ConstantFP::getZero(), getZeroFP(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::hasConditionalLoadStoreForType(), hasSameExtUse(), inputDenormalIsDAZ(), inputDenormalIsIEEE(), inputDenormalIsIEEEOrPosZero(), isBufferFatPtrOrVector(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::AArch64TargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::PPCTargetLowering::isFMAFasterThanFMulAndFAdd(), isFPOrFPVectorTy(), isIntOrIntVectorTy(), llvm::KnownFPClass::isKnownNeverLogicalPosZero(), isKnownNonZeroFromOperator(), llvm::AArch64TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::AArch64TTIImpl::isLegalMaskedLoadStore(), isPtrOrPtrVectorTy(), llvm::HexagonSubtarget::isTypeForHVX(), isValidElementType(), isVectorPromotionViable(), optimizeCallInst(), optimizeSection(), outputDenormalIsIEEEOrPosZero(), llvm::KnownFPClass::propagateDenormal(), rebuildExtCst(), llvm::CallLowering::setArgFlags(), llvm::ARMTargetLowering::shouldConvertSplatType(), shrinkInsertElt(), simplifyAMDGCNImageIntrinsic(), llvm::UpgradeIntrinsicCall(), upgradeX86ConcatShift(), upgradeX86Rotate(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitXor(), and WriteConstantInternal().

◆ getStructElementType()

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

◆ getStructName()

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

◆ getStructNumElements()

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

◆ getSubclassData()

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

◆ getTargetExtName()

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

◆ getTokenTy()

static Type * llvm::Type::getTokenTy ( LLVMContext C)
static

◆ getTypeID()

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

Return the type id for the type.

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

Definition at line 136 of file Type.h.

Referenced by llvm::FunctionComparator::cmpTypes(), compareCmp(), llvm::isa_impl< PointerType, Type >::doit(), executeFAddInst(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFDivInst(), executeFMulInst(), executeFNegInst(), executeFRemInst(), executeFSubInst(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), getArrayElementType(), llvm::ExecutionEngine::getConstantValue(), llvm::EVT::getEVT(), llvm::getFloatFn(), llvm::AMDGPULibFuncBase::Param::getFromTy(), getMangledTypeStr(), llvm::Constant::getNullValue(), getOverloadKind(), llvm::getPointerAddressSpace(), llvm::NVPTXTargetLowering::getPrototype(), llvm::VectorType::getTruncatedElementVectorType(), getTypeID(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getTypeName(), llvm::DataLayout::getTypeSizeInBits(), llvm::MVT::getVT(), getZeroFP(), llvm::hasFloatFn(), is16bitFPTy(), isAggregateType(), isArrayTy(), isBFloatTy(), isDoubleTy(), isFirstClassType(), isFloatingPointTy(), isFloatTy(), llvm::AArch64TargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::PPCTargetLowering::isFMAFasterThanFMulAndFAdd(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIEEELikeFPTy(), isIntegerTy(), isLabelTy(), isLeakCheckerRoot(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isLegalCrossLaneType(), isMetadataTy(), isMultiUnitFPType(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), isTargetExtTy(), isTokenTy(), llvm::VectorType::isValidElementType(), llvm::ConstantFP::isValueValidForType(), isVectorTy(), isVoidTy(), isX86_AMXTy(), isX86_FP80Ty(), llvm::ExecutionEngine::LoadValueFromMemory(), needsFPFromSig(), needsFPStubFromParams(), ReplaceFPIntrinsicWithCall(), llvm::ExecutionEngine::StoreValueToMemory(), llvm::Interpreter::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::Interpreter::visitShuffleVectorInst(), and llvm::Interpreter::visitVAArgInst().

◆ getVoidTy()

static Type * llvm::Type::getVoidTy ( LLVMContext C)
static

Referenced by CreateAssert(), llvm::MIRParserImpl::createDummyFunction(), CreateFailBB(), createFrameHelperMachineFunction(), llvm::IRBuilderBase::CreateFree(), llvm::RandomIRBuilder::createFunctionDefinition(), llvm::createMemLibcall(), llvm::createSanitizerCtor(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::declareSanitizerInitFunction(), DecodeFixedType(), llvm::orc::IRSpeculationLayer::emit(), emitInlineAsm(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::VPWidenStoreEVLRecipe::execute(), expandToSwitch(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), getFreshReductionFunc(), getFunctionTypeFromAsyncSuspend(), llvm::SelectionDAG::getMemset(), llvm::getOrCreateSanitizerCtorAndInitFunctions(), getOrInsertValueProfilingCall(), getTargetTypeInfo(), llvm::EVT::getTypeForEVT(), getTypeFromParameterKind(), llvm::IRBuilderBase::getVoidTy(), insertCall(), insertCallBeforeInstruction(), insertInlineAsmProcess(), InsertSafepointPoll(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::ARMTargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), insertUseHolderAfter(), LLVMVoidTypeInContext(), lowerAwaitSuspend(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), llvm::TargetLowering::LowerCallTo(), llvm::VETargetLowering::lowerDYNAMIC_STACKALLOC(), llvm::SparcTargetLowering::LowerF128Op(), llvm::lowerGlobalIFuncUsersAsGlobalCtor(), llvm::SelectionDAG::makeStateFunctionCall(), makeStatepointExplicitImpl(), llvm::InsertFunctionStrategy::mutate(), llvm::parseBasicTypeName(), llvm::parseTypeString(), runImpl(), and llvm::Interpreter::visitReturnInst().

◆ getWasm_ExternrefTy()

static Type * llvm::Type::getWasm_ExternrefTy ( LLVMContext C)
static

◆ getWasm_FuncrefTy()

static Type * llvm::Type::getWasm_FuncrefTy ( LLVMContext C)
static

◆ getWithNewBitWidth()

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

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

Referenced by llvm::InstCombinerImpl::foldICmpShlConstant(), and llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost().

◆ getWithNewType()

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

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

For non-vectors simply returns EltTy.

Referenced by llvm::InstCombinerImpl::visitIntToPtr(), and llvm::InstCombinerImpl::visitPtrToInt().

◆ getX86_AMXTy()

static Type * llvm::Type::getX86_AMXTy ( LLVMContext C)
static

◆ getX86_FP80Ty()

static Type * llvm::Type::getX86_FP80Ty ( LLVMContext C)
static

◆ is16bitFPTy()

bool llvm::Type::is16bitFPTy ( ) const
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().

◆ isAggregateType()

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

Return true if the type is an aggregate type.

This means it is valid as the first operand of an insertvalue or extractvalue instruction. This includes struct and array types, but does not include vector types.

Definition at line 291 of file Type.h.

References ArrayTyID, getTypeID(), and StructTyID.

Referenced by advanceToNextLeafType(), llvm::CastInst::castIsValid(), llvm::ConstantFoldLoadThroughBitcast(), firstRealType(), llvm::ExecutionEngine::getConstantValue(), IsTypePassedAsArray(), lowerKernelArguments(), nextRealType(), and ShouldPassAsArray().

◆ isArrayTy()

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

◆ isBFloatTy()

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

◆ isDoubleTy()

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

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

Definition at line 156 of file Type.h.

References DoubleTyID, and getTypeID().

Referenced by emitDebugValueComment(), encodeVecTypeHint(), expandIToFP(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::GCNTTIImpl::instCombineIntrinsic(), isAtomicRMWLegalXChgTy(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::X86TTIImpl::isLegalAltInstr(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalNTStore(), llvm::isMathLibCallNoop(), isVectorLaneType(), LLVMConstRealGetDouble(), llvm::ExecutionEngine::LoadValueFromMemory(), matchIntrinsicType(), matchType(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), shrinkFPConstant(), solveTypeName(), and updateFlags().

◆ isEmptyTy()

bool llvm::Type::isEmptyTy ( ) const

Return true if this type is empty, that is, it has no elements or all of its elements are empty.

Referenced by areGlobalsPotentiallyEqual(), and llvm::CallLowering::ArgInfo::ArgInfo().

◆ isFirstClassType()

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

◆ isFloatingPointTy()

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

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

Definition at line 184 of file Type.h.

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

Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), convertTo16Bit(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), createBitOrPointerCast(), createCmpXchgInstFun(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandAnyIntrinsic(), FoldBitCast(), foldSelectShuffleWith1Binop(), llvm::Constant::getAllOnesValue(), llvm::TargetTransformInfoImplBase::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), llvm::getExpressionForConstant(), getMaxForClamp(), llvm::HexagonTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), getRuntimeVFAsFloat(), llvm::AArch64TTIImpl::getScalarizationOverhead(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getStepVector(), llvm::VectorType::getTruncatedElementVectorType(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::AA::getWithType(), isFPOrFPVectorTy(), llvm::InductionDescriptor::isInductionPHI(), isSingleValueType(), isSized(), isSupportedAtomicType(), llvm::HexagonSubtarget::isTypeForHVX(), llvm::VectorType::isValidElementType(), matchType(), MaybeVectorizeType(), llvm::MipsCCState::PreAnalyzeCallOperand(), llvm::MipsCCState::PreAnalyzeFormalArgument(), llvm::TargetLoweringBase::shouldCastAtomicLoadInIR(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), llvm::TargetLoweringBase::shouldConvertPhiType(), simplifyAMDGCNImageIntrinsic(), solveDIType(), solveTypeName(), supportedAddressingMode(), TryToShrinkGlobalToBoolean(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

◆ isFloatTy()

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

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

Definition at line 153 of file Type.h.

References FloatTyID, and getTypeID().

Referenced by canContractSqrtToRsq(), emitDebugValueComment(), llvm::SITargetLowering::emitExpandAtomicRMW(), encodeVecTypeHint(), executeFCMP_ORD(), executeFCMP_UNO(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::TargetLibraryInfoImpl::getLibFunc(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::LoongArchTTIImpl::getRegisterClassForType(), llvm::PPCTTIImpl::getRegisterClassForType(), llvm::RISCVTTIImpl::getRegisterClassForType(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::GCNTTIImpl::instCombineIntrinsic(), isAtomicRMWLegalXChgTy(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::X86TTIImpl::isLegalAltInstr(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::X86TTIImpl::isLegalNTStore(), llvm::isMathLibCallNoop(), isVectorLaneType(), LLVMConstRealGetDouble(), llvm::ExecutionEngine::LoadValueFromMemory(), matchIntrinsicType(), matchType(), optimizeDoubleFP(), printConstant(), rebuildConstant(), llvm::ARMTargetLowering::shouldConvertSplatType(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), and solveTypeName().

◆ isFP128Ty()

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

◆ isFPOrFPVectorTy()

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

◆ isFunctionTy()

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

◆ isFunctionVarArg()

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

◆ isHalfTy()

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

◆ isIEEE()

bool llvm::Type::isIEEE ( ) const

Return whether the type is IEEE compatible, as defined by the eponymous method in APFloat.

Referenced by llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitXor().

◆ isIEEELikeFPTy()

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

Return true if this is a well-behaved IEEE-like type, which has a IEEE compatible layout as defined by APFloat::isIEEE(), and does not have non-IEEE values, such as x86_fp80's unnormal values.

Definition at line 170 of file Type.h.

References BFloatTyID, DoubleTyID, FloatTyID, FP128TyID, getTypeID(), and HalfTyID.

Referenced by llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBitCast(), foldLogOpOfMaskedICmps_NotAllZeros_BMask_Mixed(), and isFloatingPointTy().

◆ isIntegerTy() [1/2]

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

True if this is an instance of IntegerType.

Definition at line 224 of file Type.h.

References getTypeID(), and IntegerTyID.

Referenced by llvm::GEPOperator::accumulateConstantOffset(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), askForAssumedConstant(), canConvertValue(), canHoistIVInc(), canSafelyConvertTo16Bit(), llvm::VNCoercion::coerceAvailableValueToLoadType(), collectUnswitchCandidatesWithInjections(), combineAndLoadToBZHI(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), ComputePTXValueVTs(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadThroughBitcast(), convertTo16Bit(), countToEliminateCompares(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicCompare(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), llvm::CastInst::CreateBitOrPointerCast(), createCast(), llvm::AArch64TargetLowering::createComplexDeinterleavingIR(), createNodeForSelectViaUMinSeq(), createScalarIVSteps(), llvm::createStepForVF(), llvm::OpenMPIRBuilder::createTeams(), decompose(), emitTransformedIndex(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), expandBounds(), llvm::X86TargetLowering::ExpandInlineAsm(), llvm::extractConstantMask(), FoldBitCast(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), foldTwoEntryPHINode(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), genLoopLimit(), getAISize(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::RISCVTTIImpl::getArithmeticReductionCost(), llvm::AArch64TargetLowering::getAsmOperandValueType(), llvm::CastInst::getCastOpcode(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::getConstantDataArrayInfo(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::LanaiTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), getIntImmCostImpl(), llvm::AArch64TTIImpl::getIntImmCostInst(), llvm::PPCTTIImpl::getIntImmCostInst(), llvm::RISCVTTIImpl::getIntImmCostInst(), llvm::SystemZTTIImpl::getIntImmCostInst(), llvm::X86TTIImpl::getIntImmCostInst(), llvm::AArch64TTIImpl::getIntImmCostIntrin(), llvm::PPCTTIImpl::getIntImmCostIntrin(), llvm::SystemZTTIImpl::getIntImmCostIntrin(), llvm::X86TTIImpl::getIntImmCostIntrin(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), getLoadStoreAddrMode(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), getMaxForClamp(), getMinForClamp(), llvm::RISCVTTIImpl::getMinMaxReductionCost(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ScalarEvolution::getPtrToIntExpr(), llvm::RISCVTTIImpl::getShuffleCost(), getSignedIntOrFpConstant(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getStepVector(), llvm::AArch64TTIImpl::getStoreMinimumVF(), llvm::VNCoercion::getStoreValueForLoadHelper(), getTargetConstantBitsFromNode(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::X86TTIImpl::hasConditionalLoadStoreForType(), llvm::hasIterationCountInvariantInParent(), llvm::HexagonEvaluator::HexagonEvaluator(), hoistMinMax(), llvm::GCNTTIImpl::instCombineIntrinsic(), instCombineSVECondLast(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), llvm::CastInst::isEliminableCastPair(), llvm::isGEPBasedOnPointerToString(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntOrIntVectorTy(), isIntOrPtrTy(), llvm::SystemZTargetLowering::isLegalAddressingMode(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedExpandLoad(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), isSingleValueType(), llvm::ConstantDataSequential::isString(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::HexagonSubtarget::isTypeForHVX(), IsTypePassedAsArray(), llvm::VectorType::isValidElementType(), llvm::AAValueConstantRange::isValidIRPositionForInit(), llvm::AAPotentialConstantValues::isValidIRPositionForInit(), llvm::ConstantInt::isValueValidForType(), isVectorLaneType(), isVectorPromotionViableForSlice(), llvm::AArch64TargetLowering::isZExtFree(), llvm::MSP430TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), llvm::ExecutionEngine::LoadValueFromMemory(), llvm::SITargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerCall(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::AMDGPUCallLowering::lowerTailCall(), llvm::IntrinsicLowering::LowerToByteSwap(), matchIntrinsicType(), matchType(), llvm::MipsCCState::originalTypeIsF128(), printConstant(), llvm::replaceAllDbgUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::RISCVTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::TargetLoweringBase::shouldConvertPhiType(), llvm::NVPTXTargetLowering::shouldExpandAtomicRMWInIR(), llvm::SystemZTargetLowering::shouldExpandAtomicRMWInIR(), ShouldPassAsArray(), llvm::X86TargetLowering::shouldSinkOperands(), llvm::LoongArchTargetLowering::signExtendConstant(), llvm::RISCVTargetLowering::signExtendConstant(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), simplifyX86immShift(), solveDIType(), solveTypeName(), splitMergedValStore(), swapICmpOperandsToExposeCSEOpportunities(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), tryToRecognizeTableBasedCttz(), llvm::AttributeFuncs::typeIncompatible(), unpackFromRegLoc(), updatePredecessorProfileMetadata(), llvm::UpgradeIntrinsicCall(), upgradeX86IntrinsicCall(), upgradeX86IntrinsicsWith8BitMask(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLShr(), and WriteConstantInternal().

◆ isIntegerTy() [2/2]

bool llvm::Type::isIntegerTy ( unsigned  Bitwidth) const

Return true if this is an IntegerType of the given width.

◆ isIntOrIntVectorTy() [1/2]

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

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

Definition at line 230 of file Type.h.

References getScalarType(), and isIntegerTy().

Referenced by llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::add(), llvm::PPCTTIImpl::areTypesABICompatible(), llvm::ValueLatticeElement::asConstantRange(), buildMultiplyTree(), llvm::CastInst::castIsValid(), llvm::InstCombinerImpl::commonIDivTransforms(), computeKnownBits(), llvm::ConstantFoldLoadFromUniformValue(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreateIntegerCast(), llvm::IRBuilderBase::CreateLogicalAnd(), llvm::IRBuilderBase::CreateLogicalOr(), llvm::createMinMaxOp(), llvm::CastInst::CreatePointerCast(), llvm::IRBuilderBase::CreateSExtOrTrunc(), llvm::IRBuilderBase::CreateZExtOrTrunc(), foldAndOrOfICmpEqConstantAndICmp(), foldBitCastBitwiseLogic(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), foldSelectICmpLshrAshr(), foldTruncShuffle(), llvm::ConstantExpr::get(), getBoolVecFromMask(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::X86TTIImpl::getCmpSelInstrCost(), getDecodedBinaryOpcode(), getDecodedUnaryOpcode(), llvm::VectorType::getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), getMaskedTypeForICmpPair(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getPtrToInt(), getSafeDivisor(), llvm::X86TTIImpl::getScalarizationOverhead(), llvm::ConstantInt::getTrue(), llvm::ConstantExpr::getTrunc(), llvm::SystemZTTIImpl::getVectorInstrCost(), llvm::haveNoCommonBitsSet(), llvm::CastInst::isEliminableCastPair(), llvm::isImpliedCondition(), isKnownNonEqual(), isKnownNonZeroFromOperator(), isNeutralValue(), llvm::DemandedBits::isUseDead(), LowerNegateToMultiply(), matchIntrinsicType(), llvm::recognizeBSwapOrBitReverseIdiom(), simplifyAddInst(), simplifyAndInst(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyICmpOfBools(), simplifyMulInst(), simplifyOrInst(), simplifySubInst(), tryToRecognizePopCount(), llvm::AttributeFuncs::typeIncompatible(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), and llvm::InstCombinerImpl::visitZExt().

◆ isIntOrIntVectorTy() [2/2]

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

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

Definition at line 234 of file Type.h.

References llvm::BitWidth, getScalarType(), and isIntegerTy().

◆ isIntOrPtrTy()

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

◆ isLabelTy()

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

◆ isMetadataTy()

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

◆ isMultiUnitFPType()

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

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

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

Definition at line 193 of file Type.h.

References getTypeID(), and PPC_FP128TyID.

◆ isOpaquePointerTy()

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

True if this is an instance of an opaque PointerType.

Definition at line 255 of file Type.h.

References isPointerTy().

◆ isPointerTy()

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

True if this is an instance of PointerType.

Definition at line 251 of file Type.h.

References getTypeID(), and PointerTyID.

Referenced by llvm::AliasSetTracker::add(), addConditions(), BuildConstantFromSCEV(), canBeCheaplyTransformed(), canConvertValue(), llvm::canReplacePointersInUseIfEqual(), llvm::ScalarEvolution::LoopGuards::collect(), CompareValueComplexity(), computeKnownBits(), computeKnownBitsFromCmp(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldLoadThroughBitcast(), llvm::convertPointerToIntegerType(), llvm::copyMetadataForLoad(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::OpenMPIRBuilder::createAtomicRead(), llvm::OpenMPIRBuilder::createAtomicUpdate(), llvm::OpenMPIRBuilder::createAtomicWrite(), createBitOrPointerCast(), llvm::CastInst::CreateBitOrPointerCast(), createCast(), createCmpXchgInstFun(), decompose(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg(), evaluateICmpRelation(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), llvm::RandomIRBuilder::findPointer(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), getExactSDiv(), llvm::getExpressionForConstant(), llvm::MemoryLocation::getForDest(), getHistogramCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ScalarEvolution::getLosslessPtrToIntExpr(), llvm::ScalarEvolution::getMinusSCEV(), llvm::AAResults::getModRefInfo(), llvm::ScalarEvolution::getMulExpr(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), llvm::AMDGPULibFunc::getOrInsertFunction(), llvm::getPtrStride(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::ScalarEvolution::getTypeSizeInBits(), llvm::ScalarEvolution::getUDivExpr(), llvm::getUnderlyingObject(), llvm::AA::getWithType(), llvm::PPCTTIImpl::hasActiveVectorLength(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::Attributor::identifyDefaultAbstractAttributes(), llvm::AArch64TTIImpl::isElementTypeLegalForScalableVector(), llvm::InductionDescriptor::isInductionPHI(), isIntOrPtrTy(), isLegalElementTypeForRVV(), llvm::X86TTIImpl::isLegalMaskedGatherScatter(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::isLibFreeFunction(), isNoopBitcast(), isOpaquePointerTy(), isPtrOrPtrVectorTy(), isSingleValueType(), llvm::VectorType::isValidElementType(), isVectorLaneType(), isVectorPromotionViable(), llvm::WebAssembly::isWebAssemblyExternrefType(), llvm::WebAssembly::isWebAssemblyFuncrefType(), llvm::MipsCallLowering::lowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), matchType(), optimizeOnceStoredGlobal(), promoteAllocaUserToVector(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceWithConstant(), llvm::MCJIT::runFunction(), llvm::salvageDebugInfoImpl(), llvm::TargetLoweringBase::shouldCastAtomicRMWIInIR(), shouldConvertToRelLookupTable(), simplifyICmpInst(), solveDIType(), solveTypeName(), TryToShrinkGlobalToBoolean(), llvm::AttributeFuncs::typeIncompatible(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitPHINode().

◆ isPPC_FP128Ty()

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

◆ isPtrOrPtrVectorTy()

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

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

Definition at line 258 of file Type.h.

References getScalarType(), and isPointerTy().

Referenced by llvm::CastInst::castIsValid(), llvm::VNCoercion::coerceAvailableValueToLoadType(), combineLoadToOperationType(), computeKnownBits(), convertValue(), llvm::IRBuilderBase::CreateBitOrPointerCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), llvm::DataLayout::getIndexType(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::DataLayout::getIntPtrType(), llvm::ConstantExpr::getIntToPtr(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::DataLayout::getPointerTypeSizeInBits(), getScalarSizeInBits(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::CastInst::isEliminableCastPair(), isKnownNonZeroFromOperator(), llvm::AANoSync::isValidIRPositionForInit(), llvm::AANonNull::isValidIRPositionForInit(), llvm::AANoAlias::isValidIRPositionForInit(), llvm::AANoFree::isValidIRPositionForInit(), llvm::AADereferenceable::isValidIRPositionForInit(), llvm::AAAlign::isValidIRPositionForInit(), llvm::AANoCapture::isValidIRPositionForInit(), llvm::AAPrivatizablePtr::isValidIRPositionForInit(), llvm::AAMemoryBehavior::isValidIRPositionForInit(), llvm::AAMemoryLocation::isValidIRPositionForInit(), llvm::AAPointerInfo::isValidIRPositionForInit(), llvm::AAUnderlyingObjects::isValidIRPositionForInit(), llvm::AAAddressSpace::isValidIRPositionForInit(), llvm::AAAllocationInfo::isValidIRPositionForInit(), promoteAllocaUserToVector(), simplifyCastInst(), llvm::AttributeFuncs::typeIncompatible(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().

◆ isScalableTargetExtTy()

bool llvm::Type::isScalableTargetExtTy ( ) const

Return true if this is a target extension type with a scalable layout.

Referenced by llvm::getLLTForType().

◆ isScalableTy()

bool llvm::Type::isScalableTy ( ) const

◆ isSingleValueType()

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

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

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

Definition at line 283 of file Type.h.

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

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

◆ isSized()

bool llvm::Type::isSized ( SmallPtrSetImpl< Type * > *  Visited = nullptr) const
inline

◆ isStructTy()

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

◆ isTargetExtTy()

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

Return true if this is a target extension type.

Definition at line 203 of file Type.h.

References getTypeID(), and TargetExtTyID.

Referenced by llvm::applyWrappers(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), canConvertValue(), and isSingleValueType().

◆ isTokenTy()

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

◆ isVectorTy()

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

True if this is an instance of VectorType.

Definition at line 261 of file Type.h.

References FixedVectorTyID, getTypeID(), and ScalableVectorTyID.

Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), canEvaluateShuffled(), canonicalizeBitCastExtElt(), llvm::SelectionDAG::computeKnownBits(), computeKnownBitsFromOperator(), llvm::SelectionDAG::ComputeNumSignBits(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadThroughBitcast(), createCmpXchgInstFun(), createLogicFromTable(), llvm::IRBuilderBase::CreateMaskedCompressStore(), llvm::IRBuilderBase::CreateMaskedExpandLoad(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::IRBuilderBase::CreateMaskedStore(), llvm::createMemCpyLoopKnownSize(), llvm::CastInst::CreatePointerCast(), despeculateCountZeros(), llvm::emitGEPOffset(), llvm::VPInstruction::execute(), llvm::VPWidenCallRecipe::execute(), llvm::VPBranchOnMaskRecipe::execute(), executeFCMP_BOOL(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UNO(), executeSelectInst(), expandAbs(), expandAnyIntrinsic(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), expandExpIntrinsic(), expandIntegerDot(), expandLengthIntrinsic(), expandLogIntrinsic(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findForkedSCEVs(), foldBitCastBitwiseLogic(), foldBitCastSelect(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpTruncConstant(), foldSelectICmpAnd(), foldSelectICmpAndBinOp(), llvm::InstCombinerImpl::foldSelectOpOp(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldTruncShuffle(), llvm::ConstantAggregateZero::get(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::ARMTTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::X86TTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), getCmpOpsType(), llvm::BasicTTIImplBase< T >::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getCmpSelInstrCost(), llvm::RISCVTTIImpl::getCmpSelInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::ARMTTIImpl::getGatherScatterOpCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getInsertElement(), llvm::TargetTransformInfoImplCRTPBase< T >::getInstructionCost(), llvm::LoopVectorizationCostModel::getInstructionCost(), getMaxForClamp(), llvm::RISCVTTIImpl::getMemoryOpCost(), getMinForClamp(), llvm::SPIRVGlobalRegistry::getOrCreateConsIntVector(), llvm::SPIRVGlobalRegistry::getOrCreateConstVector(), getReducedType(), llvm::RISCVTTIImpl::getRegUsageForType(), getScalarType(), llvm::ARMTTIImpl::getShuffleCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::BasicTTIImplBase< T >::getTypeBasedIntrinsicInstrCost(), getUniformBase(), getValueOnEdge(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::RISCVTTIImpl::getVectorInstrCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), insertValues(), llvm::X86TTIImpl::instCombineIntrinsic(), llvm::X86TargetLowering::isCheapToSpeculateCttz(), isConstantUsingVectorTy(), llvm::CastInst::isEliminableCastPair(), llvm::isImpliedCondition(), llvm::PPCTargetLowering::isLegalAddressingMode(), llvm::SystemZTargetLowering::isLegalAddressingMode(), isMMAType(), isSingleValueType(), isSized(), llvm::HexagonSubtarget::isTypeForHVX(), IsTypePassedAsArray(), llvm::ShuffleVectorInst::isValidOperands(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::PatternMatch::ElementWiseBitCast_match< Op_t >::match(), llvm::MipsCCState::originalTypeIsVectorFloat(), llvm::MipsCCState::PreAnalyzeCallOperand(), llvm::MipsCCState::PreAnalyzeFormalArgument(), processSelect(), replaceWithCallToVeclib(), llvm::salvageDebugInfoImpl(), shouldConvertImpl(), ShouldPassAsArray(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle(), simplifyGEPInst(), simplifyX86immShift(), supportedAddressingMode(), threadCmpOverSelect(), transformToIndexedCompare(), TryToShrinkGlobalToBoolean(), llvm::PPCTTIImpl::vectorCostAdjustmentFactor(), llvm::Interpreter::visitAShr(), llvm::InstCombinerImpl::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::Interpreter::visitLShr(), llvm::Interpreter::visitShl(), llvm::InstCombinerImpl::visitTrunc(), llvm::Interpreter::visitUnaryOperator(), and WriteConstantInternal().

◆ isVoidTy()

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

◆ isX86_AMXTy()

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

◆ isX86_FP80Ty()

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

Return true if this is x86 long double.

Definition at line 159 of file Type.h.

References getTypeID(), and X86_FP80TyID.

Referenced by expandIToFP(), llvm::ExecutionEngine::getConstantValue(), and isValidElementType().

◆ print()

void llvm::Type::print ( raw_ostream O,
bool  IsForDebug = false,
bool  NoDetails = false 
) const

Print the current type.

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

Referenced by emitGlobalConstantFP(), llvm::Attribute::getAsString(), getBranchCondString(), getTypeName(), and PrintResults().

◆ setSubclassData()

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

◆ subtype_begin()

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

Definition at line 354 of file Type.h.

References ContainedTys.

Referenced by subtype_rend(), and subtypes().

◆ subtype_end()

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

Definition at line 355 of file Type.h.

References ContainedTys, and NumContainedTys.

Referenced by subtype_rbegin(), and subtypes().

◆ subtype_rbegin()

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

Definition at line 362 of file Type.h.

References subtype_end().

◆ subtype_rend()

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

Definition at line 365 of file Type.h.

References subtype_begin().

◆ subtypes()

ArrayRef< Type * > llvm::Type::subtypes ( ) const
inline

Definition at line 356 of file Type.h.

References subtype_begin(), and subtype_end().

Friends And Related Function Documentation

◆ LLVMContextImpl

friend class LLVMContextImpl
friend

Definition at line 91 of file Type.h.

Member Data Documentation

◆ ContainedTys

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

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

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

Definition at line 113 of file Type.h.

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

◆ NumContainedTys

unsigned llvm::Type::NumContainedTys = 0
protected

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