LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static 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]
Collaboration diagram for llvm::Type:
Collaboration graph
[legend]

Public Types

enum  TypeID {
  VoidTyID = 0, HalfTyID, FloatTyID, DoubleTyID,
  X86_FP80TyID, FP128TyID, PPC_FP128TyID, LabelTyID,
  MetadataTyID, X86_MMXTyID, TokenTyID, IntegerTyID,
  FunctionTyID, StructTyID, ArrayTyID, PointerTyID,
  VectorTyID
}
 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. More...
 
void dump () const
 
LLVMContextgetContext () const
 Return the LLVMContext in which this type was uniqued. More...
 
TypeID getTypeID () const
 Return the type id for the type. More...
 
bool isVoidTy () const
 Return true if this is 'void'. More...
 
bool isHalfTy () const
 Return true if this is 'half', a 16-bit IEEE fp type. More...
 
bool isFloatTy () const
 Return true if this is 'float', a 32-bit IEEE fp type. More...
 
bool isDoubleTy () const
 Return true if this is 'double', a 64-bit IEEE fp type. More...
 
bool isX86_FP80Ty () const
 Return true if this is x86 long double. More...
 
bool isFP128Ty () const
 Return true if this is 'fp128'. More...
 
bool isPPC_FP128Ty () const
 Return true if this is powerpc long double. More...
 
bool isFloatingPointTy () const
 Return true if this is one of the six floating-point types. More...
 
const fltSemanticsgetFltSemantics () const
 
bool isX86_MMXTy () const
 Return true if this is X86 MMX. More...
 
bool isFPOrFPVectorTy () const
 Return true if this is a FP type or a vector of FP. More...
 
bool isLabelTy () const
 Return true if this is 'label'. More...
 
bool isMetadataTy () const
 Return true if this is 'metadata'. More...
 
bool isTokenTy () const
 Return true if this is 'token'. More...
 
bool isIntegerTy () const
 True if this is an instance of IntegerType. More...
 
bool isIntegerTy (unsigned Bitwidth) const
 Return true if this is an IntegerType of the given width. More...
 
bool isIntOrIntVectorTy () const
 Return true if this is an integer type or a vector of integer types. More...
 
bool isIntOrIntVectorTy (unsigned BitWidth) const
 Return true if this is an integer type or a vector of integer types of the given width. More...
 
bool isIntOrPtrTy () const
 Return true if this is an integer type or a pointer type. More...
 
bool isFunctionTy () const
 True if this is an instance of FunctionType. More...
 
bool isStructTy () const
 True if this is an instance of StructType. More...
 
bool isArrayTy () const
 True if this is an instance of ArrayType. More...
 
bool isPointerTy () const
 True if this is an instance of PointerType. More...
 
bool isPtrOrPtrVectorTy () const
 Return true if this is a pointer type or a vector of pointer types. More...
 
bool isVectorTy () const
 True if this is an instance of VectorType. More...
 
bool canLosslesslyBitCastTo (Type *Ty) const
 Return true if this type could be converted with a lossless BitCast to type 'Ty'. More...
 
bool isEmptyTy () const
 Return true if this type is empty, that is, it has no elements or all of its elements are empty. More...
 
bool isFirstClassType () const
 Return true if the type is "first class", meaning it is a valid type for a Value. More...
 
bool isSingleValueType () const
 Return true if the type is a valid type for a register in codegen. More...
 
bool isAggregateType () const
 Return true if the type is an aggregate type. More...
 
bool isSized (SmallPtrSetImpl< Type *> *Visited=nullptr) const
 Return true if it makes sense to take the size of this type. More...
 
unsigned getPrimitiveSizeInBits () const LLVM_READONLY
 Return the basic size of this type if it is a primitive type. More...
 
unsigned getScalarSizeInBits () const LLVM_READONLY
 If this is a vector type, return the getPrimitiveSizeInBits value for the element type. More...
 
int getFPMantissaWidth () const
 Return the width of the mantissa of this type. More...
 
TypegetScalarType () const
 If this is a vector type, return the element type, otherwise return 'this'. More...
 
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). More...
 
unsigned getNumContainedTypes () const
 Return the number of types in the derived type. More...
 
unsigned getIntegerBitWidth () const
 
TypegetFunctionParamType (unsigned i) const
 
unsigned getFunctionNumParams () const
 
bool isFunctionVarArg () const
 
StringRef getStructName () const
 
unsigned getStructNumElements () const
 
TypegetStructElementType (unsigned N) const
 
TypegetSequentialElementType () const
 
uint64_t getArrayNumElements () const
 
TypegetArrayElementType () const
 
unsigned getVectorNumElements () const
 
TypegetVectorElementType () const
 
TypegetPointerElementType () const
 
unsigned getPointerAddressSpace () const
 Get the address space of this pointer or pointer vector type. More...
 
PointerTypegetPointerTo (unsigned AddrSpace=0) const
 Return a pointer to the current type. More...
 

Static Public Member Functions

static TypegetPrimitiveType (LLVMContext &C, TypeID IDNumber)
 Return a type based on an identifier. More...
 
static TypegetVoidTy (LLVMContext &C)
 
static TypegetLabelTy (LLVMContext &C)
 
