LLVM
8.0.1
|
The instances of the Type class are immutable: once they are created, they are never changed. More...
#include "llvm/IR/Type.h"
Public Types | |
enum | TypeID { 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 |
LLVMContext & | getContext () 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 fltSemantics & | getFltSemantics () 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... | |
Type * | getScalarType () 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 |
Type * | getContainedType (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 |
Type * | getFunctionParamType (unsigned i) const |
unsigned | getFunctionNumParams () const |
bool | isFunctionVarArg () const |
StringRef | getStructName () const |
unsigned | getStructNumElements () const |
Type * | getStructElementType (unsigned N) const |
Type * | getSequentialElementType () const |
uint64_t | getArrayNumElements () const |
Type * | getArrayElementType () const |
unsigned | getVectorNumElements () const |
Type * | getVectorElementType () const |
Type * | getPointerElementType () const |
unsigned | getPointerAddressSpace () const |
Get the address space of this pointer or pointer vector type. More... | |
PointerType * | getPointerTo (unsigned AddrSpace=0) const |
Return a pointer to the current type. More... | |
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 *const * | ContainedTys = nullptr |
A pointer to the array of Types contained by this Type. More... | |
Friends | |
class | LLVMContextImpl |
The instances of the Type class are immutable: once they are created, they are never changed.
Also note that only one instance of a particular type is ever created. Thus seeing if two types are equal is a matter of doing a trivial pointer comparison. To enforce that no two equal instances are created, Type instances can only be created via static factory methods in class Type and in derived classes. Once allocated, Types are never free'd.
using llvm::Type::subtype_iterator = Type * const * |
using llvm::Type::subtype_reverse_iterator = std::reverse_iterator<subtype_iterator> |
enum llvm::Type::TypeID |
Definitions of all of the base types for the Type system.
Based on this value, you can cast to a class defined in DerivedTypes.h. Note: If you add an element to this, you need to add an element to the Type::getPrimitiveType function, or else things will break! Also update LLVMTypeKind and LLVMGetTypeKind () in the C binding.
Enumerator | |
---|---|
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 |
|
inlineexplicitprotected |
Definition at line 91 of file Type.h.
References ~Type().
Referenced by llvm::StructType::create(), llvm::PointerType::get(), llvm::IntegerType::getMask(), and llvm::StructType::hasName().
|
protecteddefault |
Referenced by Type().
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().
LLVM_DUMP_METHOD void Type::dump | ( | ) | const |
Definition at line 4302 of file AsmWriter.cpp.
References llvm::dbgs(), LLVM_DUMP_METHOD, and print().
Referenced by llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), and isSequentialType().
|
inline |
Definition at line 365 of file Type.h.
References ArrayTyID, assert(), getTypeID(), and getVectorNumElements().
Referenced by computeUnsignedMinMaxValuesFromKnownBits(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), getTypePartition(), isConstantUsingVectorTy(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
Definition at line 388 of file DerivedTypes.h.
Referenced by computeUnsignedMinMaxValuesFromKnownBits(), getAggregateNumElements(), llvm::getConstantDataArrayInfo(), getSequentialElementType(), scalarConstantToHexString(), and llvm::InstCombiner::visitGetElementPtrInst().
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().
|
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().
|
static |
Definition at line 192 of file Type.cpp.
References getDoubleTy(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 165 of file Type.cpp.
References llvm::LLVMContextImpl::DoubleTy, and llvm::LLVMContext::pImpl.
Referenced by ConvertDoubleToBytes(), ConvertImplicitDefToConstZero(), DecodeFixedType(), EnsureFPIntrinsicsExist(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantFP::get(), llvm::ConstantDataVector::get(), getDoublePtrTy(), llvm::IRBuilderBase::getDoubleTy(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getIntrinsicParamType(), getPointerElementType(), getPrimitiveType(), getScalarTy(), llvm::EVT::getTypeForEVT(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::LegalizerHelper::libcall(), LLVMDoubleTypeInContext(), llvm::LegalizerHelper::lower(), LowerFPToInt(), ReplaceFPIntrinsicWithCall(), and shrinkFPConstant().
|
static |
Definition at line 188 of file Type.cpp.
References getFloatTy(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 164 of file Type.cpp.
References llvm::LLVMContextImpl::FloatTy, and llvm::LLVMContext::pImpl.
Referenced by ConvertDoubleToBytes(), ConvertImplicitDefToConstZero(), llvm::MDBuilder::createFPMath(), DecodeFixedType(), EnsureFPIntrinsicsExist(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ConstantFP::get(), llvm::ConstantDataVector::get(), getFloatPtrTy(), llvm::IRBuilderBase::getFloatTy(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getIntrinsicParamType(), getPointerElementType(), getPrimitiveType(), getScalarTy(), llvm::EVT::getTypeForEVT(), haveEfficientBuildVectorPattern(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::LegalizerHelper::libcall(), LLVMFloatTypeInContext(), llvm::LegalizerHelper::lower(), LowerFPToInt(), ReplaceFPIntrinsicWithCall(), shrinkFPConstant(), and UpgradePTESTIntrinsic().
|
inline |
Definition at line 169 of file Type.h.
References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::IEEEquad(), llvm::APFloatBase::IEEEsingle(), llvm_unreachable, PPC_FP128TyID, llvm::APFloatBase::PPCDoubleDouble(), X86_FP80TyID, and llvm::APFloatBase::x87DoubleExtended().
Referenced by llvm::canConstantFoldCallTo(), llvm::ConstantFoldCastInstruction(), FoldBitCast(), INITIALIZE_PASS(), llvm::fuzzerop::makeConstantsWithType(), mapBinOpcode(), parseTexFail(), llvm::InstCombiner::visitFAdd(), and llvm::InstCombiner::visitFCmpInst().
|
static |
Definition at line 200 of file Type.cpp.
References getFP128Ty(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 169 of file Type.cpp.
References llvm::LLVMContextImpl::FP128Ty, and llvm::LLVMContext::pImpl.
Referenced by DecodeFixedType(), llvm::ConstantFP::get(), getFP128PtrTy(), getPointerElementType(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMFP128TypeInContext(), and llvm::LegalizerHelper::lower().
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().
|
inline |
Definition at line 157 of file DerivedTypes.h.
Referenced by getNumContainedTypes().
Definition at line 153 of file DerivedTypes.h.
Referenced by getNumContainedTypes(), and llvm::isLegalToPromote().
|
static |
Definition at line 184 of file Type.cpp.
References getHalfTy(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 163 of file Type.cpp.
References llvm::LLVMContextImpl::HalfTy, and llvm::LLVMContext::pImpl.
Referenced by ConvertDoubleToBytes(), DecodeFixedType(), llvm::ConstantFP::get(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getHalfPtrTy(), llvm::IRBuilderBase::getHalfTy(), getIntrinsicParamType(), getPointerElementType(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMHalfTypeInContext(), llvm::LegalizerHelper::lower(), shrinkFPConstant(), and llvm::InstCombiner::visitCallInst().
|
static |
Definition at line 178 of file Type.cpp.
References llvm::LLVMContextImpl::Int128Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::IntegerType::get(), llvm::IRBuilderBase::getInt128Ty(), getPointerElementType(), llvm::EVT::getTypeForEVT(), and LLVMInt128TypeInContext().
|
static |
Definition at line 224 of file Type.cpp.
References getInt16Ty(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 175 of file Type.cpp.
References llvm::LLVMContextImpl::Int16Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::ConstantFoldLoadThroughBitcast(), ConvertDoubleToBytes(), llvm::CodeExtractor::findInputsOutputs(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), getDivRemArgList(), getInt16PtrTy(), llvm::IRBuilderBase::getInt16Ty(), getIntrinsicParamType(), getPointerElementType(), llvm::EVT::getTypeForEVT(), llvm::isBytewiseValue(), LLVMInt16TypeInContext(), and needsRuntimeRegistrationOfSectionRange().
|
static |
Definition at line 216 of file Type.cpp.
References getInt1Ty(), and getPointerTo().
Referenced by findInitTrampoline(), llvm::SCEVExpander::getIVIncOperand(), getScalarTy(), llvm::Function::setPrologueData(), and llvm::InstCombiner::visitFree().
|
static |
Definition at line 173 of file Type.cpp.
References llvm::LLVMContextImpl::Int1Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::SelectInst::areInvalidOperands(), buildFrameType(), llvm::canConstantFoldCallTo(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), CloneLoop(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), computeValueLLTs(), llvm::ConstantFoldCompareInstruction(), llvm::IRBuilderBase::CreateMaskedGather(), llvm::IRBuilderBase::CreateMaskedScatter(), DisableAllLoopOptsOnLoop(), llvm::CodeExtractor::findInputsOutputs(), FunctionNumber(), llvm::IntegerType::get(), llvm::ConstantExpr::getAlignOf(), getEdgeValueLocal(), llvm::ConstantInt::getFalse(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getICmp(), getInt1PtrTy(), llvm::IRBuilderBase::getInt1Ty(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), getNegativeIsTrueBoolVec(), getPointerElementType(), GetRMWLibcall(), llvm::ConstantInt::getTrue(), llvm::EVT::getTypeForEVT(), llvm::X86TTIImpl::getUserCost(), llvm::SCEVExpander::hoistIVInc(), LLVMInt1TypeInContext(), llvm::CmpInst::makeCmpResultType(), OptimizeGlobalAddressOfMalloc(), performMaskedAtomicOp(), processCmp(), PushDefUseChildren(), readWideAPInt(), ReplaceUsesOfWith(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), SimplifyCondBranchToCondBranch(), SwitchToLookupTable(), TryToShrinkGlobalToBoolean(), UpgradeIntrinsicFunction1(), and llvm::InstCombiner::visitAllocSite().
|
static |
Definition at line 228 of file Type.cpp.
References getInt32Ty(), and getPointerTo().
Referenced by ConstantAddressBlock(), llvm::createEfficiencySanitizerPass(), getComparePred(), getScalarTy(), getSignature(), LowerToTLSExecModel(), mayLoopAccessLocation(), and llvm::R600TargetLowering::ReplaceNodeResults().
|
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().
|
static |
Definition at line 232 of file Type.cpp.
References getInt64Ty(), and getPointerTo().
Referenced by llvm::createEfficiencySanitizerPass(), getScalarTy(), INITIALIZE_PASS(), and shouldKeepInEntry().
|
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().
|
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().
|
static |
Definition at line 174 of file Type.cpp.
References llvm::LLVMContextImpl::Int8Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingMemInst(), ComputePostOrders(), ConvertDoubleToBytes(), createCallInst(), llvm::createMemCpyLoopUnknownSize(), llvm::createSeparateConstOffsetFromGEPPass(), dump(), llvm::SCEVExpander::expandCodeFor(), findUser(), FunctionNumber(), llvm::IntegerType::get(), llvm::ConstantDataVector::get(), getArrayElements(), llvm::SelectionDAG::getAtomicMemset(), getDivRemArgList(), llvm::SelectionDAG::getEVTAlignment(), getInt8PtrTy(), llvm::IRBuilderBase::getInt8Ty(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getInterleavedMemoryOpCost(), getIntrinsicParamType(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType(), llvm::VNCoercion::getMemInstValueForLoadHelper(), getPointerElementType(), GetPointerOperand(), llvm::EVT::getTypeForEVT(), getTypePartition(), hasSameExtUse(), INITIALIZE_PASS(), llvm::isBytewiseValue(), llvm::DenseMapInfo< VTableSlot >::isEqual(), isLoadInvariantInLoop(), IsSmallObject(), LLVMInt8TypeInContext(), lowerLoadRelative(), llvm::coro::LowererBase::makeSubFnCall(), patchAndReplaceAllUsesWith(), reportLoadElim(), llvm::AtomicMemIntrinsic::setElementSizeInBytes(), shouldKeepInEntry(), and wrapConstantAsMetadata().
|
inline |
Definition at line 97 of file DerivedTypes.h.
References llvm::IntegerType::getBitWidth().
Referenced by canBeCheaplyTransformed(), llvm::canConstantFoldCallTo(), computeUnsignedMinMaxValuesFromKnownBits(), llvm::ConstantFoldGetElementPtr(), createFFSIntrinsic(), llvm::createSeparateConstOffsetFromGEPPass(), eliminateDeadSwitchCases(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), EmitX86ScalarSelect(), evaluateGEPOffsetExpression(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), foldICmpWithMinMax(), generateSignedDivisionCode(), generateSignedRemainderCode(), llvm::LazyValueInfo::getConstantRange(), llvm::LazyValueInfo::getConstantRangeOnEdge(), getEdgeValueLocal(), llvm::ARMTTIImpl::getIntImmCost(), getMaxPointerSize(), getNumContainedTypes(), llvm::DataLayout::getTypeSizeInBits(), getValueFromICmpCondition(), hasSameExtUse(), llvm::HexagonEvaluator::HexagonEvaluator(), insertSinCosCall(), isObjectDereferencedInBlock(), isPromotedInstructionLegal(), llvm::ConstantInt::isValueValidForType(), matchesOr(), moveUp(), processUDivOrURem(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFAdd().
|
static |
Definition at line 212 of file Type.cpp.
References getIntNTy(), and getPointerTo().
Referenced by getScalarTy().
|
static |
Definition at line 180 of file Type.cpp.
References llvm::IntegerType::get().
Referenced by buildFrameType(), combineLoadToOperationType(), computeRecurrenceType(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldLoadThroughBitcast(), llvm::InnerLoopVectorizer::createBitOrPointerCast(), createMaskInstrs(), createOrdering(), llvm::createThreadSanitizerLegacyPassPass(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), foldBitcastExtElt(), getChainID(), getConstantVector(), getIntNPtrTy(), llvm::IRBuilderBase::getIntNTy(), llvm::DataLayout::getLargestLegalIntType(), getMemCmpLoad(), getOffsetFromIndices(), getPointerElementType(), GetRMWLibcall(), getScalarTy(), llvm::DataLayout::getSmallestLegalIntType(), getTypePartition(), hasSameExtUse(), instrumentMaskedLoadOrStore(), isBroadcastShuffle(), isIntegerWideningViable(), isVectorPromotionViableForSlice(), lowerBuildVectorAsBroadcast(), processUDivOrURem(), shouldInstrumentBlock(), simplifyX86movmsk(), splitMergedValStore(), TypeSizeToSizeIndex(), llvm::AMDGPULibCalls::useNative(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::InstCombiner::visitCallInst().
|
static |
Definition at line 162 of file Type.cpp.
References llvm::LLVMContextImpl::LabelTy, and llvm::LLVMContext::pImpl.
Referenced by FunctionNumber(), llvm::BasicBlock::getContext(), getPointerElementType(), getPrimitiveType(), and LLVMLabelTypeInContext().
|
static |
Definition at line 166 of file Type.cpp.
References llvm::LLVMContextImpl::MetadataTy, and llvm::LLVMContext::pImpl.
Referenced by DecodeFixedType(), llvm::MetadataAsValue::get(), getPointerElementType(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMMetadataTypeInContext(), and llvm::ValueEnumerator::ValueEnumerator().
|
inline |
Return the number of types in the derived type.
Definition at line 339 of file Type.h.
References getFunctionNumParams(), getFunctionParamType(), getIntegerBitWidth(), getStructElementType(), getStructName(), getStructNumElements(), isFunctionVarArg(), N, and NumContainedTys.
Referenced by llvm::InstCombiner::visitBitCast().
|
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().
|
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().
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().
|
static |
Definition at line 204 of file Type.cpp.
References getPointerTo(), and getPPC_FP128Ty().
Referenced by getScalarTy().
|
static |
Definition at line 170 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::PPC_FP128Ty.
Referenced by llvm::ConstantFP::get(), getPointerElementType(), getPPC_FP128PtrTy(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMPPCFP128TypeInContext(), and shrinkFPConstant().
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().
|
static |
Return a type based on an identifier.
Definition at line 39 of file Type.cpp.
References DoubleTyID, FloatTyID, FP128TyID, getDoubleTy(), getFloatTy(), getFP128Ty(), getHalfTy(), getLabelTy(), getMetadataTy(), getPPC_FP128Ty(), getTokenTy(), getVoidTy(), getX86_FP80Ty(), getX86_MMXTy(), HalfTyID, LabelTyID, MetadataTyID, PPC_FP128TyID, TokenTyID, VoidTyID, X86_FP80TyID, and X86_MMXTyID.
Referenced by getPointerElementType().
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().
|
inlinestatic |
Definition at line 413 of file Type.h.
References getDoublePtrTy(), getDoubleTy(), getFloatPtrTy(), getFloatTy(), getFP128PtrTy(), getHalfPtrTy(), getInt16PtrTy(), getInt1PtrTy(), getInt32PtrTy(), getInt64PtrTy(), getInt8PtrTy(), getIntNPtrTy(), getIntNTy(), getPointerTo(), getPPC_FP128PtrTy(), getX86_FP80PtrTy(), getX86_MMXPtrTy(), and llvm_unreachable.
|
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().
|
inline |
Definition at line 358 of file Type.h.
References assert(), getArrayNumElements(), getTypeID(), and isSequentialType().
Referenced by llvm::ConstantFoldLoadThroughBitcast(), llvm::ConstantDataSequential::getImpl(), and TypeSizeToSizeIndex().
Definition at line 333 of file DerivedTypes.h.
Referenced by createCast(), getNumContainedTypes(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), isConstantUsingVectorTy(), and originalTypeIsF128().
|
inline |
Definition at line 325 of file DerivedTypes.h.
References getName().
Referenced by getNumContainedTypes(), and false::operator<<().
|
inline |
Definition at line 329 of file DerivedTypes.h.
Referenced by createCast(), getAggregateNumElements(), getNumContainedTypes(), llvm::ConstantAggregateZero::getNumElements(), llvm::UndefValue::getNumElements(), isConstantUsingVectorTy(), and originalTypeIsF128().
|
inlineprotected |
Definition at line 95 of file Type.h.
Referenced by llvm::PointerType::getAddressSpace(), llvm::IntegerType::getBitWidth(), llvm::StructType::isLiteral(), llvm::StructType::isOpaque(), llvm::StructType::isPacked(), llvm::StructType::isSized(), llvm::FunctionType::isVarArg(), llvm::StructType::setBody(), and setSubclassData().
|
static |
Definition at line 167 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::TokenTy.
Referenced by DecodeFixedType(), FunctionNumber(), getPointerElementType(), getPrimitiveType(), LLVMBuildCatchSwitch(), LLVMBuildCleanupPad(), and LLVMTokenTypeInContext().
|
inline |
Return the type id for the type.
This will return one of the TypeID enum elements defined above.
Definition at line 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().
|
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().
|
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().
|
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().
|
static |
Definition at line 196 of file Type.cpp.
References getPointerTo(), and getX86_FP80Ty().
Referenced by getScalarTy().
|
static |
Definition at line 168 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::X86_FP80Ty.
Referenced by llvm::ConstantFP::get(), getPointerElementType(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), getX86_FP80PtrTy(), and LLVMX86FP80TypeInContext().
|
static |
Definition at line 208 of file Type.cpp.
References getPointerTo(), and getX86_MMXTy().
Referenced by getScalarTy().
|
static |
Definition at line 171 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::X86_MMXTy.
Referenced by DecodeFixedType(), getPointerElementType(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), getX86_MMXPtrTy(), LLVMX86MMXTypeInContext(), and TypeSizeToSizeIndex().
|
inline |
Return true if the type is an aggregate type.
This means it is valid as the first operand of an insertvalue or extractvalue instruction. This includes struct and array types, but does not include vector types.
Definition at line 258 of file Type.h.
References ArrayTyID, getTypeID(), and StructTyID.
Referenced by advanceToNextLeafType(), llvm::CastInst::castIsValid(), computeValueLLTs(), llvm::ConstantFoldLoadThroughBitcast(), firstRealType(), FunctionNumber(), getAggregateNumElements(), llvm::ExecutionEngine::getConstantValue(), getOpenCLAlignment(), llvm::NVPTXTargetLowering::getPrototype(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerFormalArguments(), llvm::BPFTargetLowering::LowerOperation(), llvm::InnerLoopVectorizer::scalarizeInstruction(), TypeSizeToSizeIndex(), unpackLoadToAggregate(), unpackStoreToAggregate(), and VisitGlobalVariableForEmission().
|
inline |
True if this is an instance of ArrayType.
Definition at line 221 of file Type.h.
References ArrayTyID, and getTypeID().
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), llvm::VNCoercion::analyzeLoadFromClobberingWrite(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), CC_MipsO32_FP64(), EvaluateStoreInto(), llvm::FindInsertedValue(), forEachUser(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::PPCTargetLowering::functionArgumentNeedsConsecutiveRegisters(), FunctionNumber(), llvm::ConstantAggregateZero::get(), getCompareCC(), getTypePartition(), llvm::SelectionDAGBuilder::getValueImpl(), isArray(), isConstantUsingVectorTy(), llvm::SCEVUnknown::isOffsetOf(), isSupportedType(), optimizeBinaryDoubleFP(), llvm::InstCombiner::visitGetElementPtrInst(), and X86ChooseCmpImmediateOpcode().
|
inline |
Return true if this is 'double', a 64-bit IEEE fp type.
Definition at line 150 of file Type.h.
References DoubleTyID, and getTypeID().
Referenced by appendTypeSuffix(), llvm::canConstantFoldCallTo(), CC_MipsO32_FP64(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughBitcast(), emitDebugValueComment(), llvm::Mips16TargetLowering::EmitInstrWithCustomInserter(), emitSignedInt64(), getCompareCC(), getComparePred(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getSqrtCall(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::ConstantDataSequential::isElementTypeCompatible(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::isMathLibCallNoop(), llvm::log2(), llvm::WebAssemblyMCInstLower::Lower(), llvm::Intrinsic::matchIntrinsicType(), optimizeDoubleFP(), false::LibCallsShrinkWrap::perform(), readWideAPInt(), shrinkFPConstant(), TypeToFloatSemantics(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitCallInst(), whichFPReturnVariant(), and X86ChooseCmpImmediateOpcode().
bool Type::isEmptyTy | ( | ) | const |
Return true if this type is empty, that is, it has no elements or all of its elements are empty.
Definition at line 98 of file Type.cpp.
Referenced by areGlobalsPotentiallyEqual(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), findArgumentCopyElisionCandidates(), isVectorTy(), llvm::FastISel::lowerCall(), llvm::FastISel::lowerCallTo(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::SelectionDAGBuilder::populateCallLoweringInfo(), and llvm::FastISel::selectStackmap().
|
inline |
Return true if the type is "first class", meaning it is a valid type for a Value.
Definition at line 244 of file Type.h.
References FunctionTyID, getTypeID(), and VoidTyID.
Referenced by canLosslesslyBitCastTo(), canTrapImpl(), llvm::CastInst::castIsValid(), llvm::FunctionComparator::cmpConstants(), foldConstantCastPair(), FunctionNumber(), llvm::CastInst::getCastOpcode(), llvm::ConstantExpr::getExtractValue(), getFoldedCast(), llvm::ConstantExpr::getInsertValue(), getParentPad(), getSuccPad(), llvm::ExecutionEngine::InitializeMemory(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), llvm::FunctionType::isValidArgumentType(), parseOptionalLinkageAux(), and llvm::Value::Value().
|
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().
|
inline |
Return true if this is 'float', a 32-bit IEEE fp type.
Definition at line 147 of file Type.h.
References FloatTyID, and getTypeID().
Referenced by appendTypeSuffix(), llvm::canConstantFoldCallTo(), CC_MipsO32_FP64(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughBitcast(), emitDebugValueComment(), llvm::Mips16TargetLowering::EmitInstrWithCustomInserter(), emitSignedInt64(), executeFCMP_ORD(), executeFCMP_UNO(), FunctionNumber(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), getCompareCC(), getComparePred(), llvm::ExecutionEngine::getConstantValue(), llvm::X86TTIImpl::getInterleavedMemoryOpCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getSqrtCall(), insertSinCosCall(), llvm::ConstantDataSequential::isElementTypeCompatible(), isHomogeneousAggregate(), llvm::InductionDescriptor::isInductionPHI(), llvm::isMathLibCallNoop(), llvm::WebAssemblyMCInstLower::Lower(), llvm::Intrinsic::matchIntrinsicType(), optimizeDoubleFP(), false::LibCallsShrinkWrap::perform(), readWideAPInt(), shouldKeepFDivF32(), TypeToFloatSemantics(), UnpackFromArgumentSlot(), valueHasFloatPrecision(), llvm::Interpreter::visitAShr(), llvm::InstCombiner::visitCallInst(), whichFPReturnVariant(), and X86ChooseCmpImmediateOpcode().
|
inline |
Return true if this is 'fp128'.
Definition at line 156 of file Type.h.
References FP128TyID, and getTypeID().
Referenced by llvm::ConstantFoldCastInstruction(), emitSignedInt64(), llvm::SystemZTTIImpl::getShuffleCost(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), llvm::Intrinsic::matchIntrinsicType(), originalTypeIsF128(), readWideAPInt(), and TypeToFloatSemantics().
|
inline |
Return true if this is a FP type or a vector of FP.
Definition at line 185 of file Type.h.
References getScalarType(), and isFloatingPointTy().
Referenced by buildMultiplyTree(), llvm::ARMTargetLowering::canCombineStoreAndExtract(), canonicalizeSaturatedSubtract(), llvm::CastInst::castIsValid(), llvm::FPMathOperator::classof(), llvm::CastInst::CreateFPCast(), createRdxShuffleMask(), FunctionNumber(), llvm::ConstantExpr::get(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::HexagonTTIImpl::getCastInstrCost(), getDecodedBinaryOpcode(), getDecodedUnaryOpcode(), llvm::ConstantExpr::getFNeg(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::X86TTIImpl::getMinMaxReductionCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMinMaxReductionCost(), getParameterABIAttributes(), getParentPad(), llvm::ConstantExpr::getSIToFP(), getSuccPad(), llvm::ConstantExpr::getUIToFP(), llvm::ConstantFP::getZeroValueForNegation(), llvm::isKnownNeverNaN(), llvm::Constant::isNegativeZeroValue(), llvm::Intrinsic::matchIntrinsicType(), NegateValue(), originalTypeIsVectorFloat(), readWideAPInt(), TypeSizeToSizeIndex(), upgradeAVX512MaskToSelect(), and UpgradeX86VPERMT2Intrinsics().
|
inline |
True if this is an instance of FunctionType.
Definition at line 215 of file Type.h.
References FunctionTyID, and getTypeID().
Referenced by llvm::convertToDeclaration(), llvm::AsmPrinter::emitGlobalGOTEquivs(), llvm::emitLinkerFlagsForGlobalCOFF(), forceRenaming(), FunctionNumber(), llvm::GlobalVariable::GlobalVariable(), llvm::PointerType::isLoadableOrStorableType(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::FunctionType::isValidReturnType(), llvm::WebAssemblyMCInstLower::Lower(), llvm::TargetLoweringObjectFileELF::lowerRelativeReference(), llvm::TargetLoweringObjectFileWasm::lowerRelativeReference(), maybeSetDSOLocal(), and llvm::XCoreTargetLowering::ReplaceNodeResults().
|
inline |
Definition at line 149 of file DerivedTypes.h.
Referenced by getNumContainedTypes().
|
inline |
Return true if this is 'half', a 16-bit IEEE fp type.
Definition at line 144 of file Type.h.
References getTypeID(), and HalfTyID.
Referenced by llvm::canConstantFoldCallTo(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadThroughBitcast(), emitSignedInt64(), FunctionNumber(), getOpenCLAlignment(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::InductionDescriptor::isInductionPHI(), llvm::ARMTargetLowering::isLegalInterleavedAccessType(), llvm::isMathLibCallNoop(), llvm::Intrinsic::matchIntrinsicType(), readWideAPInt(), TypeToFloatSemantics(), and llvm::InstCombiner::visitCallInst().
|
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().
Return true if this is an IntegerType of the given width.
Definition at line 57 of file Type.cpp.
References getBitWidth(), and isIntegerTy().
|
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().
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().
|
inline |
Return true if this is an integer type or a pointer type.
Definition at line 212 of file Type.h.
References isIntegerTy(), and isPointerTy().
Referenced by computeKnownBitsFromOperator(), llvm::NVPTXAsmPrinter::doFinalization(), evaluateICmpRelation(), llvm::ScalarEvolution::getNoopOrAnyExtend(), llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), hasSameExtUse(), isBitCastSemanticsPreserving(), isContiguous(), isPromotedInstructionLegal(), llvm::ScalarEvolution::isSCEVable(), isSupportedAtomicType(), llvm::X86TargetLowering::markLibCallAttributes(), MightBeFoldableInst(), and llvm::SCEVCastExpr::SCEVCastExpr().
|
inline |
Return true if this is 'label'.
Definition at line 188 of file Type.h.
References getTypeID(), and LabelTyID.
Referenced by createGlobalFwdRef(), FunctionNumber(), getSuccPad(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::FunctionType::isValidReturnType(), and parseOptionalLinkageAux().
|
inline |
Return true if this is 'metadata'.
Definition at line 191 of file Type.h.
References getTypeID(), and MetadataTyID.
Referenced by llvm::canReplaceOperandWithVariable(), forEachUser(), FunctionNumber(), getParentPad(), getSuccPad(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::FunctionType::isValidReturnType(), llvm::Intrinsic::matchIntrinsicType(), parseOptionalLinkageAux(), and readTriple().
|
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().
|
inline |
Return true if this is powerpc long double.
Definition at line 159 of file Type.h.
References getTypeID(), and PPC_FP128TyID.
Referenced by asmClobbersCTR(), llvm::ConstantFoldCastInstruction(), emitGlobalConstantFP(), emitSignedInt64(), FoldBitCast(), llvm::Constant::getAllOnesValue(), isValidElementType(), readWideAPInt(), and TypeToFloatSemantics().
|
inline |
Return true if this is a pointer type or a vector of pointer types.
Definition at line 227 of file Type.h.
References getScalarType(), and isPointerTy().
Referenced by llvm::CastInst::castIsValid(), checkFunctionMemoryAccess(), llvm::VNCoercion::coerceAvailableValueToLoadTypeHelper(), computeKnownBits(), convertValue(), llvm::IRBuilder< TargetFolder >::CreateBitOrPointerCast(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), decomposeSimpleLinearExpr(), findBaseDefiningValue(), FunctionNumber(), getChainID(), llvm::DataLayout::getIndexType(), llvm::DataLayout::getIndexTypeSizeInBits(), llvm::DataLayout::getIntPtrType(), llvm::ConstantExpr::getIntToPtr(), getParameterABIAttributes(), getParentPad(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantExpr::getPtrToInt(), getScalarSizeInBits(), getSuccPad(), llvm::CastInst::isEliminableCastPair(), isOnlyReachableViaThisEdge(), patchAndReplaceAllUsesWith(), reportLoadElim(), reportMayClobberedLoad(), SimplifyCastInst(), stripAndComputeConstantOffsets(), TypeSizeToSizeIndex(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().
Definition at line 113 of file Type.h.
References ArrayTyID, dump(), llvm::RISCVFenceField::O, print(), and VectorTyID.
Referenced by getSequentialElementType().
|
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().
|
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().
|
inline |
True if this is an instance of StructType.
Definition at line 218 of file Type.h.
References getTypeID(), and StructTyID.
Referenced by llvm::VNCoercion::analyzeLoadFromClobberingLoad(), llvm::VNCoercion::analyzeLoadFromClobberingStore(), llvm::VNCoercion::analyzeLoadFromClobberingWrite(), llvm::VNCoercion::canCoerceMustAliasedValueToLoad(), CC_MipsO32_FP64(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldLoadThroughBitcast(), createCast(), CreateWrapper(), doPromotion(), findInitTrampoline(), llvm::FindInsertedValue(), llvm::ConstantAggregateZero::get(), getCompareCC(), llvm::SelectionDAGBuilder::getValueImpl(), insertSinCosCall(), isConstantUsingVectorTy(), llvm::SCEVUnknown::isOffsetOf(), isSupportedType(), memVTFromAggregate(), false::next_type(), false::operator<<(), originalTypeIsF128(), tryToReplaceWithConstant(), llvm::Value::Value(), llvm::InlineAsm::Verify(), llvm::InstCombiner::visitGetElementPtrInst(), and X86ChooseCmpImmediateOpcode().
|
inline |
Return true if this is 'token'.
Definition at line 194 of file Type.h.
References getTypeID(), and TokenTyID.
Referenced by llvm::SelectInst::areInvalidOperands(), canSinkInstructions(), llvm::GVNExpression::Expression::dump(), llvm::formLCSSAForInstructions(), FunctionNumber(), getOffsetFromIndices(), getSuccPad(), llvm::FunctionLoweringInfo::InitializeRegForValue(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), llvm::Intrinsic::matchIntrinsicType(), llvm::removeAllNonTerminatorAndEHPadInstructions(), llvm::SplitLandingPadPredecessors(), and llvm::SelectionDAGBuilder::visitBitTestCase().
|
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().
|
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().
|
inline |
Return true if this is x86 long double.
Definition at line 153 of file Type.h.
References getTypeID(), and X86_FP80TyID.
Referenced by llvm::ConstantFoldCastInstruction(), emitSignedInt64(), llvm::ExecutionEngine::getConstantValue(), isValidElementType(), MatchingStackOffset(), false::LibCallsShrinkWrap::perform(), readWideAPInt(), and TypeToFloatSemantics().
|
inline |
Return true if this is X86 MMX.
Definition at line 182 of file Type.h.
References getTypeID(), and X86_MMXTyID.
Referenced by llvm::ConstantFoldCastInstruction(), llvm::CastInst::getCastOpcode(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), isSingleValueType(), llvm::Intrinsic::matchIntrinsicType(), and TypeSizeToSizeIndex().
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<<().
|
inlineprotected |
Definition at line 97 of file Type.h.
References assert(), and getSubclassData().
Referenced by llvm::StructType::get(), llvm::PointerType::get(), llvm::IntegerType::getMask(), llvm::IntegerType::IntegerType(), llvm::StructType::isSized(), and llvm::StructType::setBody().
|
inline |
Definition at line 315 of file Type.h.
References ContainedTys.
Referenced by llvm::GraphTraits< Type * >::child_begin(), llvm::GraphTraits< const Type * >::child_begin(), subtype_rend(), and subtypes().
|
inline |
Definition at line 316 of file Type.h.
References NumContainedTys.
Referenced by llvm::GraphTraits< Type * >::child_end(), llvm::GraphTraits< const Type * >::child_end(), subtype_rbegin(), and subtypes().
|
inline |
Definition at line 323 of file Type.h.
References subtype_end().
Referenced by llvm::TypeFinder::clear().
|
inline |
Definition at line 326 of file Type.h.
References subtype_begin().
Referenced by llvm::TypeFinder::clear().
Definition at line 317 of file Type.h.
References llvm::makeArrayRef(), subtype_begin(), and subtype_end().
Referenced by getMetadataTypeOrder().
|
friend |
A pointer to the array of Types contained by this Type.
For example, this includes the arguments of a function type, the elements of a structure, the pointee of a pointer, the element type of an array, etc. This pointer may be 0 for types that don't contain other types (Integer, Double, Float).
Definition at line 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().
|
protected |
Keeps track of how many Type*'s there are in the ContainedTys list.
Definition at line 104 of file Type.h.
Referenced by llvm::StructType::element_end(), llvm::PointerType::get(), llvm::StructType::getElementType(), llvm::IntegerType::getMask(), getNumContainedTypes(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), llvm::StructType::setBody(), and subtype_end().