|
LLVM
3.7.0
|
The instances of the Type class are immutable: once they are created, they are never changed. More...
#include <Type.h>
Public Types | |
| enum | TypeID { VoidTyID = 0, HalfTyID, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, LabelTyID, MetadataTyID, X86_MMXTyID, IntegerTyID, FunctionTyID, StructTyID, ArrayTyID, PointerTyID, VectorTyID } |
| Definitions of all of the base types for the Type system. More... | |
| typedef Type *const * | subtype_iterator |
| typedef std::reverse_iterator < subtype_iterator > | subtype_reverse_iterator |
Public Member Functions | |
| void | print (raw_ostream &O) const |
| void | dump () const |
| LLVMContext & | getContext () const |
| getContext - Return the LLVMContext in which this type was uniqued. More... | |
| TypeID | getTypeID () const |
| getTypeID - Return the type id for the type. More... | |
| bool | isVoidTy () const |
| isVoidTy - Return true if this is 'void'. More... | |
| bool | isHalfTy () const |
| isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type. More... | |
| bool | isFloatTy () const |
| isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type. More... | |
| bool | isDoubleTy () const |
| isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type. More... | |
| bool | isX86_FP80Ty () const |
| isX86_FP80Ty - Return true if this is x86 long double. More... | |
| bool | isFP128Ty () const |
| isFP128Ty - Return true if this is 'fp128'. More... | |
| bool | isPPC_FP128Ty () const |
| isPPC_FP128Ty - Return true if this is powerpc long double. More... | |
| bool | isFloatingPointTy () const |
| isFloatingPointTy - Return true if this is one of the six floating point types More... | |
| const fltSemantics & | getFltSemantics () const |
| bool | isX86_MMXTy () const |
| isX86_MMXTy - Return true if this is X86 MMX. More... | |
| bool | isFPOrFPVectorTy () const |
| isFPOrFPVectorTy - Return true if this is a FP type or a vector of FP. More... | |
| bool | isLabelTy () const |
| isLabelTy - Return true if this is 'label'. More... | |
| bool | isMetadataTy () const |
| isMetadataTy - Return true if this is 'metadata'. More... | |
| bool | isIntegerTy () const |
| isIntegerTy - True if this is an instance of IntegerType. More... | |
| bool | isIntegerTy (unsigned Bitwidth) const |
| isIntegerTy - Return true if this is an IntegerType of the given width. More... | |
| bool | isIntOrIntVectorTy () const |
| isIntOrIntVectorTy - Return true if this is an integer type or a vector of integer types. More... | |
| bool | isFunctionTy () const |
| isFunctionTy - True if this is an instance of FunctionType. More... | |
| bool | isStructTy () const |
| isStructTy - True if this is an instance of StructType. More... | |
| bool | isArrayTy () const |
| isArrayTy - True if this is an instance of ArrayType. More... | |
| bool | isPointerTy () const |
| isPointerTy - True if this is an instance of PointerType. More... | |
| bool | isPtrOrPtrVectorTy () const |
| isPtrOrPtrVectorTy - Return true if this is a pointer type or a vector of pointer types. More... | |
| bool | isVectorTy () const |
| isVectorTy - True if this is an instance of VectorType. More... | |
| bool | canLosslesslyBitCastTo (Type *Ty) const |
| canLosslesslyBitCastTo - Return true if this type could be converted with a lossless BitCast to type 'Ty'. More... | |
| bool | isEmptyTy () const |
| isEmptyTy - Return true if this type is empty, that is, it has no elements or all its elements are empty. More... | |
| bool | isFirstClassType () const |
| isFirstClassType - Return true if the type is "first class", meaning it is a valid type for a Value. More... | |
| bool | isSingleValueType () const |
| isSingleValueType - Return true if the type is a valid type for a register in codegen. More... | |
| bool | isAggregateType () const |
| isAggregateType - Return true if the type is an aggregate type. More... | |
| bool | isSized (SmallPtrSetImpl< const Type * > *Visited=nullptr) const |
| isSized - Return true if it makes sense to take the size of this type. More... | |
| unsigned | getPrimitiveSizeInBits () const LLVM_READONLY |
| getPrimitiveSizeInBits - Return the basic size of this type if it is a primitive type. More... | |
| unsigned | getScalarSizeInBits () const LLVM_READONLY |
| getScalarSizeInBits - If this is a vector type, return the getPrimitiveSizeInBits value for the element type. More... | |
| int | getFPMantissaWidth () const |
| getFPMantissaWidth - Return the width of the mantissa of this type. More... | |
| const Type * | getScalarType () const LLVM_READONLY |
| getScalarType - If this is a vector type, return the element type, otherwise return 'this'. More... | |
| Type * | getScalarType () LLVM_READONLY |
| getScalarType - 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 |
| getContainedType - This method is used to implement the type iterator (defined at the end of the file). More... | |
| unsigned | getNumContainedTypes () const |
| getNumContainedTypes - 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) |
| getPointerTo - Return a pointer to the current type. More... | |
Protected Member Functions | |
| Type (LLVMContext &C, TypeID tid) | |
| ~Type ()=default | |
| void | setTypeID (TypeID ID) |
| unsigned | getSubclassData () const |
| void | setSubclassData (unsigned val) |
Protected Attributes | |
| unsigned | NumContainedTys |
| NumContainedTys - Keeps track of how many Type*'s there are in the ContainedTys list. More... | |
| Type *const * | ContainedTys |
| ContainedTys - 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.
| typedef Type* const* llvm::Type::subtype_iterator |
| typedef std::reverse_iterator<subtype_iterator> llvm::Type::subtype_reverse_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) |
| IntegerTyID |
10: Arbitrary bit width integers |
| FunctionTyID |
11: Functions |
| StructTyID |
12: Structures |
| ArrayTyID |
13: Arrays |
| PointerTyID |
14: Pointers |
| VectorTyID |
15: SIMD 'packed' format, or other vector type |
|
inlineexplicitprotected |
Definition at line 89 of file Type.h.
References setTypeID().
|
protecteddefault |
canLosslesslyBitCastTo - 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 65 of file Type.cpp.
References getTypeID(), isFirstClassType(), and X86_MMXTyID.
| LLVM_DUMP_METHOD void Type::dump | ( | ) | const |
Definition at line 3357 of file AsmWriter.cpp.
References llvm::dbgs(), and print().
Referenced by llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters().
|
inline |
Definition at line 361 of file Type.h.
References getSequentialElementType().
Referenced by arrayTypeToVecType(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), isConstantUsingVectorTy(), tryPromoteAllocaToVector(), and llvm::InstCombiner::visitGetElementPtrInst().
| uint64_t Type::getArrayNumElements | ( | ) | const |
Definition at line 208 of file Type.cpp.
Referenced by arrayTypeToVecType(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::getConstantStringInfo(), scalarConstantToHexString(), and tryPromoteAllocaToVector().
getContainedType - 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 332 of file Type.h.
References ContainedTys, and NumContainedTys.
Referenced by llvm::ComputeUsesVAFloatArgument(), lookupFunction(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitShuffleVectorInst(), and whichFPReturnVariant().
|
inline |
getContext - Return the LLVMContext in which this type was uniqued.
Definition at line 125 of file Type.h.
Referenced by CoerceAvailableValueToLoadType(), ConstantFoldGetElementPtrImpl(), ConstantFoldScalarCall(), convertPointerToIntegerType(), llvm::StructType::create(), createAndInstr(), llvm::orc::createIRTypedAddress(), llvm::FunctionLoweringInfo::CreateRegs(), CvtFDivConstToReciprocal(), llvm::InstCombiner::FoldAndOfICmps(), FoldBitCast(), foldConstantCastPair(), FoldReinterpretLoadFromConstPtr(), llvm::InlineAsm::get(), llvm::ConstantInt::get(), llvm::FunctionType::get(), llvm::StructType::get(), llvm::ConstantFP::get(), llvm::ConstantAggregateZero::get(), llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::VectorType::get(), llvm::ConstantStruct::get(), llvm::PointerType::get(), llvm::ConstantVector::get(), llvm::ConstantPointerNull::get(), llvm::UndefValue::get(), llvm::ConstantExpr::getAlignOf(), getAllocationData(), llvm::Constant::getAllOnesValue(), GetConstantFoldFPValue(), llvm::BasicBlock::getContext(), llvm::Function::getContext(), llvm::Value::getContext(), llvm::EVT::getEVT(), llvm::VectorType::getExtendedElementVectorType(), llvm::ConstantInt::getFalse(), llvm::ConstantExpr::getFCmp(), getFoldedCast(), llvm::ConstantExpr::getICmp(), llvm::ConstantDataSequential::getImpl(), llvm::DataLayout::getIndexedOffset(), llvm::ConstantFP::getInfinity(), llvm::VectorType::getInteger(), llvm::Constant::getIntegerValue(), llvm::DataLayout::getIntPtrType(), GetLoadValueForLoad(), GetMemInstValueForLoad(), llvm::ConstantFP::getNaN(), llvm::ConstantFP::getNegativeZero(), llvm::Constant::getNullValue(), llvm::ConstantExpr::getOffsetOf(), getPromotedType(), getReturnAttrs(), llvm::GetReturnInfo(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantExpr::getSizeOf(), GetStoreValueForLoad(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::ConstantInt::getTrue(), llvm::VectorType::getTruncatedElementVectorType(), llvm::TargetLoweringBase::getTypeLegalizationCost(), getTypePartition(), llvm::TargetLoweringBase::getValueType(), llvm::ValueAsMetadata::handleDeletion(), llvm::ValueAsMetadata::handleRAUW(), hasLifetimeMarkers(), IsIncrementNSW(), IsIncrementNUW(), isIntegerWideningViable(), isVectorPromotionViableForSlice(), LLVMConstIntOfArbitraryPrecision(), llvm::FastISel::lowerCallTo(), llvm::TargetLowering::LowerCallTo(), llvm::CmpInst::makeCmpResultType(), llvm::TargetLowering::ParseConstraints(), llvm::StructType::setBody(), llvm::StructType::setName(), and SymbolicallyEvaluateGEP().
|
static |
Definition at line 255 of file Type.cpp.
References getDoubleTy(), and getPointerTo().
|
static |
Definition at line 229 of file Type.cpp.
References llvm::LLVMContextImpl::DoubleTy, and llvm::LLVMContext::pImpl.
Referenced by DecodeFixedType(), EnsureFPIntrinsicsExist(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::TypeBuilder< double, false >::get(), llvm::TypeBuilder< types::ieee_double, cross >::get(), llvm::ConstantFP::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), getDoublePtrTy(), llvm::IRBuilderBase::getDoubleTy(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMDoubleTypeInContext(), and ReplaceFPIntrinsicWithCall().
|
static |
Definition at line 251 of file Type.cpp.
References getFloatTy(), and getPointerTo().
|
static |
Definition at line 228 of file Type.cpp.
References llvm::LLVMContextImpl::FloatTy, and llvm::LLVMContext::pImpl.
Referenced by llvm::MDBuilder::createFPMath(), DecodeFixedType(), EnsureFPIntrinsicsExist(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::TypeBuilder< float, false >::get(), llvm::TypeBuilder< types::ieee_float, cross >::get(), llvm::ConstantFP::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), getFloatPtrTy(), llvm::IRBuilderBase::getFloatTy(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMFloatTypeInContext(), ReplaceFPIntrinsicWithCall(), and UpgradeSSE41Function().
|
inline |
Definition at line 166 of file Type.h.
References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, llvm::APFloat::IEEEdouble, llvm::APFloat::IEEEhalf, llvm::APFloat::IEEEquad, llvm::APFloat::IEEEsingle, llvm_unreachable, PPC_FP128TyID, llvm::APFloat::PPCDoubleDouble, X86_FP80TyID, and llvm::APFloat::x87DoubleExtended.
Referenced by llvm::ConstantFoldCastInstruction(), ConstantFoldScalarCall(), and FoldBitCast().
|
static |
Definition at line 263 of file Type.cpp.
References getFP128Ty(), and getPointerTo().
|
static |
Definition at line 232 of file Type.cpp.
References llvm::LLVMContextImpl::FP128Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::TypeBuilder< types::fp128, cross >::get(), llvm::ConstantFP::get(), getFP128PtrTy(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), and LLVMFP128TypeInContext().
| int Type::getFPMantissaWidth | ( | ) | const |
getFPMantissaWidth - 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 146 of file Type.cpp.
References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, isFloatingPointTy(), PPC_FP128TyID, and X86_FP80TyID.
Referenced by llvm::InstCombiner::FoldFCmp_IntToFP_Cst(), and llvm::InstCombiner::visitFPTrunc().
|
static |
Definition at line 247 of file Type.cpp.
References getHalfTy(), and getPointerTo().
|
static |
Definition at line 227 of file Type.cpp.
References llvm::LLVMContextImpl::HalfTy, and llvm::LLVMContext::pImpl.
Referenced by DecodeFixedType(), llvm::ConstantFP::get(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), getHalfPtrTy(), llvm::IRBuilderBase::getHalfTy(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), and LLVMHalfTypeInContext().
|
static |
Definition at line 241 of file Type.cpp.
References llvm::LLVMContextImpl::Int128Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::IntegerType::get(), llvm::IRBuilderBase::getInt128Ty(), llvm::EVT::getTypeForEVT(), and LLVMInt128TypeInContext().
|
static |
Definition at line 287 of file Type.cpp.
References getInt16Ty(), and getPointerTo().
Referenced by FoldReinterpretLoadFromConstPtr().
|
static |
Definition at line 238 of file Type.cpp.
References llvm::LLVMContextImpl::Int16Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::IntegerType::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), getInt16PtrTy(), llvm::IRBuilderBase::getInt16Ty(), llvm::EVT::getTypeForEVT(), LLVMInt16TypeInContext(), and ReadDataFromGlobal().
|
static |
Definition at line 279 of file Type.cpp.
References getInt1Ty(), and getPointerTo().
Referenced by llvm::SCEVExpander::getIVIncOperand(), and llvm::InstCombiner::visitFree().
|
static |
Definition at line 236 of file Type.cpp.
References llvm::LLVMContextImpl::Int1Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::SelectInst::areInvalidOperands(), llvm::ConstantFoldCompareInstruction(), ConstantFoldScalarCall(), llvm::IntegerType::get(), llvm::ConstantExpr::getAlignOf(), getEdgeValueLocal(), llvm::ConstantInt::getFalse(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getICmp(), getInt1PtrTy(), llvm::IRBuilderBase::getInt1Ty(), llvm::ConstantInt::getTrue(), llvm::EVT::getTypeForEVT(), LLVMInt1TypeInContext(), llvm::CmpInst::makeCmpResultType(), OptimizeGlobalAddressOfMalloc(), SimplifyCondBranchToCondBranch(), TryToShrinkGlobalToBoolean(), UpgradeIntrinsicFunction1(), and llvm::InstCombiner::visitAllocSite().
|
static |
Definition at line 291 of file Type.cpp.
References getInt32Ty(), and getPointerTo().
Referenced by FoldReinterpretLoadFromConstPtr().
|
static |
Definition at line 239 of file Type.cpp.
References llvm::LLVMContextImpl::Int32Ty, and llvm::LLVMContext::pImpl.
Referenced by llvm::Module::addModuleFlag(), llvm::IntrinsicLowering::AddPrototypes(), AddWithOverflow(), BuildConstantFromSCEV(), calculateVectorIndex(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ConstantFoldInsertElementInstruction(), convertPointerToIntegerType(), llvm::ARMConstantPoolConstant::Create(), llvm::MDBuilder::createBranchWeights(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP1_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP2_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP1_32(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP2_32(), CreateGCRelocates(), llvm::IRBuilder< true, TargetFolder >::CreateGlobalStringPtr(), createPrivateGlobalForSourceLoc(), CreatePrologue(), createStubLandingPad(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), findBasePointer(), FoldBitCast(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::IntegerType::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), llvm::DataLayout::getIndexedOffset(), getInt32PtrTy(), llvm::IRBuilderBase::getInt32Ty(), llvm::ConstantExpr::getOffsetOf(), getPromotedType(), llvm::ConstantExpr::getSizeOf(), llvm::EVT::getTypeForEVT(), llvm::isBytewiseValue(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XCoreInstrInfo::loadImmediate(), llvm::X86TargetLowering::LowerAsmOperandForConstraint(), LowerBSWAP(), llvm::SparcTargetLowering::LowerF128Compare(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MergeBasicBlockIntoOnlyPred(), ReadDataFromGlobal(), SRAGlobal(), SubWithOverflow(), SymbolicallyEvaluateGEP(), llvm::UpgradeIntrinsicCall(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitShuffleVectorInst(), and llvm::BasicBlock::~BasicBlock().
|
static |
Definition at line 295 of file Type.cpp.
References getInt64Ty(), and getPointerTo().
Referenced by FoldReinterpretLoadFromConstPtr().
|
static |
Definition at line 240 of file Type.cpp.
References llvm::LLVMContextImpl::Int64Ty, and llvm::LLVMContext::pImpl.
Referenced by AnalyzeLoadFromClobberingMemInst(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP1_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstGEP2_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP1_64(), llvm::IRBuilder< true, TargetFolder >::CreateConstInBoundsGEP2_64(), llvm::MDBuilder::createFunctionEntryCount(), llvm::orc::createIRTypedAddress(), llvm::IRBuilder< true, TargetFolder >::CreatePtrDiff(), llvm::MDBuilder::createTBAANode(), llvm::MDBuilder::createTBAAScalarTypeNode(), llvm::MDBuilder::createTBAAStructNode(), llvm::MDBuilder::createTBAAStructTagNode(), llvm::MDBuilder::createTBAAStructTypeNode(), llvm::AArch64TargetLowering::emitStoreConditional(), foldConstantCastPair(), genLoopLimit(), llvm::IntegerType::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::ConstantExpr::getAlignOf(), getInt64PtrTy(), llvm::IRBuilderBase::getInt64Ty(), GetMemInstValueForLoad(), llvm::ConstantExpr::getOffsetOf(), llvm::ConstantExpr::getSizeOf(), llvm::EVT::getTypeForEVT(), llvm::InlineFunction(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::isBytewiseValue(), LLVMInt64TypeInContext(), LowerBSWAP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), ReadDataFromGlobal(), llvm::UpgradeIntrinsicCall(), UpgradeX86PSLLDQIntrinsics(), and UpgradeX86PSRLDQIntrinsics().
|
static |
Definition at line 283 of file Type.cpp.
References getInt8Ty(), and getPointerTo().
Referenced by llvm::IntrinsicLowering::AddPrototypes(), llvm::LoopAccessInfo::addRuntimeCheck(), AnalyzeLoadFromClobberingMemInst(), BuildConstantFromSCEV(), checkStringCopyLibFuncSignature(), convertTransferToLoop(), createFree(), CreateGCRelocates(), createMalloc(), CreatePrologue(), createStubLandingPad(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), getAllocationData(), llvm::IRBuilderBase::getInt8PtrTy(), llvm::SCEVExpander::getIVIncOperand(), GetMemInstValueForLoad(), getNaturalGEPWithOffset(), hasLifetimeMarkers(), llvm::isAllocaPromotable(), llvm::isFreeCall(), llvm::ARMTargetLowering::lowerInterleavedLoad(), LowerToTLSExecModel(), llvm::ExecutionEngine::runFunctionAsMain(), and setUsedInitializer().
|
static |
Definition at line 237 of file Type.cpp.
References llvm::LLVMContextImpl::Int8Ty, and llvm::LLVMContext::pImpl.
Referenced by AnalyzeLoadFromClobberingMemInst(), llvm::IntegerType::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::SelectionDAG::getEVTAlignment(), getInt8PtrTy(), llvm::IRBuilderBase::getInt8Ty(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), GetMemInstValueForLoad(), llvm::EVT::getTypeForEVT(), llvm::isBytewiseValue(), LLVMInt8TypeInContext(), UpgradeX86PSLLDQIntrinsics(), and UpgradeX86PSRLDQIntrinsics().
| unsigned Type::getIntegerBitWidth | ( | ) | const |
Definition at line 176 of file Type.cpp.
References getBitWidth().
Referenced by canBeCheaplyTransformed(), ConstantFoldConvertToInt(), ConstantFoldGetElementPtrImpl(), DecomposeGEPExpression(), EliminateDeadSwitchCases(), EvaluateGEPOffsetExpression(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), generateSignedDivisionCode(), generateSignedRemainderCode(), getEdgeValueLocal(), llvm::DataLayout::getTypeSizeInBits(), hasSameExtUse(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::ConstantInt::isValueValidForType(), isZero(), and llvm::InstCombiner::visitICmpInstWithCastAndCast().
|
static |
Definition at line 275 of file Type.cpp.
References getIntNTy(), and getPointerTo().
Referenced by FoldReinterpretLoadFromConstPtr().
|
static |
Definition at line 243 of file Type.cpp.
References llvm::IntegerType::get().
Referenced by combineLoadToOperationType(), ConstantFoldGetElementPtrImpl(), FoldBitCast(), getIntNPtrTy(), llvm::IRBuilderBase::getIntNTy(), llvm::DataLayout::getLargestLegalIntType(), and llvm::DataLayout::getSmallestLegalIntType().
|
static |
Definition at line 226 of file Type.cpp.
References llvm::LLVMContextImpl::LabelTy, and llvm::LLVMContext::pImpl.
Referenced by getPrimitiveType(), and LLVMLabelTypeInContext().
|
static |
Definition at line 230 of file Type.cpp.
References llvm::LLVMContextImpl::MetadataTy, and llvm::LLVMContext::pImpl.
Referenced by DecodeFixedType(), llvm::MetadataAsValue::get(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), and llvm::ValueEnumerator::ValueEnumerator().
|
inline |
getNumContainedTypes - Return the number of types in the derived type.
Definition at line 339 of file Type.h.
References NumContainedTys.
Referenced by lookupFunction(), and llvm::InstCombiner::visitBitCast().
| unsigned Type::getPointerAddressSpace | ( | ) | const |
Get the address space of this pointer or pointer vector type.
Definition at line 216 of file Type.cpp.
References getScalarType().
Referenced by llvm::LoopAccessInfo::addRuntimeCheck(), BuildConstantFromSCEV(), llvm::CastToCStr(), llvm::ConstantFoldInstOperands(), llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::IntToPtrInst::getAddressSpace(), getAdjustedPtr(), llvm::CastInst::getCastOpcode(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), GetLoadValueForLoad(), GetMemInstValueForLoad(), llvm::Module::getOrInsertGlobal(), llvm::LoadInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::GetElementPtrInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::DataLayout::getTypeSizeInBits(), llvm::SelectionDAGBuilder::getValueImpl(), hasLifetimeMarkers(), llvm::CastInst::isEliminableCastPair(), PerformHeapAllocSRoA(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::InstCombiner::visitGetElementPtrInst(), and llvm::InstCombiner::visitICmpInstWithCastAndCast().
|
inline |
Definition at line 366 of file Type.h.
References getSequentialElementType().
Referenced by DecomposeGEPExpression(), getAdjustedPtr(), isDereferenceableFromAttribute(), llvm::isDereferenceablePointer(), isDereferenceablePointer(), llvm::CastInst::isEliminableCastPair(), llvm::isInductionPHI(), llvm::isSafeToLoadUnconditionally(), IsSmallObject(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), SymbolicallyEvaluateGEP(), and llvm::InstCombiner::visitGetElementPtrInst().
| PointerType * Type::getPointerTo | ( | unsigned | AddrSpace = 0 | ) |
getPointerTo - Return a pointer to the current type.
This is equivalent to PointerType::get(Foo, AddrSpace).
Definition at line 764 of file Type.cpp.
References llvm::PointerType::get().
Referenced by combineLoadToNewType(), combineStoreToNewValue(), llvm::ConstantExpr::getAlignOf(), getDoublePtrTy(), getFloatPtrTy(), getFP128PtrTy(), llvm::ConstantExpr::getGetElementPtr(), getHalfPtrTy(), getInt16PtrTy(), getInt1PtrTy(), getInt32PtrTy(), getInt64PtrTy(), getInt8PtrTy(), getIntNPtrTy(), getPPC_FP128PtrTy(), getX86_FP80PtrTy(), getX86_MMXPtrTy(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), ScalarizeMaskedLoad(), ScalarizeMaskedStore(), StripPtrCastKeepAS(), tryPromoteAllocaToVector(), and llvm::UpgradeIntrinsicCall().
|
static |
Definition at line 267 of file Type.cpp.
References getPointerTo(), and getPPC_FP128Ty().
|
static |
Definition at line 233 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::PPC_FP128Ty.
Referenced by llvm::TypeBuilder< types::ppc_fp128, cross >::get(), llvm::ConstantFP::get(), getPPC_FP128PtrTy(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), LLVMPPCFP128TypeInContext(), and LookThroughFPExtensions().
| unsigned Type::getPrimitiveSizeInBits | ( | ) | const |
getPrimitiveSizeInBits - 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 121 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(), CollectBSwapParts(), CollectInsertionElements(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::DecodePSHUFBMask(), llvm::HexagonTargetLowering::emitLoadLinked(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), llvm::HexagonTargetLowering::emitStoreConditional(), llvm::AArch64TargetLowering::emitStoreConditional(), llvm::ARMTargetLowering::emitStoreConditional(), EvaluateGEPOffsetExpression(), FoldBitCast(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldICmpAddOpCst(), llvm::Constant::getAllOnesValue(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantDataSequential::getElementByteSize(), llvm::VectorType::getExtendedElementVectorType(), llvm::VectorType::getInteger(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), GetLinearExpression(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), getNoopInput(), llvm::NVPTXTargetLowering::getPrototype(), getScalarSizeInBits(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::VectorType::getTruncatedElementVectorType(), getTypeSizeIndex(), llvm::AArch64TargetLowering::hasPairedLoad(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), llvm::X86TTIImpl::isLegalMaskedLoad(), isMultipleOfTypeSize(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::AMDGPUTargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isZExtFree(), LinearizeExprTree(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), OptimizeIntToFloatBitCast(), OptimizeVectorResize(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), 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::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), llvm::HexagonTargetLowering::shouldExpandAtomicStoreInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicStoreInIR(), llvm::ARMTargetLowering::shouldExpandAtomicStoreInIR(), SimplifyICmpInst(), SwitchToLookupTable(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitTrunc().
|
static |
getPrimitiveType - Return a type based on an identifier.
Definition at line 26 of file Type.cpp.
References DoubleTyID, FloatTyID, FP128TyID, getDoubleTy(), getFloatTy(), getFP128Ty(), getHalfTy(), getLabelTy(), getMetadataTy(), getPPC_FP128Ty(), getVoidTy(), getX86_FP80Ty(), getX86_MMXTy(), HalfTyID, LabelTyID, MetadataTyID, PPC_FP128TyID, VoidTyID, X86_FP80TyID, and X86_MMXTyID.
| unsigned Type::getScalarSizeInBits | ( | ) | const |
getScalarSizeInBits - 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 139 of file Type.cpp.
References getPrimitiveSizeInBits(), and getScalarType().
Referenced by CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateTruncated(), CanEvaluateZExtd(), llvm::CastInst::castIsValid(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBits(), llvm::computeOverflowForUnsignedMul(), llvm::ConstantFoldInstOperands(), convertPointerToIntegerType(), llvm::CastInst::CreateFPCast(), llvm::CastInst::CreateIntegerCast(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrTrunc(), llvm::CastInst::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateZExtOrTrunc(), llvm::DecodeVPERMILPMask(), llvm::InstCombiner::FoldFCmp_IntToFP_Cst(), llvm::InstCombiner::FoldItoFPtoI(), llvm::InstCombiner::FoldShiftByConstant(), getBitWidth(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPTrunc(), llvm::ConstantExpr::getIntegerCast(), llvm::TargetTransformInfoImplBase::getOperationCost(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), GetShiftedValue(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::ARMTTIImpl::getVectorInstrCost(), getWiderType(), llvm::ConstantExpr::getZExt(), llvm::ConstantExpr::getZExtOrBitCast(), llvm::CastInst::isEliminableCastPair(), isKnownToBeAPowerOfTwo(), llvm::CastInst::isNoopCast(), llvm::X86TargetLowering::isVectorShiftByScalarCheap(), llvm::AMDGPUTargetLowering::isZExtFree(), SimplifyAShrInst(), SimplifyRightShift(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitPtrToInt(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitTrunc(), and llvm::InstCombiner::visitZExt().
getScalarType - If this is a vector type, return the element type, otherwise return 'this'.
Definition at line 51 of file Type.cpp.
Referenced by BuildNew(), canConvertValue(), canReplaceGEPIdxWithZero(), llvm::CastInst::castIsValid(), CoerceAvailableValueToLoadType(), computeKnownBits(), computeKnownBitsFromOperator(), ComputeNumSignBits(), ConcatenateTwoVectors(), llvm::ConstantFoldGetElementPtr(), ConstantFoldGetElementPtrImpl(), ConstructSSAForLoadSet(), convertValue(), llvm::GetElementPtrConstantExpr::Create(), llvm::GetElementPtrInst::Create(), llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::ConstantExpr::getAddrSpaceCast(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), getFalse(), llvm::getGEPInductionOperand(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantFP::getInfinity(), llvm::Constant::getIntegerValue(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::ConstantExpr::getIntToPtr(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::ConstantFP::getNaN(), llvm::ConstantFP::getNegativeZero(), getPointerAddressSpace(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantExpr::getPtrToInt(), getScalarSizeInBits(), GetStoreValueForLoad(), getTrue(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getVectorInstrCost(), hasSameExtUse(), llvm::haveNoCommonBitsSet(), llvm::CompositeType::indexValid(), isFPOrFPVectorTy(), isIntOrIntVectorTy(), isKnownNonZero(), isPtrOrPtrVectorTy(), llvm::Instruction::isSameOperationAs(), LinearizeExprTree(), SimplifyICmpInst(), stripAndComputeConstantOffsets(), SymbolicallyEvaluateBinop(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAddrSpaceCast(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSub(), and llvm::InstCombiner::visitZExt().
| Type * Type::getScalarType | ( | ) |
| Type * Type::getSequentialElementType | ( | ) | const |
Definition at line 204 of file Type.cpp.
Referenced by getArrayElementType(), llvm::ConstantDataSequential::getImpl(), getPointerElementType(), getVectorElementType(), and ReadDataFromGlobal().
Definition at line 200 of file Type.cpp.
Referenced by createCast(), isConstantUsingVectorTy(), and originalTypeIsF128().
| StringRef Type::getStructName | ( | ) | const |
| unsigned Type::getStructNumElements | ( | ) | const |
Definition at line 196 of file Type.cpp.
Referenced by createCast(), llvm::ConstantAggregateZero::getNumElements(), llvm::UndefValue::getNumElements(), isConstantUsingVectorTy(), originalTypeIsF128(), and whichFPReturnVariant().
|
inlineprotected |
Definition at line 101 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().
|
inline |
getTypeID - Return the type id for the type.
This will return one of the TypeID enum elements defined above.
Definition at line 134 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::isa_impl< PointerType, Type >::doit(), 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(), llvm::ExecutionEngine::getConstantValue(), llvm::EVT::getEVT(), getFltSemantics(), llvm::ConstantExpr::getFPExtend(), getFPMantissaWidth(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::Constant::getNullValue(), getPrimitiveSizeInBits(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getTrunc(), getTypeID(), getTypePrefix(), llvm::DataLayout::getTypeSizeInBits(), llvm::ConstantExpr::getUIToFP(), llvm::MVT::getVT(), llvm::ConstantExpr::getZExt(), hasUnaryFloatFn(), isAggregateType(), isArrayTy(), isDoubleTy(), isFirstClassType(), isFloatingPointTy(), isFloatTy(), isFP128Ty(), isFunctionTy(), isHalfTy(), isIntegerTy(), isLabelTy(), isLeakCheckerRoot(), llvm::XCoreTargetLowering::isLegalAddressingMode(), isMetadataTy(), isPointerTy(), isPPC_FP128Ty(), isSized(), isStructTy(), llvm::ConstantFP::isValueValidForType(), isVectorTy(), isVoidTy(), isX86_FP80Ty(), isX86_MMXTy(), llvm::ExecutionEngine::LoadValueFromMemory(), needsFPFromSig(), needsFPStubFromParams(), ReplaceFPIntrinsicWithCall(), llvm::Interpreter::run(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::MCJIT::runFunction(), setTypeID(), llvm::ExecutionEngine::StoreValueToMemory(), llvm::Interpreter::visitExtractElementInst(), llvm::Interpreter::visitExtractValueInst(), llvm::Interpreter::visitInsertElementInst(), llvm::Interpreter::visitInsertValueInst(), llvm::Interpreter::visitShuffleVectorInst(), llvm::Interpreter::visitVAArgInst(), whichFPParamVariantNeeded(), whichFPReturnVariant(), and WriteTypeTable().
|
inline |
Definition at line 364 of file Type.h.
References getSequentialElementType().
Referenced by llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), DecodeFixedType(), llvm::DecodePSHUFBMask(), llvm::DecodeVPERMILPMask(), FoldBitCast(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getInsertElement(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::ConstantExpr::getShuffleVector(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), SimplifyExtractElementInst(), llvm::UpgradeIntrinsicCall(), and WriteConstantInternal().
| unsigned Type::getVectorNumElements | ( | ) | const |
Definition at line 212 of file Type.cpp.
Referenced by BitCastConstantVector(), CheapToScalarize(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::CastInst::CreatePointerCast(), llvm::DecodePSHUFBMask(), llvm::DecodeVPERMILPMask(), EvaluateStoreInto(), llvm::findScalarElement(), FoldBitCast(), llvm::InstCombiner::FoldSelectOpOp(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ARMTTIImpl::getInterleavedMemoryOpCost(), llvm::AArch64TTIImpl::getInterleavedMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::ConstantExpr::getIntToPtr(), llvm::X86TTIImpl::getMaskedMemoryOpCost(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ConstantDataSequential::getNumElements(), llvm::ConstantExpr::getPtrToInt(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getReductionCost(), getScalarizationOverhead(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::ConstantExpr::getShuffleVector(), INITIALIZE_PASS_WITH_OPTIONS(), isFiniteNonZeroFp(), isNormalFp(), isUndefShift(), llvm::SITargetLowering::LowerFormalArguments(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), matchPairwiseReduction(), matchPairwiseShuffleMask(), matchVectorSplittingReduction(), ReadDataFromGlobal(), scalarConstantToHexString(), stripAndComputeConstantOffsets(), llvm::UpgradeIntrinsicCall(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitPtrToInt(), llvm::InstCombiner::visitSRem(), and WriteConstantInternal().
|
static |
Definition at line 225 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::VoidTy.
Referenced by llvm::IntrinsicLowering::AddPrototypes(), createFree(), llvm::createSanitizerCtorAndInitFunctions(), DecodeFixedType(), llvm::ARMSelectionDAGInfo::EmitSpecializedLibcall(), llvm::XCoreSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::AArch64SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), fixupFPReturnAndCall(), llvm::TypeBuilder< void, cross >::get(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), llvm::IRBuilderBase::getVoidTy(), InsertSafepointPoll(), insertUseHolderAfter(), LLVMVoidTypeInContext(), llvm::TargetLowering::LowerCallTo(), llvm::SparcTargetLowering::LowerF128Op(), llvm::IntrinsicLowering::LowerIntrinsicCall(), and llvm::Interpreter::visitReturnInst().
|
static |
Definition at line 259 of file Type.cpp.
References getPointerTo(), and getX86_FP80Ty().
|
static |
Definition at line 231 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::X86_FP80Ty.
Referenced by llvm::TypeBuilder< types::x86_fp80, cross >::get(), llvm::ConstantFP::get(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), getX86_FP80PtrTy(), and LLVMX86FP80TypeInContext().
|
static |
Definition at line 271 of file Type.cpp.
References getPointerTo(), and getX86_MMXTy().
|
static |
Definition at line 234 of file Type.cpp.
References llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::X86_MMXTy.
Referenced by DecodeFixedType(), llvm::TypeBuilder< types::x86_mmx, cross >::get(), getPrimitiveType(), llvm::EVT::getTypeForEVT(), getX86_MMXPtrTy(), and LLVMX86MMXTypeInContext().
|
inline |
isAggregateType - 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 260 of file Type.h.
References ArrayTyID, getTypeID(), and StructTyID.
Referenced by advanceToNextLeafType(), llvm::CastInst::castIsValid(), ConstantFoldLoadThroughBitcast(), firstRealType(), llvm::ExecutionEngine::getConstantValue(), llvm::NVPTXTargetLowering::getPrototype(), llvm::getStrideFromPointer(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerFormalArguments(), unpackLoadToAggregate(), and unpackStoreToAggregate().
|
inline |
isArrayTy - True if this is an instance of ArrayType.
Definition at line 213 of file Type.h.
References ArrayTyID, and getTypeID().
Referenced by AnalyzeLoadFromClobberingLoad(), AnalyzeLoadFromClobberingStore(), AnalyzeLoadFromClobberingWrite(), CanCoerceMustAliasedValueToLoad(), llvm::AArch64TargetLowering::emitStoreConditional(), EvaluateStoreInto(), llvm::FindInsertedValue(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::PPCTargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::ConstantAggregateZero::get(), isArray(), isConstantUsingVectorTy(), llvm::SCEVUnknown::isOffsetOf(), tryPromoteAllocaToVector(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type.
Definition at line 146 of file Type.h.
References DoubleTyID, and getTypeID().
Referenced by AppendTypeSuffix(), llvm::ConstantFoldCastInstruction(), ConstantFoldScalarCall(), emitDebugValueComment(), emitGlobalConstantDataSequential(), GetConstantFoldFPValue(), llvm::ExecutionEngine::getConstantValue(), llvm::ARMTTIImpl::getFPOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getValueAsDouble(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::ConstantDataSequential::isElementTypeCompatible(), isHomogeneousAggregate(), isTrigLibCall(), TypeToFloatSemantics(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitFCmpInst(), whichFPReturnVariant(), and WriteConstants().
| bool Type::isEmptyTy | ( | ) | const |
isEmptyTy - Return true if this type is empty, that is, it has no elements or all its elements are empty.
Definition at line 102 of file Type.cpp.
References llvm::dyn_cast(), llvm::StructType::getElementType(), llvm::SequentialType::getElementType(), llvm::StructType::getNumElements(), llvm::ArrayType::getNumElements(), and isEmptyTy().
Referenced by areGlobalsPotentiallyEqual(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), isEmptyTy(), llvm::FastISel::lowerCall(), llvm::SelectionDAGBuilder::lowerCallOperands(), llvm::FastISel::lowerCallTo(), llvm::SelectionDAGBuilder::LowerCallTo(), and llvm::FunctionLoweringInfo::set().
|
inline |
isFirstClassType - Return true if the type is "first class", meaning it is a valid type for a Value.
Definition at line 242 of file Type.h.
References FunctionTyID, getTypeID(), and VoidTyID.
Referenced by canLosslesslyBitCastTo(), canTrapImpl(), llvm::CastInst::castIsValid(), foldConstantCastPair(), llvm::CastInst::getCastOpcode(), llvm::ConstantExpr::getExtractValue(), getFoldedCast(), llvm::ConstantExpr::getInsertValue(), llvm::ExecutionEngine::InitializeMemory(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), llvm::FunctionType::isValidArgumentType(), and llvm::Value::Value().
|
inline |
isFloatingPointTy - Return true if this is one of the six floating point types
Definition at line 159 of file Type.h.
References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), HalfTyID, PPC_FP128TyID, and X86_FP80TyID.
Referenced by llvm::checkBinaryFloatSignature(), llvm::checkUnaryFloatSignature(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldLoadFromConstPtr(), FoldBitCast(), llvm::Constant::getAllOnesValue(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), getFPMantissaWidth(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::CastInst::isCastable(), llvm::CastInst::isEliminableCastPair(), isFPOrFPVectorTy(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), isSingleValueType(), isSized(), llvm::VectorType::isValidElementType(), llvm::NVPTXTargetLowering::LowerCall(), and TryToShrinkGlobalToBoolean().
|
inline |
isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type.
Definition at line 143 of file Type.h.
References FloatTyID, and getTypeID().
Referenced by AppendTypeSuffix(), llvm::ConstantFoldCastInstruction(), ConstantFoldScalarCall(), emitDebugValueComment(), emitGlobalConstantDataSequential(), executeFCMP_ORD(), executeFCMP_UNO(), GetConstantFoldFPValue(), llvm::ExecutionEngine::getConstantValue(), llvm::ARMTTIImpl::getFPOpCost(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), getValueAsDouble(), llvm::AArch64TargetLowering::hasPairedLoad(), llvm::ConstantDataSequential::isElementTypeCompatible(), isHomogeneousAggregate(), isTrigLibCall(), TypeToFloatSemantics(), valueHasFloatPrecision(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitFCmpInst(), whichFPReturnVariant(), and WriteConstants().
|
inline |
isFP128Ty - Return true if this is 'fp128'.
Definition at line 152 of file Type.h.
References FP128TyID, and getTypeID().
Referenced by llvm::ConstantFoldCastInstruction(), llvm::SparcTargetLowering::LowerF128_LibCallArg(), llvm::SparcTargetLowering::LowerF128Op(), originalTypeIsF128(), TypeToFloatSemantics(), llvm::InstCombiner::visitFCmpInst(), and WriteConstants().
|
inline |
isFPOrFPVectorTy - Return true if this is a FP type or a vector of FP.
Definition at line 183 of file Type.h.
References getScalarType(), and isFloatingPointTy().
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), llvm::CastInst::castIsValid(), llvm::FPMathOperator::classof(), llvm::CastInst::CreateFPCast(), llvm::ConstantExpr::get(), getDecodedBinaryOpcode(), llvm::ConstantExpr::getFNeg(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getUIToFP(), llvm::ConstantFP::getZeroValueForNegation(), and llvm::Constant::isNegativeZeroValue().
|
inline |
isFunctionTy - True if this is an instance of FunctionType.
Definition at line 205 of file Type.h.
References FunctionTyID, and getTypeID().
Referenced by llvm::TargetLoweringObjectFileCOFF::emitLinkerFlagsForGlobal(), llvm::PointerType::isLoadableOrStorableType(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), and llvm::FunctionType::isValidReturnType().
|
inline |
isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type.
Definition at line 140 of file Type.h.
References getTypeID(), and HalfTyID.
Referenced by llvm::ConstantFoldCastInstruction(), ConstantFoldScalarCall(), GetConstantFoldFPValue(), TypeToFloatSemantics(), llvm::InstCombiner::visitFCmpInst(), and WriteConstants().
|
inline |
isIntegerTy - True if this is an instance of IntegerType.
Definition at line 193 of file Type.h.
References getTypeID(), and IntegerTyID.
Referenced by llvm::HexagonTargetLowering::allowTruncateForTailCall(), llvm::ARMTargetLowering::allowTruncateForTailCall(), llvm::X86TargetLowering::allowTruncateForTailCall(), canConvertValue(), llvm::CastInst::castIsValid(), checkStringCopyLibFuncSignature(), CoerceAvailableValueToLoadType(), combineLoadToNewType(), combineLoadToOperationType(), llvm::InstCombiner::commonCastTransforms(), llvm::InstCombiner::commonIDivTransforms(), computeKnownBitsFromOperator(), llvm::ComputeMultiple(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCompareInstruction(), ConstantFoldGetElementPtrImpl(), ConstantFoldLoadThroughBitcast(), convertValue(), llvm::CastInst::CreateBitOrPointerCast(), llvm::IRBuilder< true, TargetFolder >::CreateBitOrPointerCast(), createCast(), llvm::DecodePSHUFBMask(), llvm::DecodeVPERMILPMask(), evaluateICmpRelation(), llvm::X86TargetLowering::ExpandInlineAsm(), ExtractConstantBytes(), FindCXAAtExit(), FoldBitCast(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), foldLogOpOfMaskedICmpsHelper(), foldSelectICmpAndOr(), FoldTwoEntryPHINode(), llvm::ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters(), getAdjustedPtr(), getAISize(), getAllocationData(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantInt::getFalse(), getFalse(), llvm::objcarc::GetFunctionClass(), llvm::ConstantExpr::getInsertElement(), llvm::SystemZTTIImpl::getIntImmCost(), llvm::PPCTTIImpl::getIntImmCost(), llvm::ARMTTIImpl::getIntImmCost(), llvm::AArch64TTIImpl::getIntImmCost(), llvm::X86TTIImpl::getIntImmCost(), llvm::ConstantExpr::getIntToPtr(), GetLinearExpression(), GetLoadValueForLoad(), llvm::AArch64TTIImpl::getMemoryOpCost(), getNaturalGEPWithOffset(), llvm::ScalarEvolution::getNoopOrAnyExtend(), llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), llvm::NVPTXTargetLowering::getPrototype(), llvm::ConstantExpr::getPtrToInt(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), GetStoreValueForLoad(), llvm::ConstantInt::getTrue(), getTrue(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), getUnderlyingObjectFromInt(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::AArch64TargetLowering::hasPairedLoad(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::CompositeType::indexValid(), llvm::isBytewiseValue(), llvm::CastInst::isCastable(), llvm::CastInst::isEliminableCastPair(), llvm::isInductionPHI(), llvm::CastInst::isIntegerCast(), isIntegerTy(), isIntExtFree(), isIntOrIntVectorTy(), llvm::ScalarEvolution::isSCEVable(), isSingleValueType(), llvm::ConstantDataSequential::isString(), llvm::MSP430TargetLowering::isTruncateFree(), llvm::AArch64TargetLowering::isTruncateFree(), llvm::SystemZTargetLowering::isTruncateFree(), llvm::PPCTargetLowering::isTruncateFree(), llvm::X86TargetLowering::isTruncateFree(), llvm::VectorType::isValidElementType(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::ConstantInt::isValueValidForType(), isVectorPromotionViable(), isVectorPromotionViableForSlice(), llvm::MSP430TargetLowering::isZExtFree(), llvm::AArch64TargetLowering::isZExtFree(), llvm::X86TargetLowering::isZExtFree(), LowerBSWAP(), llvm::NVPTXTargetLowering::LowerCall(), LowerCTPOP(), llvm::NVPTXTargetLowering::LowerReturn(), llvm::IntrinsicLowering::LowerToByteSwap(), MatchSelectFromAndOr(), originalTypeIsF128(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::X86TargetLowering::shouldConvertConstantLoadToIntImm(), SimplifyAddInst(), simplifyAllocaArraySize(), SimplifyDiv(), SimplifyICmpInst(), SimplifyMulInst(), SimplifyRem(), SimplifySubInst(), SymbolicallyEvaluateGEP(), llvm::AttributeFuncs::typeIncompatible(), llvm::UnrollRuntimeLoopProlog(), UpgradeX86IntrinsicsWith8BitMask(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitReturnInst(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitSub(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().
isIntegerTy - Return true if this is an IntegerType of the given width.
isIntegerTy - Return true if this is an IntegerType of the specified width.
Definition at line 58 of file Type.cpp.
References getBitWidth(), and isIntegerTy().
|
inline |
isIntOrIntVectorTy - Return true if this is an integer type or a vector of integer types.
Definition at line 201 of file Type.h.
References getScalarType(), and isIntegerTy().
Referenced by buildMultiplyTree(), llvm::CastInst::castIsValid(), computeKnownBits(), CreateAdd(), llvm::CastInst::CreateIntegerCast(), CreateMul(), CreateNeg(), llvm::CastInst::CreatePointerCast(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrTrunc(), llvm::IRBuilder< true, TargetFolder >::CreateZExtOrTrunc(), llvm::ConstantExpr::get(), getDecodedBinaryOpcode(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getNeg(), llvm::ConstantExpr::getNot(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getUIToFP(), llvm::ConstantExpr::getZExt(), llvm::haveNoCommonBitsSet(), llvm::CompositeType::indexValid(), llvm::CastInst::isEliminableCastPair(), LowerNegateToMultiply(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitICmpInst(), and llvm::InstCombiner::visitOr().
|
inline |
isLabelTy - Return true if this is 'label'.
Definition at line 186 of file Type.h.
References getTypeID(), and LabelTyID.
Referenced by llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), and llvm::FunctionType::isValidReturnType().
|
inline |
isMetadataTy - Return true if this is 'metadata'.
Definition at line 189 of file Type.h.
References getTypeID(), and MetadataTyID.
Referenced by llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), and llvm::FunctionType::isValidReturnType().
|
inline |
isPointerTy - True if this is an instance of PointerType.
Definition at line 217 of file Type.h.
References getTypeID(), and PointerTyID.
Referenced by BuildConstantFromSCEV(), canConvertValue(), llvm::CastInst::castIsValid(), checkStringCopyLibFuncSignature(), CoerceAvailableValueToLoadType(), collectUsesWithPtrTypes(), combineLoadToNewType(), computeKnownBits(), computeKnownBitsFromOperator(), ConstantFoldLoadThroughBitcast(), ConstructSSAForLoadSet(), convertPointerToIntegerType(), convertValue(), llvm::CastInst::CreateBitOrPointerCast(), llvm::IRBuilder< true, TargetFolder >::CreateBitOrPointerCast(), createCast(), createFree(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::EmitFPutC(), llvm::EmitFPutS(), llvm::EmitFWrite(), evaluateICmpRelation(), findBaseDefiningValue(), FindCXAAtExit(), FindLoopCounter(), FoldBitCast(), genLoopLimit(), getAdjustedPtr(), llvm::CastInst::getCastOpcode(), GetConstantInt(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getEffectiveSCEVType(), llvm::DataLayout::getIndexedOffset(), getIndexedTypeInternal(), llvm::ConstantExpr::getIntToPtr(), llvm::AliasAnalysis::getModRefInfo(), getNaturalGEPRecursively(), getNaturalGEPWithType(), llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(), llvm::ScalarEvolution::getNoopOrAnyExtend(), llvm::ScalarEvolution::getNoopOrSignExtend(), llvm::ScalarEvolution::getNoopOrZeroExtend(), llvm::TargetTransformInfoImplBase::getOperationCost(), llvm::getOrEnforceKnownAlignment(), llvm::ScalarEvolution::getPointerBase(), llvm::DataLayout::getPointerTypeSizeInBits(), llvm::ConstantExpr::getPtrToInt(), llvm::SelectionDAG::getSrcValue(), GetStoreValueForLoad(), llvm::GetStringLength(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), llvm::GetUnderlyingObject(), getUnderlyingObjects(), llvm::HexagonEvaluator::HexagonEvaluator(), llvm::MemoryDependenceAnalysis::invalidateCachedPointerInfo(), llvm::CastInst::isCastable(), isCompatibleIVType(), isGEPKnownNonNull(), llvm::isInductionPHI(), isInterestingPointer(), isKnownNonZero(), llvm::CastInst::isLosslessCast(), isNoopBitcast(), isPointerOperand(), isPtrOrPtrVectorTy(), llvm::ScalarEvolution::isSCEVable(), isSingleValueType(), llvm::isStridedPtr(), llvm::VectorType::isValidElementType(), llvm::NVPTXTargetLowering::LowerCall(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), OptimizeOnceStoredGlobal(), llvm::PointerMayBeCaptured(), promoteSingleBlockAlloca(), llvm::MemoryDependenceAnalysis::removeInstruction(), llvm::SCEVExpander::replaceCongruentIVs(), rewriteSingleStoreAlloca(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::MCJIT::runFunction(), SimplifyBranchOnICmpChain(), SimplifyICmpInst(), llvm::Value::stripAndAccumulateInBoundsConstantOffsets(), stripAndComputeConstantOffsets(), StripPtrCastKeepAS(), swapMayExposeCSEOpportunities(), SymbolicallyEvaluateGEP(), TryToShrinkGlobalToBoolean(), llvm::AttributeFuncs::typeIncompatible(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitICmpInst(), and llvm::PtrUseVisitor< SliceBuilder >::visitPtr().
|
inline |
isPPC_FP128Ty - Return true if this is powerpc long double.
Definition at line 155 of file Type.h.
References getTypeID(), and PPC_FP128TyID.
Referenced by llvm::ConstantFoldCastInstruction(), emitGlobalConstantFP(), FoldBitCast(), llvm::Constant::getAllOnesValue(), TypeToFloatSemantics(), llvm::InstCombiner::visitFCmpInst(), and WriteConstants().
|
inline |
isPtrOrPtrVectorTy - Return true if this is a pointer type or a vector of pointer types.
Definition at line 222 of file Type.h.
References getScalarType(), and isPointerTy().
Referenced by llvm::CastInst::CreatePointerBitCastOrAddrSpaceCast(), llvm::CastInst::CreatePointerCast(), FoldBitCast(), llvm::DataLayout::getIntPtrType(), llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(), llvm::ConstantExpr::getPointerCast(), llvm::DataLayout::getPointerTypeSizeInBits(), isEliminableCastPair(), llvm::CastInst::isEliminableCastPair(), llvm::UpgradeBitCastExpr(), and llvm::UpgradeBitCastInst().
|
inline |
isSingleValueType - 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(), getOpenCLAlignment(), llvm::TargetLowering::ParseConstraints(), reduceToSingleValueType(), and stripAggregateTypeWrapping().
|
inline |
isSized - 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 268 of file Type.h.
References ArrayTyID, getTypeID(), IntegerTyID, isFloatingPointTy(), PointerTyID, StructTyID, VectorTyID, and X86_MMXTyID.
Referenced by areGlobalsPotentiallyEqual(), combineLoadToOperationType(), computeArraySize(), computeKnownBits(), computeKnownBitsFromOperator(), DecomposeGEPExpression(), FoldReinterpretLoadFromConstPtr(), getIndexedTypeInternal(), getNaturalGEPWithOffset(), llvm::DataLayout::getTypeSizeInBits(), isDereferenceableFromAttribute(), llvm::isDereferenceablePointer(), isDereferenceablePointer(), llvm::AArch64TargetLowering::isLegalAddressingMode(), isSafeToEliminateVarargsCast(), llvm::isSafeToLoadUnconditionally(), IsSmallObject(), llvm::TargetLowering::ParseConstraints(), llvm::XCoreTargetObjectFile::SelectSectionForGlobal(), SimplifyGEPInst(), SymbolicallyEvaluateGEP(), TryToOptimizeStoreOfMallocToGlobal(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::ObjectSizeOffsetEvaluator::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
isStructTy - True if this is an instance of StructType.
Definition at line 209 of file Type.h.
References getTypeID(), and StructTyID.
Referenced by AnalyzeLoadFromClobberingLoad(), AnalyzeLoadFromClobberingStore(), AnalyzeLoadFromClobberingWrite(), CanCoerceMustAliasedValueToLoad(), createCast(), llvm::FindInsertedValue(), llvm::ConstantAggregateZero::get(), insertSinCosCall(), isConstantUsingVectorTy(), llvm::SCEVUnknown::isOffsetOf(), false::next_type(), false::operator<<(), originalTypeIsF128(), llvm::Value::Value(), llvm::InlineAsm::Verify(), and llvm::InstCombiner::visitGetElementPtrInst().
|
inline |
isVectorTy - True if this is an instance of VectorType.
Definition at line 226 of file Type.h.
References getTypeID(), and VectorTyID.
Referenced by llvm::ARMTargetLowering::canCombineStoreAndExtract(), llvm::CastInst::castIsValid(), CollectShuffleElements(), computeKnownBitsFromOperator(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), convertValue(), llvm::CastInst::CreatePointerCast(), llvm::DecodePSHUFBMask(), llvm::DecodeVPERMILPMask(), executeFCMP_BOOL(), executeFCMP_ONE(), executeFCMP_ORD(), executeFCMP_UNO(), executeSelectInst(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), findBaseDefiningValue(), findBaseDefiningValueOfVector(), FindLIVLoopCondition(), llvm::findScalarElement(), foldLogOpOfMaskedICmpsHelper(), llvm::InstCombiner::FoldSelectOpOp(), llvm::ConstantAggregateZero::get(), llvm::X86TTIImpl::getAddressComputationCost(), llvm::ARMTTIImpl::getAddressComputationCost(), llvm::AArch64TTIImpl::getAddressComputationCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::ARMTTIImpl::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::CastInst::getCastOpcode(), llvm::ARMTTIImpl::getCmpSelInstrCost(), llvm::AArch64TTIImpl::getCmpSelInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), llvm::ConstantExpr::getExtractElement(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getInsertElement(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::PPCTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::ARMTTIImpl::getMemoryOpCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), llvm::GetPointerBaseWithConstantOffset(), llvm::NVPTXTargetLowering::getPrototype(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getReductionCost(), getScalarizationOverhead(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), getUniformBase(), llvm::TargetLoweringBase::getValueType(), llvm::X86TTIImpl::getVectorInstrCost(), llvm::PPCTTIImpl::getVectorInstrCost(), llvm::AArch64TTIImpl::getVectorInstrCost(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::CompositeType::indexValid(), llvm::CastInst::isCastable(), isConstantUsingVectorTy(), llvm::CastInst::isEliminableCastPair(), isFiniteNonZeroFp(), isIntExtFree(), llvm::PPCTargetLowering::isLegalAddressingMode(), isNormalFp(), isSingleValueType(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerFormalArguments(), matchPairwiseReductionAtLevel(), shouldConvert(), stripAndComputeConstantOffsets(), ThreadCmpOverSelect(), tryPromoteAllocaToVector(), TryToShrinkGlobalToBoolean(), llvm::Interpreter::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitExtractElementInst(), llvm::Interpreter::visitInsertElementInst(), llvm::InstCombiner::visitIntToPtr(), llvm::Interpreter::visitLShr(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPtrToInt(), llvm::Interpreter::visitShl(), llvm::Interpreter::visitShuffleVectorInst(), and llvm::InstCombiner::visitTrunc().
|
inline |
isVoidTy - Return true if this is 'void'.
Definition at line 137 of file Type.h.
References getTypeID(), and VoidTyID.
Referenced by llvm::AllocaInst::AllocaInst(), llvm::ComputeValueVTs(), createMalloc(), determinePointerReadAttrs(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getMemoryOpCost(), getRetComponentType(), getScalarizationOverhead(), llvm::Intrinsic::getType(), HoistThenElseCodeToIf(), llvm::isFreeCall(), llvm::StructType::isValidElementType(), llvm::ArrayType::isValidElementType(), llvm::PointerType::isValidElementType(), lowerCallFromStatepoint(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::orc::makeStub(), NumRetVals(), llvm::TargetLowering::ParseConstraints(), llvm::PointerMayBeCaptured(), removeLifetimeIntrinsicUsers(), ReplaceWithStatepoint(), llvm::orc::OrcMCJITReplacement::runFunction(), llvm::MCJIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::FastISel::selectPatchpoint(), llvm::FastISel::selectStackmap(), llvm::Value::Value(), and llvm::InlineAsm::Verify().
|
inline |
isX86_FP80Ty - Return true if this is x86 long double.
Definition at line 149 of file Type.h.
References getTypeID(), and X86_FP80TyID.
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ExecutionEngine::getConstantValue(), TypeToFloatSemantics(), llvm::InstCombiner::visitFCmpInst(), and WriteConstants().
|
inline |
isX86_MMXTy - Return true if this is X86 MMX.
Definition at line 179 of file Type.h.
References getTypeID(), and X86_MMXTyID.
Referenced by llvm::ConstantFoldCastInstruction(), FoldBitCast(), llvm::CastInst::getCastOpcode(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::CastInst::isBitCastable(), llvm::CastInst::isCastable(), and isSingleValueType().
| void Type::print | ( | raw_ostream & | O | ) | const |
Definition at line 3186 of file AsmWriter.cpp.
References llvm::StructType::isLiteral().
Referenced by dump(), emitGlobalConstantFP(), and llvm::operator<<().
|
inlineprotected |
Definition at line 103 of file Type.h.
References getSubclassData().
Referenced by llvm::StructType::get(), llvm::IntegerType::IntegerType(), llvm::StructType::isSized(), and llvm::StructType::setBody().
|
inlineprotected |
|
inline |
Definition at line 314 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 315 of file Type.h.
References ContainedTys, and NumContainedTys.
Referenced by llvm::GraphTraits< Type * >::child_end(), llvm::GraphTraits< const Type * >::child_end(), subtype_rbegin(), and subtypes().
|
inline |
Definition at line 321 of file Type.h.
References subtype_end().
|
inline |
Definition at line 324 of file Type.h.
References subtype_begin().
Definition at line 316 of file Type.h.
References llvm::makeArrayRef(), subtype_begin(), and subtype_end().
|
friend |
ContainedTys - 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 118 of file Type.h.
Referenced by llvm::StructType::element_begin(), llvm::StructType::element_end(), getContainedType(), llvm::StructType::getElementType(), llvm::SequentialType::getElementType(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), llvm::StructType::setBody(), subtype_begin(), and subtype_end().
|
protected |
NumContainedTys - Keeps track of how many Type*'s there are in the ContainedTys list.
Definition at line 111 of file Type.h.
Referenced by llvm::StructType::element_end(), getContainedType(), llvm::StructType::getElementType(), getNumContainedTypes(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), llvm::StructType::setBody(), and subtype_end().
1.8.6