static TypegetHalfTy (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_MMXTy (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 PointerTypegetHalfPtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetFloatPtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetDoublePtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetX86_FP80PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetFP128PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetPPC_FP128PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetX86_MMXPtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetIntNPtrTy (LLVMContext &C, unsigned N, unsigned AS=0)
 
static PointerTypegetInt1PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetInt8PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetInt16PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetInt32PtrTy (LLVMContext &C, unsigned AS=0)
 
static PointerTypegetInt64PtrTy (LLVMContext &C, unsigned AS=0)
 

Protected Member Functions

 Type (LLVMContext &C, TypeID tid)
 
 ~Type ()=default
 
unsigned getSubclassData () const
 
void setSubclassData (unsigned val)
 

Static Protected Member Functions

static bool isSequentialType (TypeID TyID)
 

Protected Attributes

unsigned NumContainedTys = 0
 Keeps track of how many Type*'s there are in the ContainedTys list. More...
 
Type *constContainedTys = nullptr
 A pointer to the array of Types contained by this Type. More...
 

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 46 of file Type.h.

Member Typedef Documentation

◆ subtype_iterator

Definition at line 313 of file Type.h.

◆ subtype_reverse_iterator

Definition at line 321 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
VoidTyID 

0: type with no size

HalfTyID 

1: 16-bit floating point type

FloatTyID 

2: 32-bit floating point type

DoubleTyID 

3: 64-bit floating point type

X86_FP80TyID 

4: 80-bit floating point type (X87)

FP128TyID 

5: 128-bit floating point type (112-bit mantissa)

PPC_FP128TyID 

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

LabelTyID 

7: Labels

MetadataTyID 

8: Metadata

X86_MMXTyID 

9: MMX vectors (64 bits, X86 specific)

TokenTyID 

10: Tokens

IntegerTyID 

11: Arbitrary bit width integers

FunctionTyID 

12: Functions

StructTyID 

13: Structures

ArrayTyID 

14: Arrays

PointerTyID 

15: Pointers

VectorTyID 

16: SIMD 'packed' format, or other vector type

Definition at line 55 of file Type.h.

Constructor & Destructor Documentation

◆ Type()

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

◆ ~Type()

llvm::Type::~Type ( )
protecteddefault

Referenced by Type().

Member Function Documentation

◆ canLosslesslyBitCastTo()

bool Type::canLosslesslyBitCastTo ( Type Ty) const

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

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

Definition at line 61 of file Type.cpp.

References getTypeID(), isFirstClassType(), and X86_MMXTyID.

Referenced by getSuccPad(), isFuncOrArgAttr(), and isVectorTy().

◆ dump()

LLVM_DUMP_METHOD void Type::dump ( ) const

◆ getArrayElementType()

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

◆ getArrayNumElements()

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

◆ 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 333 of file Type.h.

References assert().

Referenced by llvm::computeUsesVAFloatArgument(), and memVTFromAggregate().

◆ getContext()

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

Return the LLVMContext in which this type was uniqued.

Definition at line 130 of file Type.h.

References Context.

Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), atomicSizeSupported(), llvm::canConstantFoldCallTo(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), ComputePostOrders(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadFromConstPtr(), llvm::convertPointerToIntegerType(), llvm::StructType::create(), llvm::orc::createIRTypedAddress(), llvm::FunctionLoweringInfo::CreateRegs(), llvm::Evaluator::EvaluateBlock(), FoldBitCast(), foldConstantCastPair(), foldOperationIntoPhiValue(), foldSignedTruncationCheck(), llvm::InlineAsm::get(), llvm::FunctionType::get(), llvm::ConstantInt::get(), llvm::StructType::get(), llvm::ConstantFP::get(), llvm::ConstantAggregateZero::get(), llvm::ArrayType::get(), llvm::VectorType::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::PointerType::get(), llvm::ConstantVector::get(), llvm::ConstantPointerNull::get(), llvm::UndefValue::get(), llvm::ConstantExpr::getAlignOf(), getAllocationDataForFunction(), llvm::Constant::getAllOnesValue(), llvm::ConstantExpr::getBinOpAbsorber(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::BasicBlock::getContext(), llvm::Function::getContext(), llvm::Value::getContext(), llvm::EVT::getEVT(), llvm::VectorType::getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), llvm::ConstantExpr::getFCmp(), getFirstNonAllocaInTheEntryBlock(), getFoldedCast(), llvm::ConstantExpr::getICmp(), llvm::ConstantDataSequential::getImpl(), llvm::DataLayout::getIndexType(), llvm::ConstantFP::getInfinity(), llvm::VectorType::getInteger(), llvm::Constant::getIntegerValue(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getInterleavedMemoryOpCost(), llvm::DataLayout::getIntPtrType(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::VNCoercion::getLoadValueForLoad(), llvm::IntegerType::getMask(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::VNCoercion::getMemInstValueForLoadHelper(), llvm::ConstantFP::getNaN(), llvm::ConstantFP::getNegativeZero(), llvm::Constant::getNullValue(), llvm::ConstantExpr::getOffsetOf(), getPromotedType(), llvm::ConstantFP::getQNaN(), getRelevantOperands(), getReturnAttrs(), llvm::GetReturnInfo(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantExpr::getSizeOf(), llvm::ConstantFP::getSNaN(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::ConstantInt::getTrue(), llvm::VectorType::getTruncatedElementVectorType(), llvm::Module::getTypeByName(), llvm::TargetLoweringBase::getTypeLegalizationCost(), getTypePartition(), llvm::X86TTIImpl::getUserCost(), llvm::TargetLoweringBase::getValueType(), llvm::ValueAsMetadata::handleDeletion(), llvm::ValueAsMetadata::handleRAUW(), hasLifetimeMarkers(), hasSameExtUse(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), isSupportedType(), isVectorPromotionViableForSlice(), LLVMConstIntOfArbitraryPrecision(), llvm::BlockAddress::lookup(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::X86CallLowering::lowerReturn(), llvm::AArch64CallLowering::lowerReturn(), llvm::MipsCallLowering::lowerReturn(), llvm::CmpInst::makeCmpResultType(), llvm::fuzzerop::makeConstantsWithType(), MulWillOverflow(), operator<<(), llvm::TargetLowering::ParseConstraints(), parseOptionalLinkageAux(), readTriple(), llvm::FastISel::selectStackmap(), llvm::StructType::setBody(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::StructType::setName(), switchToSelect(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::X86CallLowering::X86CallLowering().

◆ getDoublePtrTy()

PointerType * Type::getDoublePtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 192 of file Type.cpp.

References getDoubleTy(), and getPointerTo().

Referenced by getScalarTy().

◆ getDoubleTy()

Type * Type::getDoubleTy ( LLVMContext C)
static

◆ getFloatPtrTy()

PointerType * Type::getFloatPtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 188 of file Type.cpp.

References getFloatTy(), and getPointerTo().

Referenced by getScalarTy().

◆ getFloatTy()

Type * Type::getFloatTy ( LLVMContext C)
static

◆ getFltSemantics()

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

◆ getFP128PtrTy()

PointerType * Type::getFP128PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 200 of file Type.cpp.

References getFP128Ty(), and getPointerTo().

Referenced by getScalarTy().

◆ getFP128Ty()

Type * Type::getFP128Ty ( LLVMContext C)
static

◆ getFPMantissaWidth()

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 134 of file Type.cpp.

References assert(), DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, isFloatingPointTy(), isSized(), PPC_FP128TyID, and X86_FP80TyID.

Referenced by isAlwaysFoldable(), isSized(), shrinkFPConstantVector(), llvm::InstCombiner::visitFPTrunc(), and llvm::InstCombiner::visitICmpInst().

◆ getFunctionNumParams()

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

Definition at line 157 of file DerivedTypes.h.

Referenced by getNumContainedTypes().

◆ getFunctionParamType()

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

Definition at line 153 of file DerivedTypes.h.

Referenced by getNumContainedTypes(), and llvm::isLegalToPromote().

◆ getHalfPtrTy()

PointerType * Type::getHalfPtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 184 of file Type.cpp.

References getHalfTy(), and getPointerTo().

Referenced by getScalarTy().

◆ getHalfTy()

Type * Type::getHalfTy ( LLVMContext C)
static

◆ getInt128Ty()

IntegerType * Type::getInt128Ty ( LLVMContext C)
static

◆ getInt16PtrTy()

PointerType * Type::getInt16PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 224 of file Type.cpp.

References getInt16Ty(), and getPointerTo().

Referenced by getScalarTy().

◆ getInt16Ty()

IntegerType * Type::getInt16Ty ( LLVMContext C)
static

◆ getInt1PtrTy()

PointerType * Type::getInt1PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

◆ getInt1Ty()

IntegerType * Type::getInt1Ty ( LLVMContext C)
static

◆ getInt32PtrTy()

PointerType * Type::getInt32PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

◆ getInt32Ty()

IntegerType * Type::getInt32Ty ( LLVMContext C)
static

Definition at line 176 of file Type.cpp.

References llvm::LLVMContextImpl::Int32Ty, and llvm::LLVMContext::pImpl.

Referenced by llvm::Module::addModuleFlag(), llvm::IntrinsicLowering::AddPrototypes(), llvm::annotateValueSite(), asmClobbersCTR(), BuildConstantFromSCEV(), canonicalizeSaturatedSubtract(), collectShuffleElements(), collectSingleShuffleElements(), computeBytesPoppedByCalleeForSRet(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::convertPointerToIntegerType(), ConvertToSInt(), llvm::ARMConstantPoolConstant::Create(), llvm::MDBuilder::createBranchWeights(), llvm::IRBuilder< TargetFolder >::CreateConstGEP1_32(), llvm::IRBuilder< TargetFolder >::CreateConstGEP2_32(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP1_32(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP2_32(), llvm::createEfficiencySanitizerPass(), llvm::IRBuilder< TargetFolder >::CreateGlobalStringPtr(), createPrivateGlobalForSourceLoc(), llvm::createShadowStackGCLoweringPass(), createStringMetadata(), llvm::createThreadSanitizerLegacyPassPass(), llvm::createXCoreISelDag(), doPromotion(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), emitPostSt(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), evaluateInDifferentElementOrder(), llvm::CodeExtractor::findInputsOutputs(), llvm::SanitizerStatReport::finish(), FoldBitCast(), foldConstantInsEltIntoShuffle(), foldInsSequenceIntoBroadcast(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldOperationIntoPhiValue(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), getComparePred(), getContiguousRangeOfSetBits(), getDefaultPersonalityFn(), getDivRemArgList(), getInt32PtrTy(), llvm::IRBuilderBase::getInt32Ty(), getIntrinsicParamType(), llvm::ARMTargetLowering::getJumpTableEncoding(), getKeyValMD(), getOffsetFromIndices(), llvm::ConstantExpr::getOffsetOf(), getOtherIncomingValue(), getPointerElementType(), getPromotedType(), GetRMWLibcall(), getSignature(), llvm::ConstantExpr::getSizeOf(), llvm::EVT::getTypeForEVT(), getUnconditionalBrDisp(), INITIALIZE_PASS(), insertCall(), instrumentMaskedLoadOrStore(), llvm::isBytewiseValue(), isCallPromotable(), llvm::DenseMapInfo< VTableSlot >::isEqual(), IsSmallObject(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::LegalizerHelper::libcall(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XCoreInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::IntrinsicLowering::LowerIntrinsicCall(), lowerLoadRelative(), mapBinOpcode(), MarkBlocksLiveIn(), mayLoopAccessLocation(), llvm::MergeBasicBlockIntoOnlyPred(), needsRuntimeRegistrationOfSectionRange(), llvm::EscapeEnumerator::Next(), performMaskedAtomicOp(), PushArgMD(), readWideAPInt(), replaceExtractElements(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::LoopDataPrefetchPass::run(), llvm::SanitizerStatReport::SanitizerStatReport(), SegmentOffset(), shouldFixMainFunction(), shouldKeepInEntry(), ShrinkDemandedConstant(), SimplifyRelativeLoad(), simplifyX86pshufb(), simplifyX86vpermilvar(), simplifyX86vpermv(), splitGlobal(), splitMergedValStore(), SRAGlobal(), unpackLoadToAggregate(), unpackStoreToAggregate(), updateOperand(), llvm::UpgradeIntrinsicCall(), llvm::UpgradeModuleFlags(), validExtractValueIndex(), validInsertValueIndex(), validShuffleVectorIndex(), llvm::LoopVectorizeHints::vectorizeAnalysisPassName(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitShuffleVectorInst(), and llvm::BasicBlock::~BasicBlock().

◆ getInt64PtrTy()

PointerType * Type::getInt64PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

◆ getInt64Ty()

IntegerType * Type::getInt64Ty ( LLVMContext C)
static

Definition at line 177 of file Type.cpp.

References llvm::LLVMContextImpl::Int64Ty, and llvm::LLVMContext::pImpl.

Referenced by llvm::GlobalObject::addTypeMetadata(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), llvm::annotateValueSite(), asmClobbersCTR(), collectFunctionUsers(), llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::IRBuilder< TargetFolder >::CreateConstGEP1_64(), llvm::IRBuilder< TargetFolder >::CreateConstGEP2_64(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP1_64(), llvm::IRBuilder< TargetFolder >::CreateConstInBoundsGEP2_64(), llvm::createEfficiencySanitizerPass(), llvm::MDBuilder::createFunctionEntryCount(), createIRLevelProfileFlagVariable(), llvm::MDBuilder::createIrrLoopHeaderWeight(), llvm::orc::createIRTypedAddress(), llvm::IRBuilder< TargetFolder >::CreatePtrDiff(), llvm::MDBuilder::createTBAAAccessTag(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::MDBuilder::createTBAATypeNode(), doPromotion(), llvm::SIFrameLowering::emitEntryFunctionPrologue(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), foldConstantCastPair(), genLoopLimit(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), getComparePred(), getDivRemArgList(), getInt64PtrTy(), llvm::IRBuilderBase::getInt64Ty(), getIntrinsicParamType(), getKeyValMD(), llvm::VNCoercion::getMemInstValueForLoadHelper(), llvm::ConstantExpr::getOffsetOf(), getPointerElementType(), GetRMWLibcall(), llvm::ConstantExpr::getSizeOf(), llvm::InstrProfIncrementInst::getStep(), llvm::EVT::getTypeForEVT(), INITIALIZE_PASS(), llvm::InlineFunction(), insertLifetimeMarkersSurroundingCall(), llvm::isBytewiseValue(), llvm::DenseMapInfo< VTableSlot >::isEqual(), IsSafeAndProfitableToMove(), LLVMInt64TypeInContext(), llvm::IntrinsicLowering::LowerIntrinsicCall(), mapBinOpcode(), needsRuntimeRegistrationOfSectionRange(), llvm::CGProfilePass::run(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), shouldKeepInEntry(), SimplifyRelativeLoad(), simplifyX86extrq(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::Instruction::updateProfWeight(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeTBAANode(), llvm::AMDGPULibCalls::useNative(), and useSinCos().

◆ getInt8PtrTy()

PointerType * Type::getInt8PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 220 of file Type.cpp.

References getInt8Ty(), and getPointerTo().

Referenced by llvm::IntrinsicLowering::AddPrototypes(), llvm::LoopAccessInfo::addRuntimeChecks(), llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), appendToGlobalArray(), appendToUsedList(), BuildConstantFromSCEV(), llvm::coro::Shape::buildFrom(), llvm::CoroIdInst::clearPromise(), createClone(), createDevirtTriggerFunc(), llvm::createDwarfEHPass(), llvm::createEfficiencySanitizerPass(), createFree(), CreateGCRelocates(), createMalloc(), CreatePrologue(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::createShadowStackGCLoweringPass(), llvm::createThreadSanitizerLegacyPassPass(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), expandBounds(), llvm::SCEVExpander::expandCodeFor(), llvm::SanitizerStatReport::finish(), llvm::BlockAddress::get(), getAllocationDataForFunction(), llvm::TargetLoweringBase::getDefaultSafeStackPointerLocation(), getFirstNonAllocaInTheEntryBlock(), llvm::ExecutionEngine::getGlobalValueAtAddress(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::TargetLoweringBase::getIRStackGuard(), llvm::SCEVExpander::getIVIncOperand(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getNaturalGEPWithOffset(), getNumBytes(), GetPointerOperand(), GetRMWLibcall(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getScalarTy(), getSignature(), hasLifetimeMarkers(), hasSameExtUse(), INITIALIZE_PASS(), insertCall(), insertLifetimeMarkersSurroundingCall(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), llvm::TargetLoweringBase::insertSSPDeclarations(), instrumentOneFunc(), llvm::isAllocaPromotable(), llvm::DenseMapInfo< VTableSlot >::isEqual(), llvm::isFreeCall(), IsSmallObject(), llvm::SITargetLowering::LowerCall(), llvm::TargetLowering::LowerToTLSEmulatedModel(), LowerToTLSExecModel(), needsRuntimeRegistrationOfSectionRange(), llvm::EscapeEnumerator::Next(), prepareForSplit(), llvm::coro::replaceCoroFree(), llvm::LoopDataPrefetchPass::run(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::SanitizerStatReport::SanitizerStatReport(), SegmentOffset(), setCoroInfo(), llvm::CoroIdInst::setCoroutineSelf(), setUsedInitializer(), shouldFixMainFunction(), shouldKeepInEntry(), SimplifyRelativeLoad(), unifyBitWidth(), updateOperand(), UseTlsOffset(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().

◆ getInt8Ty()

IntegerType * Type::getInt8Ty ( LLVMContext C)
static

◆ getIntegerBitWidth()

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

◆ getIntNPtrTy()

PointerType * Type::getIntNPtrTy ( LLVMContext C,
unsigned  N,
unsigned  AS = 0 
)
static

Definition at line 212 of file Type.cpp.

References getIntNTy(), and getPointerTo().

Referenced by getScalarTy().

◆ getIntNTy()

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

◆ getLabelTy()

Type * Type::getLabelTy ( LLVMContext C)
static

◆ getMetadataTy()

Type * Type::getMetadataTy ( LLVMContext C)
static

◆ getNumContainedTypes()

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

◆ getPointerAddressSpace()

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

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

Definition at line 503 of file DerivedTypes.h.

References getScalarType().

Referenced by llvm::AMDGPUAAResult::alias(), areStridedAccessesIndependent(), atomicSizeSupported(), BuildConstantFromSCEV(), canTransformToMemCmp(), castRequiresQueuePtr(), llvm::castToCStr(), cloneConstantExprWithNewAddressSpace(), llvm::orc::cloneGlobalAliasDecl(), cloneInstructionWithNewAddressSpace(), combineLoadToNewType(), llvm::ConstantFoldCastOperand(), llvm::createAMDGPUFunctionInliningPass(), llvm::createHWAddressSanitizerPass(), createMaskInstrs(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::createSeparateConstOffsetFromGEPPass(), despeculateCountZeros(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), expandBounds(), foldICmpWithMinMax(), forceRenaming(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), getAdjustedPtr(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::CastInst::getCastOpcode(), getChainID(), llvm::AddrSpaceCastInst::getDestAddressSpace(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::VNCoercion::getLoadValueForLoad(), getMemCmpLoad(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getMemSetPatternValue(), getNumBytes(), llvm::Module::getOrInsertGlobal(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), getPointerElementType(), GetPointerOperand(), getPointerOperands(), llvm::AddrSpaceCastInst::getSrcAddressSpace(), getSuccPad(), llvm::DataLayout::getTypeSizeInBits(), llvm::SelectionDAGBuilder::getValueImpl(), GlobalWasGeneratedByCompiler(), handleMemIntrinsicPtrUse(), hasLifetimeMarkers(), hasOnlySelectUsers(), hasSameExtUse(), hasUndefContents(), INITIALIZE_PASS(), isCompatibleIVType(), llvm::CastInst::isEliminableCastPair(), isGEPFoldable(), IsNonLocalValue(), isNoWrap(), isPromotedInstructionLegal(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileCOFF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), llvm::SelectionDAGBuilder::LowerStatepoint(), llvm::MachinePointerInfo::MachinePointerInfo(), maybePrintCallAddrSpace(), moveUp(), optimizeOnceStoredGlobal(), PerformHeapAllocSRoA(), performMaskedAtomicOp(), llvm::AMDGPUAAResult::pointsToConstantMemory(), llvm::LoopDataPrefetchPass::run(), shouldInstrumentReadWriteFromAddress(), simplifyAllocaArraySize(), simplifyInvariantGroupIntrinsic(), llvm::sortPtrAccesses(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::AMDGPULibCalls::useNative(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ getPointerElementType()

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

Definition at line 376 of file Type.h.

References assert(), C, getDoubleTy(), getFloatTy(), getFP128Ty(), getHalfTy(), getInt128Ty(), getInt16Ty(), getInt1Ty(), getInt32Ty(), getInt64Ty(), getInt8Ty(), getIntNTy(), getLabelTy(), getMetadataTy(), getPointerAddressSpace(), getPPC_FP128Ty(), getPrimitiveType(), getTokenTy(), getTypeID(), getVoidTy(), getX86_FP80Ty(), getX86_MMXTy(), and PointerTyID.

Referenced by areStridedAccessesIndependent(), llvm::Evaluator::castCallResultIfNeeded(), cloneConstantExprWithNewAddressSpace(), cloneInstructionWithNewAddressSpace(), combineLoadToNewType(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::IRBuilder< TargetFolder >::CreateAlignedLoad(), llvm::IRBuilder< TargetFolder >::CreateCall(), llvm::IRBuilder< TargetFolder >::CreateLoad(), llvm::AsmPrinter::emitGlobalGOTEquivs(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::SCEVExpander::expandCodeFor(), findInitTrampoline(), getAdjustedPtr(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), getInitializer(), GetPointerOperand(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getUserCost(), INITIALIZE_PASS(), llvm::RuntimePointerChecking::insert(), isAligned(), isCallPromotable(), llvm::isDereferenceableAndAlignedPointer(), llvm::CastInst::isEliminableCastPair(), llvm::InductionDescriptor::isInductionPHI(), llvm::isSafeToLoadUnconditionally(), operandWithNewAddressSpaceOrCreateUndef(), propagateMetadata(), removeBitcastsFromLoadStoreOnMinMax(), simplifyAllocaArraySize(), StackMallocSizeClass(), and TypeSizeToSizeIndex().

◆ getPointerTo()

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

Return a pointer to the current type.

This is equivalent to PointerType::get(Foo, AddrSpace).

Definition at line 652 of file Type.cpp.

References llvm::PointerType::get().

Referenced by buildFrameType(), canTransformToMemCmp(), cloneConstantExprWithNewAddressSpace(), cloneInstructionWithNewAddressSpace(), combineLoadToNewType(), combineStoreToNewValue(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), createGlobalFwdRef(), CreateLoadIns(), createOrdering(), llvm::createThreadSanitizerLegacyPassPass(), ExpandBVWithShuffles(), findUnwindDestinations(), llvm::ConstantExpr::getAlignOf(), getDoublePtrTy(), getExpandedMinMaxOps(), getFloatPtrTy(), getFP128PtrTy(), llvm::ConstantExpr::getGetElementPtr(), getHalfPtrTy(), getInt16PtrTy(), getInt1PtrTy(), getInt32PtrTy(), getInt64PtrTy(), getInt8PtrTy(), getIntNPtrTy(), getIntrinsicParamType(), getPPC_FP128PtrTy(), llvm::TargetLoweringBase::getSafeStackPointerLocation(), getScalarTy(), getTypePartition(), getX86_FP80PtrTy(), getX86_MMXPtrTy(), INITIALIZE_PASS(), insertSpills(), inversePermutation(), LowerADDSUBCARRY(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), lowerLoadRelative(), lowerSubFn(), llvm::coro::LowererBase::makeSubFnCall(), operandWithNewAddressSpaceOrCreateUndef(), patchAndReplaceAllUsesWith(), reportLoadElim(), RetagMask(), scalarizeMaskedLoad(), scalarizeMaskedStore(), shouldKeepInEntry(), SimplifyRelativeLoad(), splitMergedValStore(), tryPromoteAllocaToVector(), tryToElideArgumentCopy(), TypeSizeToSizeIndex(), useSinCos(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), and llvm::sroa::AllocaSliceRewriter::visit().

◆ getPPC_FP128PtrTy()

PointerType * Type::getPPC_FP128PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 204 of file Type.cpp.

References getPointerTo(), and getPPC_FP128Ty().

Referenced by getScalarTy().

◆ getPPC_FP128Ty()

Type * Type::getPPC_FP128Ty ( LLVMContext C)
static

◆ getPrimitiveSizeInBits()

unsigned 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.

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 115 of file Type.cpp.

References DoubleTyID, FloatTyID, FP128TyID, getBitWidth(), getTypeID(), HalfTyID, IntegerTyID, PPC_FP128TyID, VectorTyID, X86_FP80TyID, and X86_MMXTyID.

Referenced by llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), llvm::CastInst::castIsValid(), collectInsertionElements(), computeUnsignedMinMaxValuesFromKnownBits(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::DecodePSHUFBMask(), llvm::DecodeVPERMIL2PMask(), llvm::DecodeVPERMILPMask(), llvm::DecodeVPERMV3Mask(), llvm::DecodeVPERMVMask(), llvm::DecodeVPPERMMask(), despeculateCountZeros(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), llvm::RISCVTargetLowering::emitTrailingFence(), evaluateGEPOffsetExpression(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), llvm::extractConstantMask(), foldBitcastExtElt(), foldICmpWithMinMax(), foldVecTruncToExtElt(), FunctionNumber(), llvm::Constant::getAllOnesValue(), GetAnyNonZeroConstInt(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::VectorType::getExtendedElementVectorType(), llvm::VectorType::getInteger(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), getIntrinsicForMaskedAtomicRMWBinOp32(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), getLoopOperandSizeInBytes(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), getNarrowIntrinsic(), getNoopInput(), getOpenCLAlignment(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), llvm::NVPTXTargetLowering::getPrototype(), getScalarSizeInBits(), llvm::X86TTIImpl::getShuffleCost(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), getTargetConstantBitsFromNode(), llvm::VectorType::getTruncatedElementVectorType(), getTypeSizeIndex(), llvm::X86TTIImpl::getUserCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), hasAnyNonFlatUseOfReg(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), llvm::X86TTIImpl::isLegalMaskedGather(), llvm::X86TTIImpl::isLegalMaskedLoad(), isMultipleOfTypeSize(), isObjectSize(), isSized(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::X86TargetLowering::isVectorShiftByScalarCheap(), llvm::AArch64TargetLowering::isZExtFree(), LinearizeExprTree(), LowerCTLZ(), LowerCTPOP(), LowerRotate(), mapBinOpcode(), optimizeVectorResize(), false::LibCallsShrinkWrap::perform(), performMaskedAtomicOp(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::replaceAllDbgUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), scalarConstantToHexString(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::HexagonTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::SparcTargetLowering::shouldExpandAtomicRMWInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicStoreInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicStoreInIR(), llvm::ARMTargetLowering::shouldExpandAtomicStoreInIR(), shouldInstrumentBlock(), SimplifyICmpInst(), simplifyX86movmsk(), simplifyX86pack(), SwitchToLookupTable(), transformToIndexedCompare(), TypeSizeToSizeIndex(), upgradeAVX512MaskToSelect(), UpgradeX86VPERMT2Intrinsics(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitGetElementPtrInst(), VisitGlobalVariableForEmission(), llvm::InstCombiner::visitPHINode(), and llvm::InstCombiner::visitTrunc().

◆ getPrimitiveType()

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

◆ getScalarSizeInBits()

unsigned Type::getScalarSizeInBits ( ) const

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

Otherwise return the getPrimitiveSizeInBits value for this type.

Definition at line 130 of file Type.cpp.

References getPrimitiveSizeInBits(), and getScalarType().

Referenced by areInverseVectorBitmasks(), canEvaluateSExtd(), canEvaluateShiftedShift(), canEvaluateTruncated(), canEvaluateZExtd(), canNarrowShiftAmt(), canonicalizeSaturatedSubtract(), llvm::CastInst::castIsValid(), checkForNegativeOperand(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedMul(), llvm::computeOverflowForUnsignedMul(), llvm::ConstantFoldCastOperand(), llvm::ConstantFoldGetElementPtr(), llvm::convertPointerToIntegerType(), createAndInstr(), llvm::CastInst::CreateFPCast(), llvm::CastInst::CreateIntegerCast(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilder< TargetFolder >::CreateSExtOrTrunc(), llvm::CastInst::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilder< TargetFolder >::CreateZExtOrTrunc(), llvm::decomposeBitTestICmp(), llvm::NVPTXAsmPrinter::doFinalization(), EqualTypeSize(), llvm::extractConstantMask(), foldAnyOrAllBitsSet(), foldBitcastExtElt(), foldGuardedRotateToFunnelShift(), foldICmpWithTruncSignExtendedVal(), llvm::InstCombiner::FoldItoFPtoI(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldShiftByConstant(), foldShiftedShift(), foldSignedTruncationCheck(), foldVecTruncToExtElt(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), getBitWidth(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), getElSizeLog2Diff(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPTrunc(), llvm::ConstantExpr::getIntegerCast(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::GCNTTIImpl::getLoadVectorFactor(), llvm::SystemZTTIImpl::getMemoryOpCost(), getMulHu(), llvm::TargetTransformInfoImplBase::getOperationCost(), getParentPad(), llvm::AArch64TTIImpl::getPopcntSupport(), getRelevantOperands(), getScalarSizeInBits(), getSelectFoldableConstant(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), getSuccPad(), getTargetConstantBitsFromNode(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), llvm::getWiderType(), llvm::ConstantExpr::getZExt(), llvm::ConstantExpr::getZExtOrBitCast(), GreaterThanTypeSize(), llvm::RuntimePointerChecking::insert(), llvm::CastInst::isEliminableCastPair(), llvm::SystemZTTIImpl::isFoldableLoad(), isKnownToBeAPowerOfTwo(), llvm::CastInst::isNoopCast(), isSized(), llvm::AMDGPUTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isVectorShiftByScalarCheap(), llvm::AMDGPUTargetLowering::isZExtFree(), LessOrEqualTypeSize(), LessThanTypeSize(), llvm::log2(), LowerBSWAP(), matchRotate(), mayUsePostIncMode(), llvm::TargetTransformInfoImplBase::minRequiredElementSize(), processUGT_ADDCST_ADD(), propagateMetadata(), llvm::DemandedBitsWrapperPass::releaseMemory(), llvm::InstCombiner::replacedSelectWithOperand(), shouldInstrumentBlock(), ShrinkDemandedConstant(), SimplifyAndInst(), SimplifyAShrInst(), SimplifyLShrInst(), simplifyX86pack(), TypeSizeToSizeIndex(), upgradeAVX512MaskToSelect(), UpgradeX86VPERMT2Intrinsics(), llvm::AArch64TTIImpl::useReductionIntrinsic(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitPtrToInt(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitXor(), llvm::InstCombiner::visitZExt(), X86ChooseCmpImmediateOpcode(), and llvm::reassociate::XorOpnd::XorOpnd().

◆ getScalarTy()

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

◆ getScalarType()

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

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

Definition at line 304 of file Type.h.

References getVectorElementType(), and isVectorTy().

Referenced by asmClobbersCTR(), buildNew(), llvm::InnerLoopVectorizer::buildScalarSteps(), canConvertValue(), canonicalizeSaturatedSubtract(), llvm::CastInst::castIsValid(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), concatenateTwoVectors(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadFromConstPtr(), llvm::GetElementPtrInst::Create(), llvm::createHWAddressSanitizerPass(), evaluateInDifferentElementOrder(), llvm::InnerLoopVectorizer::fixReduction(), foldBitcastExtElt(), FunctionNumber(), llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), getChainID(), getCmpOpsType(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), llvm::DemandedBits::getDemandedBits(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getGEPCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::ConstantFP::getInfinity(), llvm::Constant::getIntegerValue(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), getLogBase2(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::ConstantFP::getNaN(), llvm::ConstantFP::getNegativeZero(), getParameterABIAttributes(), getParentPad(), getPointerAddressSpace(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantFP::getQNaN(), getScalarIntrinsicDeclaration(), getScalarSizeInBits(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), llvm::ConstantFP::getSNaN(), llvm::InnerLoopVectorizer::getStepVector(), getSuccPad(), llvm::X86TTIImpl::getUserCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getVectorInstrCost(), GlobalWasGeneratedByCompiler(), hasOnlySelectUsers(), hasSameExtUse(), llvm::haveNoCommonBitsSet(), llvm::CastInst::isEliminableCastPair(), isFPOrFPVectorTy(), isIntOrIntVectorTy(), isKnownNonZero(), llvm::X86TTIImpl::isLegalMaskedGather(), llvm::X86TTIImpl::isLegalMaskedLoad(), isPtrOrPtrVectorTy(), llvm::Instruction::isSameOperationAs(), isStrideMul(), LinearizeExprTree(), LLVMBuildGEP(), LLVMBuildInBoundsGEP(), LLVMBuildStructGEP(), LLVMConstGEP(), LLVMConstInBoundsGEP(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(), lowerStatepointMetaArgs(), propagateMetadata(), llvm::InstCombiner::replacedSelectWithOperand(), shouldInstrumentReadWriteFromAddress(), shouldKeepFDivF32(), shouldMergeGEPs(), shrinkInsertElt(), simplifyX86pack(), TypeSizeToSizeIndex(), upgradeX86ConcatShift(), upgradeX86Rotate(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAddrSpaceCast(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ getSequentialElementType()

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

◆ getStructElementType()

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

◆ getStructName()

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

Definition at line 325 of file DerivedTypes.h.

References getName().

Referenced by getNumContainedTypes(), and false::operator<<().

◆ getStructNumElements()

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

◆ getSubclassData()

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

◆ getTokenTy()

Type * 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 138 of file Type.h.

Referenced by canLosslesslyBitCastTo(), llvm::IntegerType::classof(), llvm::FunctionType::classof(), llvm::CompositeType::classof(), llvm::StructType::classof(), llvm::SequentialType::classof(), llvm::ArrayType::classof(), llvm::VectorType::classof(), llvm::PointerType::classof(), llvm::FunctionComparator::cmpTypes(), ConvertDoubleToBytes(), llvm::createEfficiencySanitizerPass(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::isa_impl< PointerType, Type >::doit(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), EnsureFPIntrinsicsExist(), executeFAddInst(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFDivInst(), executeFMulInst(), executeFRemInst(), executeFSubInst(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), getArrayElementType(), getAttrKindEncoding(), llvm::ExecutionEngine::getConstantValue(), llvm::EVT::getEVT(), getFltSemantics(), llvm::ConstantExpr::getFPExtend(), getFPMantissaWidth(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::DataLayout::getIndexTypeSizeInBits(), getMangledTypeStr(), llvm::Constant::getNullValue(), getOpenCLAlignment(), getPointerElementType(), getPrimitiveSizeInBits(), llvm::NVPTXTargetLowering::getPrototype(), getSequentialElementType(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getTrunc(), getTypeID(), llvm::DataLayout::getTypeSizeInBits(), llvm::ConstantExpr::getUIToFP(), llvm::getUnaryFloatFn(), getVectorElementType(), llvm::MVT::getVT(), llvm::ConstantExpr::getZExt(), llvm::hasUnaryFloatFn(), isAggregateType(), isArrayTy(), isDoubleTy(), isFirstClassType(), isFloatingPointTy(), isFloatTy(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIntegerTy(), isLabelTy(), isLeakCheckerRoot(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isMetadataTy(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), isTokenTy(), llvm::ConstantFP::isValueValidForType(), isVectorTy(), isVoidTy(), isX86_FP80Ty(), isX86_MMXTy(), llvm::ExecutionEngine::LoadValueFromMemory(), lookupFunction(), needsFPFromSig(), needsFPStubFromParams(), PrintLLVMName(), ReplaceFPIntrinsicWithCall(), llvm::MCJIT::runFunction(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::HexagonTargetObjectFile::shouldPutJumpTableInFunctionSection(), llvm::ExecutionEngine::StoreValueToMemory(), llvm::Interpreter::visitAShr(), llvm::Interpreter::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), VisitGlobalVariableForEmission(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::Interpreter::visitShuffleVectorInst(), llvm::Interpreter::visitVAArgInst(), whichFPParamVariantNeeded(), and whichFPReturnVariant().

◆ getVectorElementType()

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

Definition at line 371 of file Type.h.

References assert(), getTypeID(), and VectorTyID.

Referenced by llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::IRBuilderBase::CreateFAddReduce(), llvm::IRBuilderBase::CreateFMulReduce(), llvm::createSimpleTargetReduction(), DecodeFixedType(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::extractConstantMask(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticReductionCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::ConstantExpr::getInsertElement(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX2(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), getMangledTypeStr(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMinMaxReductionCost(), getReductionIntrinsic(), llvm::getSafeVectorConstantForBinop(), getScalarType(), llvm::X86TTIImpl::getShuffleCost(), llvm::ConstantExpr::getShuffleVector(), llvm::X86TTIImpl::getUserCost(), llvm::ARMTTIImpl::getVectorInstrCost(), group2Shuffle(), largestIntegerVectorType(), llvm::HexagonTargetLowering::LowerConstantPool(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::Intrinsic::matchIntrinsicType(), scalarizeMaskedScatter(), ShrinkDemandedConstant(), SimplifyExtractElementInst(), smallestIntegerVectorType(), TypeSizeToSizeIndex(), llvm::InstCombiner::visitGetElementPtrInst(), and WriteConstantInternal().

◆ getVectorNumElements()

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

Definition at line 462 of file DerivedTypes.h.

Referenced by ApplyX86MaskOn1BitsVec(), areInverseVectorBitmasks(), BitCastConstantVector(), canEvaluateShuffled(), canNarrowShiftAmt(), canonicalizeCmpWithConstant(), canonicalizeSaturatedSubtract(), llvm::ShuffleVectorInst::changesLength(), collectShuffleElements(), collectSingleShuffleElements(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldLoadThroughBitcast(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::CastInst::CreatePointerCast(), EmitX86Select(), llvm::extractConstantMask(), llvm::findScalarElement(), foldBitcastExtElt(), foldBitCastSelect(), foldConstantInsEltIntoShuffle(), foldICmpShlOne(), foldIdentityExtractShuffle(), foldIdentityShuffles(), foldShuffleWithInsert(), FunctionNumber(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticReductionCost(), getArrayElementType(), llvm::SystemZTTIImpl::getBoolVecToIntConversionCost(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::SystemZTTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX2(), llvm::X86TTIImpl::getInterleavedMemoryOpCostAVX512(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::ConstantExpr::getIntToPtr(), getLogBase2(), getMangledTypeStr(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMinMaxReductionCost(), llvm::ConstantDataSequential::getNumElements(), getNumVectorRegs(), getOffsetFromIndices(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getOperandsScalarizationOverhead(), llvm::getOrderedReduction(), getParameterABIAttributes(), getParentPad(), llvm::AArch64TTIImpl::getPopcntSupport(), llvm::ConstantExpr::getPtrToInt(), llvm::getSafeVectorConstantForBinop(), getScalarIntrinsicDeclaration(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getScalarizationOverhead(), getSelectFoldableConstant(), llvm::X86TTIImpl::getShuffleCost(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::getShuffleReduction(), llvm::ConstantExpr::getShuffleVector(), llvm::InnerLoopVectorizer::getStepVector(), getSuccPad(), llvm::X86TTIImpl::getUserCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), group2Shuffle(), llvm::ShuffleVectorInst::increasesLength(), llvm::ShuffleVectorInst::isConcat(), isConstantIntVector(), llvm::ShuffleVectorInst::isExtractSubvectorMask(), llvm::IsFreeToInvert(), llvm::ShuffleVectorInst::isIdentityWithExtract(), llvm::ShuffleVectorInst::isIdentityWithPadding(), llvm::isKnownNeverNaN(), llvm::X86TTIImpl::isLegalMaskedGather(), llvm::X86TTIImpl::isLegalMaskedLoad(), llvm::Constant::isNotMinSignedValue(), isReInterleaveMask(), isShuffleEquivalentToSelect(), isShuffleExtractingFromLHS(), isUndefShift(), isVectorReductionOp(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::X86TargetLowering::lowerInterleavedStore(), llvm::Intrinsic::matchIntrinsicType(), matchPairwiseReduction(), matchPairwiseShuffleMask(), matchVectorSplittingReduction(), narrowVectorSelect(), processUGT_ADDCST_ADD(), replaceExtractElements(), scalarConstantToHexString(), scalarizeMaskedScatter(), shouldMergeGEPs(), ShrinkDemandedConstant(), shrinkFPConstantVector(), simplifyDivRem(), SimplifyExtractElementInst(), SimplifyShuffleVectorInst(), simplifyX86movmsk(), simplifyX86pack(), simplifyX86round(), simplifyX86vpermilvar(), stripAndComputeConstantOffsets(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), TypeSizeToSizeIndex(), upgradeMaskedCompare(), UpgradeMaskedLoad(), UpgradeMaskedStore(), UpgradeMaskToInt(), UpgradeX86ALIGNIntrinsics(), upgradeX86ConcatShift(), UpgradeX86PSLLDQIntrinsics(), UpgradeX86PSRLDQIntrinsics(), upgradeX86Rotate(), llvm::AArch64TTIImpl::useReductionIntrinsic(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitPtrToInt(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::InstCombiner::visitSRem(), and WriteConstantInternal().

◆ getVoidTy()

Type * Type::getVoidTy ( LLVMContext C)
static

Definition at line 161 of file Type.cpp.

References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::VoidTy.

Referenced by llvm::IntrinsicLowering::AddPrototypes(), addStackMapLiveVars(), buildFrameType(), createCallInst(), createDevirtTriggerFunc(), createDummyFunction(), llvm::createDwarfEHPass(), llvm::createEfficiencySanitizerPass(), createEmptyFunction(), createFree(), CreatePrologue(), llvm::createSanitizerCtorAndInitFunctions(), llvm::createX86RetpolineThunksPass(), llvm::declareSanitizerInitFunction(), DecodeFixedType(), EmitInlineAsm(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::AArch64SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::CodeExtractor::findInputsOutputs(), llvm::SanitizerStatReport::finish(), fixupFPReturnAndCall(), forEachUser(), llvm::SelectionDAG::getAtomicMemcpy(), llvm::SelectionDAG::getAtomicMemmove(), llvm::SelectionDAG::getAtomicMemset(), llvm::InvokeInst::getLandingPadInst(), llvm::getOrCreateInitFunction(), llvm::getOrCreateSanitizerCtorAndInitFunctions(), getOrInsertValueProfilingCall(), getPointerElementType(), getPrimitiveType(), getRetComponentType(), GetRMWLibcall(), llvm::EVT::getTypeForEVT(), getUnderlyingObjects(), llvm::IRBuilderBase::getVoidTy(), INITIALIZE_PASS(), insertCall(), InsertSafepointPoll(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), insertUseHolderAfter(), instrumentMaskedLoadOrStore(), isCalleeLoad(), llvm::CmpInst::isImpliedFalseByMatchingCmp(), isWordAligned(), LLVMVoidTypeInContext(), LowerADDSUBCARRY(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundleImpl(), llvm::TargetLowering::LowerCallTo(), llvm::SparcTargetLowering::LowerF128Op(), llvm::IntrinsicLowering::LowerIntrinsicCall(), makeStatepointExplicitImpl(), MarkBlocksLiveIn(), mayLoopAccessLocation(), needsRuntimeRegistrationOfSectionRange(), readWideAPInt(), llvm::SwitchInst::removeCase(), llvm::WholeProgramDevirtPass::run(), selectJumpTableArmEncoding(), llvm::FastISel::selectStackmap(), shouldKeepInEntry(), llvm::UnreachableInst::UnreachableInst(), useSinCos(), and llvm::Interpreter::visitReturnInst().

◆ getX86_FP80PtrTy()

PointerType * Type::getX86_FP80PtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 196 of file Type.cpp.

References getPointerTo(), and getX86_FP80Ty().

Referenced by getScalarTy().

◆ getX86_FP80Ty()

Type * Type::getX86_FP80Ty ( LLVMContext C)
static

◆ getX86_MMXPtrTy()

PointerType * Type::getX86_MMXPtrTy ( LLVMContext C,
unsigned  AS = 0 
)
static

Definition at line 208 of file Type.cpp.

References getPointerTo(), and getX86_MMXTy().

Referenced by getScalarTy().

◆ getX86_MMXTy()

Type * Type::getX86_MMXTy ( LLVMContext C)
static

◆ isAggregateType()

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

◆ isArrayTy()

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

◆ isDoubleTy()

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

◆ isEmptyTy()

bool Type::isEmptyTy ( ) const

◆ isFirstClassType()

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

◆ isFloatingPointTy()

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

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

Definition at line 162 of file Type.h.

References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, PPC_FP128TyID, and X86_FP80TyID.

Referenced by llvm::LoopVectorizationPlanner::collectTriviallyDeadInstructions(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), llvm::NVPTXAsmPrinter::doFinalization(), FoldBitCast(), foldBitcastExtElt(), FunctionNumber(), llvm::Constant::getAllOnesValue(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::ExecutionEngine::getConstantValue(), getEstimate(), getFPMantissaWidth(), llvm::TargetTransformInfoImplCRTPBase< AMDGPUTTIImpl >::getInstructionLatency(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::MipsCCState::getSpecialCallingConvForCallee(), llvm::InnerLoopVectorizer::getStepVector(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::CastInst::isCastable(), isContiguous(), llvm::CastInst::isEliminableCastPair(), llvm::InductionDescriptor::isFPInductionPHI(), isFPOrFPVectorTy(), llvm::InductionDescriptor::isInductionPHI(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), isSingleValueType(), isSized(), isSupportedAtomicType(), llvm::LoopVectorizationLegality::isUniform(), llvm::VectorType::isValidElementType(), llvm::NVPTXTargetLowering::LowerCall(), llvm::fuzzerop::makeConstantsWithType(), supportedAddressingMode(), TryToShrinkGlobalToBoolean(), llvm::Interpreter::visitAShr(), and VisitGlobalVariableForEmission().

◆ isFloatTy()

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

◆ 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

Definition at line 149 of file DerivedTypes.h.

Referenced by getNumContainedTypes().

◆ isHalfTy()

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

◆ isIntegerTy() [1/2]

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

True if this is an instance of IntegerType.

Definition at line 197 of file Type.h.

References getTypeID(), and IntegerTyID.

Referenced by llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), llvm::VNCoercion::analyzeLoadFromClobberingLoad(), buildMultiplyTree(), llvm::InnerLoopVectorizer::buildScalarSteps(), canConvertValue(), canTransformToMemCmp(), CC_MipsO32_FP64(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), combineLoadToOperationType(), llvm::InstCombiner::commonCastTransforms(), llvm::computeMinimumValueSizes(), llvm::ComputeMultiple(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), ComputePTXValueVTs(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::CastInst::CreateBitOrPointerCast(), createCast(), CreateLoadIns(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::X86TargetLowering::ExpandInlineAsm(), ExtractConstantBytes(), llvm::extractConstantMask(), llvm::InnerLoopVectorizer::fixupIVUsers(), FoldBitCast(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), foldICmpShlOne(), FoldTwoEntryPHINode(), forEachUser(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), FunctionNumber(), getAdjustedPtr(), getAISize(), getAllocationDataForFunction(), getBinOpsForFactorization(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), getCompareCC(), getComparePred(), llvm::getConstantDataArrayInfo(), llvm::LazyValueInfo::getConstantRange(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), llvm::ConstantExpr::getExtractElement(), getFromRangeMetadata(), llvm::DataLayout::getIndexedOffsetInType(), llvm::ConstantExpr::getInsertElement(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::LanaiTTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), getLoadStoreAddrMode(), llvm::VNCoercion::getLoadValueForLoad(), getMaskedTypeForICmpPair(), llvm::AArch64TTIImpl::getMemoryOpCost(), getMulHu(), getNaturalGEPWithOffset(), getNegativeIsTrueBoolVec(), getOpenCLAlignment(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), GetPointerOperand(), llvm::NVPTXTargetLowering::getPrototype(), getSignedIntOrFpConstant(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::InnerLoopVectorizer::getStepVector(), getSuccPad(), getTrueOrFalseValue(), getTypePartition(), getUnderlyingObjectFromInt(), getValueFromICmpCondition(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::hasIterationCountInvariantInParent(), llvm::HexagonEvaluator::HexagonEvaluator(), INITIALIZE_PASS(), isAtomic(), llvm::isBytewiseValue(), llvm::CastInst::isCastable(), isContiguous(), llvm::CastInst::isEliminableCastPair(), isFuncOrArgAttr(), llvm::isGEPBasedOnPointerToString(), llvm::isImpliedCondition(), llvm::InductionDescriptor::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerLoopHeaderPHI(), isIntegerTy(), isIntExtFree(), isIntOrIntVectorTy(), isIntOrPtrTy(), isObjectSize(), isOnlyReachableViaThisEdge(), isPromotedInstructionLegal(), isReportingError(), isSafeAndProfitableToSinkLoad(), isSingleValueType(), isSupportedType(), llvm::RISCVTargetLowering::isTruncateFree(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::ARMTargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::NVPTXTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::LoopVectorizationLegality::isUniform(), llvm::VectorType::isValidElementType(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ConstantInt::isValueValidForType(), isVectorPromotionViable(), isVectorPromotionViableForSlice(), llvm::MSP430TargetLowering::isZExtFree(), llvm::AArch64TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), llvm::log2(), llvm::NVPTXTargetLowering::LowerCall(), llvm::HexagonTargetLowering::LowerConstantPool(), LowerCTPOP(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::IntrinsicLowering::LowerToByteSwap(), makeBitReverse(), llvm::Intrinsic::matchIntrinsicType(), memVTFromAggregate(), originalTypeIsF128(), readWideAPInt(), llvm::replaceAllDbgUsesWith(), replaceAllUsesOfWithIn(), llvm::SCEVExpander::replaceCongruentIVs(), ReplaceUsesOfWith(), llvm::MCJIT::runFunction(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), shouldInstrumentBlock(), shouldKeepInEntry(), simplifyAllocaArraySize(), AllocaSlices::SliceBuilder::SliceBuilder(), SolveQuadraticAddRecRange(), splitMergedValStore(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), llvm::AttributeFuncs::typeIncompatible(), TypeSizeToSizeIndex(), UnpackFromArgumentSlot(), llvm::UnrollRuntimeLoopRemainder(), updatePredecessorProfileMetadata(), UpgradeX86IntrinsicsWith8BitMask(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitCallInst(), VisitGlobalVariableForEmission(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitTrunc(), llvm::InnerLoopVectorizer::widenIntOrFpInduction(), and X86ChooseCmpImmediateOpcode().

◆ isIntegerTy() [2/2]

bool Type::isIntegerTy ( unsigned  Bitwidth) const

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

Definition at line 57 of file Type.cpp.

References getBitWidth(), and isIntegerTy().

◆ 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 203 of file Type.h.

References getScalarType(), and isIntegerTy().

Referenced by areInverseVectorBitmasks(), buildMultiplyTree(), canonicalizeICmpBool(), canonicalizeSaturatedSubtract(), llvm::CastInst::castIsValid(), clearAssumptionsOfUsers(), llvm::InstCombiner::commonIDivTransforms(), computeKnownBits(), llvm::ConstantFoldGetElementPtr(), convertValue(), CreateAdd(), createAndInstr(), llvm::IRBuilder< TargetFolder >::CreateBitOrPointerCast(), llvm::CastInst::CreateIntegerCast(), CreateMul(), CreateNeg(), llvm::CastInst::CreatePointerCast(), createRdxShuffleMask(), llvm::IRBuilder< TargetFolder >::CreateSExtOrTrunc(), llvm::IRBuilder< TargetFolder >::CreateZExtOrTrunc(), foldBitCastBitwiseLogic(), foldICmpShlOne(), foldLogicCastConstant(), foldOperationIntoSelectOperand(), foldSelectICmpAndOr(), foldXorToXor(), FunctionNumber(), llvm::ConstantExpr::get(), getDecodedBinaryOpcode(), getDecodedUnaryOpcode(), llvm::ConstantInt::getFalse(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMinMaxReductionCost(), llvm::ConstantExpr::getNeg(), llvm::ConstantExpr::getNot(), getParameterABIAttributes(), getParentPad(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getPtrToInt(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSIToFP(), getSuccPad(), llvm::ConstantInt::getTrue(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getUIToFP(), llvm::SystemZTTIImpl::getVectorInstrCost(), llvm::ConstantExpr::getZExt(), llvm::haveNoCommonBitsSet(), llvm::CompositeType::indexValid(), llvm::CastInst::isEliminableCastPair(), llvm::isImpliedByDomCondition(), llvm::isImpliedCondition(), isKnownNonEqual(), llvm::DemandedBits::isUseDead(), LowerBSWAP(), LowerNegateToMultiply(), llvm::Intrinsic::matchIntrinsicType(), llvm::DemandedBitsWrapperPass::releaseMemory(), llvm::InstCombiner::replacedSelectWithOperand(), llvm::InstCombiner::run(), ShrinkDemandedConstant(), SimplifyAddInst(), simplifyDivRem(), simplifyICmpOfBools(), llvm::SimplifyInstruction(), SimplifyMulInst(), SimplifySRemInst(), SimplifySubInst(), simplifyX86movmsk(), TypeSizeToSizeIndex(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitUDiv(), and llvm::InstCombiner::visitURem().

◆ 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 207 of file Type.h.

References getScalarType(), and isIntegerTy().

◆ isIntOrPtrTy()

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

◆ isLabelTy()

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

◆ isMetadataTy()

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

◆ isPointerTy()

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

True if this is an instance of PointerType.

Definition at line 224 of file Type.h.

References getTypeID(), and PointerTyID.

Referenced by llvm::AliasSetTracker::add(), AddAliasScopeMetadata(), AddAlignmentAssumptions(), addConditions(), llvm::SCEVAAResult::alias(), asmClobbersCTR(), BuildConstantFromSCEV(), canConvertValue(), canFoldIVIncExpr(), cloneInstructionWithNewAddressSpace(), combineLoadToNewType(), CompareValueComplexity(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::convertPointerToIntegerType(), llvm::createAMDGPUFunctionInliningPass(), llvm::CastInst::CreateBitOrPointerCast(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), createCast(), createFree(), despeculateCountZeros(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::emitFGetCUnlocked(), llvm::emitFPutC(), llvm::emitFPutCUnlocked(), llvm::emitFPutS(), llvm::emitFPutSUnlocked(), llvm::emitFReadUnlocked(), llvm::emitFWrite(), llvm::emitFWriteUnlocked(), FindLoopCounter(), FindPredecessorAutoreleaseWithSafePath(), FitWeights(), forEachUser(), FunctionNumber(), genLoopLimit(), getAdjustedPtr(), llvm::CastInst::getCastOpcode(), GetConstantInt(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), getIndexedTypeInternal(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::GlobalsAAResult::getModRefBehavior(), llvm::AAResults::getModRefInfo(), getNaturalGEPRecursively(), getNaturalGEPWithType(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), llvm::TargetTransformInfoImplBase::getOperationCost(), llvm::InnerLoopVectorizer::getOrCreateTripCount(), llvm::getOrEnforceKnownAlignment(), llvm::AMDGPULibFunc::getOrInsertFunction(), getParentPad(), llvm::ScalarEvolution::getPointerBase(), getPointerOperands(), llvm::LazyValueInfo::getPredicateAt(), llvm::getPtrStride(), llvm::LoopVectorizationCostModel::getSmallestAndWidestTypes(), llvm::SelectionDAG::getSrcValue(), llvm::VNCoercion::getStoreValueForLoadHelper(), llvm::GetStringLength(), getSuccPad(), llvm::ScalarEvolution::getTypeSizeInBits(), llvm::GetUnderlyingObject(), llvm::getUnderlyingObjectsForCodeGen(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::SCEVExpander::hoistIVInc(), inferDSOLocal(), INITIALIZE_PASS(), llvm::cflaa::instantiateInterfaceValue(), llvm::MemoryDependenceResults::invalidateCachedPointerInfo(), isCallPromotable(), llvm::CastInst::isCastable(), isCompatibleIVType(), isGEPKnownNonNull(), IsIncrementNUW(), llvm::InductionDescriptor::isInductionPHI(), isInterestingPointer(), isIntOrPtrTy(), isKnownNonNullFromDominatingCondition(), isKnownNonZero(), llvm::CastInst::isLosslessCast(), isMinMaxWithLoads(), IsNonLocalValue(), isNoopBitcast(), isObjectDereferencedInBlock(), isPointerOperand(), isPtrOrPtrVectorTy(), isReportingError(), isReturnNonNull(), isSingleValueType(), isSupportedType(), llvm::LoopVectorizationLegality::isUniform(), llvm::VectorType::isValidElementType(), llvm::SelectionDAGBuilder::LowerAsSTATEPOINT(), llvm::NVPTXTargetLowering::LowerCall(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), mayUsePostIncMode(), MergeAliasResults(), mergeConditionalStoreToAddress(), operator new(), optimizeOnceStoredGlobal(), llvm::PointerMayBeCaptured(), llvm::SwitchInst::removeCase(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), replaceWithConstant(), llvm::WholeProgramDevirtPass::run(), llvm::MCJIT::runFunction(), llvm::orc::OrcMCJITReplacement::runFunction(), setRetNonNull(), shouldInstrumentBlock(), SimplifyBranchOnICmpChain(), SimplifyICmpInst(), llvm::sortPtrAccesses(), llvm::Value::stripAndAccumulateInBoundsConstantOffsets(), swapMayExposeCSEOpportunities(), TryToShrinkGlobalToBoolean(), llvm::AttributeFuncs::typeIncompatible(), TypeSizeToSizeIndex(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::Interpreter::visitAllocaInst(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), llvm::PtrUseVisitor< SliceBuilder >::visitPtr(), and llvm::InnerLoopVectorizer::widenPHIInstruction().

◆ isPPC_FP128Ty()

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

◆ isPtrOrPtrVectorTy()

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

◆ isSequentialType()

static bool llvm::Type::isSequentialType ( TypeID  TyID)
inlinestaticprotected

Definition at line 113 of file Type.h.

References ArrayTyID, dump(), llvm::RISCVFenceField::O, print(), and VectorTyID.

Referenced by getSequentialElementType().

◆ 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 250 of file Type.h.

References isFloatingPointTy(), isIntegerTy(), isPointerTy(), isVectorTy(), and isX86_MMXTy().

Referenced by canConvertValue(), getMemCmpLoad(), getOpenCLAlignment(), llvm::TargetLowering::ParseConstraints(), processInternalGlobal(), AllocaSlices::SliceBuilder::SliceBuilder(), stripAggregateTypeWrapping(), and llvm::sroa::AllocaSliceRewriter::visit().

◆ isSized()

bool llvm::Type::isSized ( SmallPtrSetImpl< Type *> *  Visited = nullptr) const
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 265 of file Type.h.

References ArrayTyID, getFPMantissaWidth(), getPrimitiveSizeInBits(), getScalarSizeInBits(), getTypeID(), IntegerTyID, isFloatingPointTy(), LLVM_READONLY, PointerTyID, StructTyID, VectorTyID, and X86_MMXTyID.

Referenced by areGlobalsPotentiallyEqual(), BrPHIToSelect(), combineLoadToOperationType(), computeArraySize(), computeKnownBitsFromOperator(), computeValueLLTs(), llvm::ConstantFoldLoadFromConstPtr(), llvm::createEfficiencySanitizerPass(), createOrdering(), decomposeSimpleLinearExpr(), findInitTrampoline(), foldOperationIntoPhiValue(), FunctionNumber(), getFPMantissaWidth(), getIndexedTypeInternal(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::getLLTForType(), getMaxPointerSize(), getMemCmpLoad(), getNaturalGEPWithOffset(), getParameterABIAttributes(), llvm::Value::getPointerAlignment(), llvm::Value::getPointerDereferenceableBytes(), llvm::DataLayout::getTypeSizeInBits(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), GlobalWasGeneratedByCompiler(), instrumentMaskedLoadOrStore(), isAligned(), isContiguous(), isDenselyPacked(), llvm::isDereferenceableAndAlignedPointer(), llvm::MipsTargetObjectFile::IsGlobalInSmallSection(), llvm::InductionDescriptor::isInductionPHI(), llvm::SITargetLowering::isLegalAddressingMode(), llvm::HexagonTargetLowering::isLegalAddressingMode(), llvm::AArch64TargetLowering::isLegalAddressingMode(), isMulPowOf2(), isNonEscapingGlobalNoAliasWithLoad(), isObjectDereferencedInBlock(), llvm::StructType::isOpaque(), isSafeToEliminateVarargsCast(), llvm::isSafeToLoadUnconditionally(), IsSmallObject(), isWorthFoldingADDlow(), isZeroLengthArray(), llvm::NVPTXTargetLowering::LowerReturn(), moveUp(), llvm::TargetLowering::ParseConstraints(), performGlobalAddressCombine(), RetagMask(), llvm::AAEvaluator::run(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), SimplifyGEPInst(), llvm::fuzzerop::sizedPtrType(), tryToOptimizeStoreOfMallocToGlobal(), TypeSizeToSizeIndex(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitBitCast(), and llvm::InstCombiner::visitGetElementPtrInst().

◆ isStructTy()

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

◆ 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 230 of file Type.h.

References canLosslesslyBitCastTo(), getTypeID(), isEmptyTy(), and VectorTyID.

Referenced by areInverseVectorBitmasks(), buildMultiplyTree(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canEvaluateShuffled(), canNarrowShiftAmt(), canonicalizeCmpWithConstant(), canonicalizeSaturatedSubtract(), llvm::CastInst::castIsValid(), CC_MipsO32_FP64(), collectShuffleElements(), llvm::LoopVectorizationPlanner::collectTriviallyDeadInstructions(), computeKnownBitsFromOperator(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadThroughBitcast(), convertValue(), llvm::CastInst::CreatePointerCast(), llvm::createSeparateConstOffsetFromGEPPass(), despeculateCountZeros(), evaluateInDifferentElementOrder(), llvm::VPBranchOnMaskRecipe::execute(), executeFCMP_BOOL(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UNO(), executeSelectInst(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::extractConstantMask(), findBaseDefiningValue(), FindLIVLoopCondition(), llvm::findScalarElement(), foldBitCastBitwiseLogic(), foldBitcastExtElt(), foldBitCastSelect(), foldICmpShlOne(), foldSelectICmpAnd(), foldSelectICmpAndOr(), FunctionNumber(), llvm::ConstantAggregateZero::get(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::ARMTargetLowering::getABIAlignmentForCallingConv(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::SystemZTTIImpl::getArithmeticInstrCost(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticReductionCost(), llvm::SystemZTTIImpl::getBoolVecToIntConversionCost(), llvm::SystemZTTIImpl::getCastInstrCost(), llvm::ARMTTIImpl::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::CastInst::getCastOpcode(), getChainID(), getCmpOpsType(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), llvm::HexagonTTIImpl::getCmpSelInstrCost(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), getCompareCC(), getEstimate(), llvm::ConstantExpr::getExtractElement(), llvm::X86TTIImpl::getGatherScatterOpCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getInsertElement(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), getLogBase2(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::HexagonTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMinMaxReductionCost(), getNumVectorRegs(), getOffsetFromIndices(), getOpenCLAlignment(), llvm::InnerLoopVectorizer::getOrCreateVectorValue(), getParameterABIAttributes(), getParentPad(), llvm::GetPointerBaseWithConstantOffset(), GetPointerOperand(), llvm::AArch64TTIImpl::getPopcntSupport(), llvm::NVPTXTargetLowering::getPrototype(), getReducedType(), getRelevantOperands(), llvm::getSafeVectorConstantForBinop(), getScalarIntrinsicDeclaration(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getScalarizationOverhead(), getScalarType(), getSelectFoldableConstant(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::MipsCCState::getSpecialCallingConvForCallee(), llvm::InnerLoopVectorizer::getStepVector(), getSuccPad(), getTargetConstantBitsFromNode(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getTrueOrFalseValue(), getUniformBase(), llvm::PPCTTIImpl::getUserCost(), llvm::X86TTIImpl::getUserCost(), llvm::TargetLoweringBase::getValueType(), llvm::SystemZTTIImpl::getVectorBitmaskConversionCost(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::AArch64TTIImpl::getVectorInstrCost(), llvm::HexagonTTIImpl::getVectorInstrCost(), llvm::ARMTTIImpl::getVectorInstrCost(), getVectorIntrinsicInstrCost(), llvm::SystemZTTIImpl::getVectorTruncCost(), hasOnlySelectUsers(), llvm::CompositeType::indexValid(), llvm::CastInst::isCastable(), isConstantUsingVectorTy(), llvm::CastInst::isEliminableCastPair(), llvm::ShuffleVectorInst::isExtractSubvectorMask(), llvm::IsFreeToInvert(), llvm::ShuffleVectorInst::isIdentityMask(), llvm::isImpliedCondition(), isIndirectBrTarget(), isIntExtFree(), llvm::isKnownNeverNaN(), llvm::PPCTargetLowering::isLegalAddressingMode(), isMulPowOf2(), isPromotedInstructionLegal(), llvm::ShuffleVectorInst::isReverseMask(), llvm::ShuffleVectorInst::isSelectMask(), llvm::ShuffleVectorInst::isSingleSourceMask(), isSingleValueType(), isStrideMul(), llvm::ShuffleVectorInst::isTransposeMask(), isTruePredicate(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), isVectorReductionOp(), llvm::ShuffleVectorInst::isZeroEltSplatMask(), llvm::AArch64TargetLowering::isZExtFree(), llvm::NVPTXTargetLowering::LowerCall(), llvm::HexagonTargetLowering::LowerConstantPool(), llvm::NVPTXTargetLowering::LowerFormalArguments(), matchesOr(), matchPairwiseReductionAtLevel(), memVTFromAggregate(), originalTypeIsVectorFloat(), llvm::InnerLoopVectorizer::packScalarIntoVectorValue(), PickMostRelevantLoop(), processAdd(), processAShr(), processPHI(), processSDiv(), processSelect(), processSRem(), processUDivOrURem(), processUGT_ADDCST_ADD(), propagateMetadata(), llvm::InnerLoopVectorizer::reverseVector(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), shouldConvertImpl(), shouldMergeGEPs(), ShrinkDemandedConstant(), simplifyDivRem(), simplifyX86movmsk(), stripAndComputeConstantOffsets(), supportedAddressingMode(), ThreadCmpOverSelect(), TryToShrinkGlobalToBoolean(), TypeSizeToSizeIndex(), UnpackFromArgumentSlot(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), VisitGlobalVariableForEmission(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitIntToPtr(), llvm::Interpreter::visitLShr(), llvm::InstCombiner::visitPtrToInt(), llvm::Interpreter::visitShl(), llvm::InstCombiner::visitTrunc(), and X86ChooseCmpImmediateOpcode().

◆ isVoidTy()

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

Return true if this is 'void'.

Definition at line 141 of file Type.h.

References getTypeID(), and VoidTyID.

Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), addStackMapLiveVars(), llvm::AllocaInst::AllocaInst(), llvm::LoopVectorizationCostModel::collectInstsToScalarize(), computeValueLLTs(), llvm::ComputeValueVTs(), copyMustTailReturn(), createMalloc(), llvm::VPRecipeBuilder::createReplicateRegion(), createRetPHINode(), llvm::createScalarizerPass(), CreateWrapper(), determinePointerReadAttrs(), emitSignedInt64(), llvm::Interpreter::exitCalled(), ExpandBVWithShuffles(), findInitTrampoline(), llvm::CodeExtractor::findInputsOutputs(), findMatchingInlineAsmOperand(), FunctionNumber(), getComparePred(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), getMetadataTypeOrder(), getOffsetFromIndices(), llvm::InnerLoopVectorizer::getOrCreateVectorValue(), getParentPad(), GetPointerOperand(), getRetComponentType(), getScalarizationOverhead(), getSuccPad(), llvm::DenseMapInfo< SimpleValue >::getTombstoneKey(), llvm::Intrinsic::getType(), getUniformBase(), HoistThenElseCodeToIf(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::isFreeCall(), isOnlyReachableViaThisEdge(), isSupportedType(), isThunkProfitable(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::ARMCallLowering::lowerCall(), lowerCallFromStatepointLoweringInfo(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::SelectionDAGBuilder::LowerStatepoint(), llvm::makeGuardControlFlowExplicit(), makeStatepointExplicitImpl(), llvm::orc::makeStub(), llvm::Intrinsic::matchIntrinsicType(), maybePrintCallAddrSpace(), llvm::InstDeleterIRStrategy::mutate(), NumRetVals(), okayForPHIOfOps(), llvm::InnerLoopVectorizer::packScalarIntoVectorValue(), llvm::TargetLowering::ParseConstraints(), parseOptionalLinkageAux(), patchAndReplaceAllUsesWith(), llvm::promoteCall(), PropagateConstantReturn(), removeLifetimeIntrinsicUsers(), llvm::MCJIT::runFunction(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::runIPSCCP(), runSCCP(), llvm::InnerLoopVectorizer::scalarizeInstruction(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), ToVectorTy(), TypeSizeToSizeIndex(), unifyReturnBlockSet(), unpackF64OnRV32DSoftABI(), llvm::Value::Value(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::InlineAsm::Verify(), llvm::X86CallLowering::X86CallLowering(), and llvm::Function::~Function().

◆ isX86_FP80Ty()

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

◆ isX86_MMXTy()

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

◆ print()

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 4122 of file AsmWriter.cpp.

Referenced by llvm::createEfficiencySanitizerPass(), emitGlobalConstantFP(), getBranchCondString(), hasValueBeenRAUWed(), isSequentialType(), and llvm::operator<<().

◆ setSubclassData()

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

◆ subtype_begin()

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

◆ subtype_end()

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

◆ subtype_rbegin()

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

Definition at line 323 of file Type.h.

References subtype_end().

Referenced by llvm::TypeFinder::clear().

◆ subtype_rend()

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

Definition at line 326 of file Type.h.

References subtype_begin().

Referenced by llvm::TypeFinder::clear().

◆ subtypes()

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

Definition at line 317 of file Type.h.

References llvm::makeArrayRef(), subtype_begin(), and subtype_end().

Referenced by getMetadataTypeOrder().

Friends And Related Function Documentation

◆ LLVMContextImpl

friend class LLVMContextImpl
friend

Definition at line 89 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 111 of file Type.h.

Referenced by llvm::StructType::element_begin(), llvm::StructType::element_end(), llvm::PointerType::get(), llvm::StructType::getElementType(), llvm::IntegerType::getMask(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), llvm::StructType::setBody(), and subtype_begin().

◆ NumContainedTys

unsigned llvm::Type::NumContainedTys = 0
protected

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