LLVM  mainline
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
llvm::Type Class Reference

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

#include <Type.h>

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

List of all members.

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 *constsubtype_iterator
typedef std::reverse_iterator
< subtype_iterator
subtype_reverse_iterator

Public Member Functions

void print (raw_ostream &O) const
void dump () const
LLVMContextgetContext () const
 getContext - Return the LLVMContext in which this type was uniqued.
TypeID getTypeID () const
 getTypeID - Return the type id for the type.
bool isVoidTy () const
 isVoidTy - Return true if this is 'void'.
bool isHalfTy () const
 isHalfTy - Return true if this is 'half', a 16-bit IEEE fp type.
bool isFloatTy () const
 isFloatTy - Return true if this is 'float', a 32-bit IEEE fp type.
bool isDoubleTy () const
 isDoubleTy - Return true if this is 'double', a 64-bit IEEE fp type.
bool isX86_FP80Ty () const
 isX86_FP80Ty - Return true if this is x86 long double.
bool isFP128Ty () const
 isFP128Ty - Return true if this is 'fp128'.
bool isPPC_FP128Ty () const
 isPPC_FP128Ty - Return true if this is powerpc long double.
bool isFloatingPointTy () const
 isFloatingPointTy - Return true if this is one of the six floating point types
const fltSemanticsgetFltSemantics () const
bool isX86_MMXTy () const
 isX86_MMXTy - Return true if this is X86 MMX.
bool isFPOrFPVectorTy () const
 isFPOrFPVectorTy - Return true if this is a FP type or a vector of FP.
bool isLabelTy () const
 isLabelTy - Return true if this is 'label'.
bool isMetadataTy () const
 isMetadataTy - Return true if this is 'metadata'.
bool isIntegerTy () const
 isIntegerTy - True if this is an instance of IntegerType.
bool isIntegerTy (unsigned Bitwidth) const
 isIntegerTy - Return true if this is an IntegerType of the given width.
bool isIntOrIntVectorTy () const
 isIntOrIntVectorTy - Return true if this is an integer type or a vector of integer types.
bool isFunctionTy () const
 isFunctionTy - True if this is an instance of FunctionType.
bool isStructTy () const
 isStructTy - True if this is an instance of StructType.
bool isArrayTy () const
 isArrayTy - True if this is an instance of ArrayType.
bool isPointerTy () const
 isPointerTy - True if this is an instance of PointerType.
bool isPtrOrPtrVectorTy () const
 isPtrOrPtrVectorTy - Return true if this is a pointer type or a vector of pointer types.
bool isVectorTy () const
 isVectorTy - True if this is an instance of VectorType.
bool canLosslesslyBitCastTo (Type *Ty) const
 canLosslesslyBitCastTo - Return true if this type could be converted with a lossless BitCast to type 'Ty'.
bool isEmptyTy () const
 isEmptyTy - Return true if this type is empty, that is, it has no elements or all its elements are empty.
bool isFirstClassType () const
 isFirstClassType - Return true if the type is "first class", meaning it is a valid type for a Value.
bool isSingleValueType () const
 isSingleValueType - Return true if the type is a valid type for a register in codegen.
bool isAggregateType () const
 isAggregateType - Return true if the type is an aggregate type.
bool isSized (SmallPtrSetImpl< const Type * > *Visited=nullptr) const
 isSized - Return true if it makes sense to take the size of this type.
unsigned getPrimitiveSizeInBits () const LLVM_READONLY
 getPrimitiveSizeInBits - Return the basic size of this type if it is a primitive type.
unsigned getScalarSizeInBits () const LLVM_READONLY
 getScalarSizeInBits - If this is a vector type, return the getPrimitiveSizeInBits value for the element type.
int getFPMantissaWidth () const
 getFPMantissaWidth - Return the width of the mantissa of this type.
const TypegetScalarType () const LLVM_READONLY
 getScalarType - If this is a vector type, return the element type, otherwise return 'this'.
TypegetScalarType () LLVM_READONLY
 getScalarType - If this is a vector type, return the element type, otherwise return this.
subtype_iterator subtype_begin () const
subtype_iterator subtype_end () const
ArrayRef< Type * > subtypes () const
subtype_reverse_iterator subtype_rbegin () const
subtype_reverse_iterator subtype_rend () const
TypegetContainedType (unsigned i) const
 getContainedType - This method is used to implement the type iterator (defined at the end of the file).
unsigned getNumContainedTypes () const
 getNumContainedTypes - Return the number of types in the derived type.
unsigned getIntegerBitWidth () const
TypegetFunctionParamType (unsigned i) const
unsigned getFunctionNumParams () const
bool isFunctionVarArg () const
StringRef getStructName () const
unsigned getStructNumElements () const
TypegetStructElementType (unsigned N) const
TypegetSequentialElementType () const
uint64_t getArrayNumElements () const
TypegetArrayElementType () const
unsigned getVectorNumElements () const
TypegetVectorElementType () const
TypegetPointerElementType () const
unsigned getPointerAddressSpace () const
 Get the address space of this pointer or pointer vector type.
PointerTypegetPointerTo (unsigned AddrSpace=0)
 getPointerTo - Return a pointer to the current type.

Static Public Member Functions

static TypegetPrimitiveType (LLVMContext &C, TypeID IDNumber)
 getPrimitiveType - Return a type based on an identifier.
static TypegetVoidTy (LLVMContext &C)
static TypegetLabelTy (LLVMContext &C)
static TypegetHalfTy (LLVMContext &C)
static TypegetFloatTy (LLVMContext &C)
static TypegetDoubleTy (LLVMContext &C)
static TypegetMetadataTy (LLVMContext &C)
static TypegetX86_FP80Ty (LLVMContext &C)
static TypegetFP128Ty (LLVMContext &C)
static TypegetPPC_FP128Ty (LLVMContext &C)
static TypegetX86_MMXTy (LLVMContext &C)
static IntegerTypegetIntNTy (LLVMContext &C, unsigned N)
static IntegerTypegetInt1Ty (LLVMContext &C)
static IntegerTypegetInt8Ty (LLVMContext &C)
static IntegerTypegetInt16Ty (LLVMContext &C)
static IntegerTypegetInt32Ty (LLVMContext &C)
static IntegerTypegetInt64Ty (LLVMContext &C)
static IntegerTypegetInt128Ty (LLVMContext &C)
static PointerTypegetHalfPtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetFloatPtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetDoublePtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetX86_FP80PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetFP128PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetPPC_FP128PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetX86_MMXPtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetIntNPtrTy (LLVMContext &C, unsigned N, unsigned AS=0)
static PointerTypegetInt1PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetInt8PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetInt16PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetInt32PtrTy (LLVMContext &C, unsigned AS=0)
static PointerTypegetInt64PtrTy (LLVMContext &C, unsigned AS=0)

Protected Member Functions

 Type (LLVMContext &C, TypeID tid)
 ~Type ()
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.
Type *constContainedTys
 ContainedTys - A pointer to the array of Types contained by this Type.

Friends

class LLVMContextImpl

Detailed Description

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

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

Definition at line 45 of file Type.h.


Member Typedef Documentation

Definition at line 313 of file Type.h.

Definition at line 320 of file Type.h.


Member Enumeration Documentation

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

Definition at line 54 of file Type.h.


Constructor & Destructor Documentation

llvm::Type::Type ( LLVMContext C,
TypeID  tid 
) [inline, explicit, protected]

Definition at line 89 of file Type.h.

References setTypeID().

llvm::Type::~Type ( ) [protected]

Member Function Documentation

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
uint64_t Type::getArrayNumElements ( ) const
Type* llvm::Type::getContainedType ( unsigned  i) const [inline]

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().

LLVMContext& llvm::Type::getContext ( ) const [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().

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

Definition at line 255 of file Type.cpp.

References getDoubleTy(), and getPointerTo().

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

Definition at line 251 of file Type.cpp.

References getFloatTy(), and getPointerTo().

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

Definition at line 263 of file Type.cpp.

References getFP128Ty(), and getPointerTo().

Type * Type::getFP128Ty ( LLVMContext C) [static]

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().

Definition at line 188 of file Type.cpp.

Definition at line 184 of file Type.cpp.

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

Definition at line 247 of file Type.cpp.

References getHalfTy(), and getPointerTo().

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

Definition at line 287 of file Type.cpp.

References getInt16Ty(), and getPointerTo().

Referenced by FoldReinterpretLoadFromConstPtr().

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

Definition at line 279 of file Type.cpp.

References getInt1Ty(), and getPointerTo().

Referenced by llvm::SCEVExpander::getIVIncOperand(), and llvm::InstCombiner::visitFree().

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

Definition at line 291 of file Type.cpp.

References getInt32Ty(), and getPointerTo().

Referenced by FoldReinterpretLoadFromConstPtr().

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::ARMTargetLowering::emitStoreConditional(), emitThumb1LoadConstPool(), emitThumb2LoadConstPool(), findBasePointer(), FoldBitCast(), llvm::IntegerType::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), getAISize(), llvm::ConstantExpr::getAlignOf(), llvm::DataLayout::getIndexedOffset(), getInt32PtrTy(), llvm::ConstantExpr::getOffsetOf(), getPromotedType(), llvm::ConstantExpr::getSizeOf(), llvm::EVT::getTypeForEVT(), llvm::isBytewiseValue(), LLVMBuildArrayMalloc(), LLVMBuildMalloc(), LLVMInt32TypeInContext(), llvm::XCoreInstrInfo::loadImmediate(), 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().

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

Definition at line 295 of file Type.cpp.

References getInt64Ty(), and getPointerTo().

Referenced by FoldReinterpretLoadFromConstPtr().

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

Definition at line 275 of file Type.cpp.

References getIntNTy(), and getPointerTo().

Referenced by FoldReinterpretLoadFromConstPtr().

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

Definition at line 226 of file Type.cpp.

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

Referenced by getPrimitiveType(), and LLVMLabelTypeInContext().

Type * Type::getMetadataTy ( LLVMContext C) [static]

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().

PointerType * Type::getPointerTo ( unsigned  AddrSpace = 0)
PointerType * Type::getPPC_FP128PtrTy ( LLVMContext C,
unsigned  AS = 0 
) [static]

Definition at line 267 of file Type.cpp.

References getPointerTo(), and getPPC_FP128Ty().

Type * Type::getPPC_FP128Ty ( LLVMContext C) [static]

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::CastInst::castIsValid(), CollectBSwapParts(), CollectInsertionElements(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::DecodePSHUFBMask(), llvm::AArch64TargetLowering::emitLoadLinked(), llvm::ARMTargetLowering::emitLoadLinked(), 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::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::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::AArch64TargetLowering::shouldExpandAtomicLoadInIR(), llvm::ARMTargetLowering::shouldExpandAtomicLoadInIR(), llvm::AArch64TargetLowering::shouldExpandAtomicRMWInIR(), llvm::ARMTargetLowering::shouldExpandAtomicRMWInIR(), 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().

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

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(), 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(), getGEPInductionOperand(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantFP::getInfinity(), llvm::Constant::getIntegerValue(), 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(), llvm::AMDGPUTargetLowering::isZExtFree(), 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().

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

Definition at line 45 of file Type.cpp.

Definition at line 200 of file Type.cpp.

Referenced by createCast(), isConstantUsingVectorTy(), and originalTypeIsF128().

Definition at line 192 of file Type.cpp.

References getName().

unsigned llvm::Type::getSubclassData ( ) const [inline, protected]
TypeID llvm::Type::getTypeID ( ) const [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().

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(), FindScalarElement(), FoldBitCast(), llvm::InstCombiner::FoldSelectOpOp(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getArithmeticInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCastInstrCost(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getCmpSelInstrCost(), llvm::ConstantExpr::getGetElementPtr(), 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(), matchPairwiseReduction(), matchPairwiseShuffleMask(), matchVectorSplittingReduction(), ReadDataFromGlobal(), stripAndComputeConstantOffsets(), llvm::UpgradeIntrinsicCall(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitPtrToInt(), llvm::InstCombiner::visitSRem(), and WriteConstantInternal().

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

Definition at line 259 of file Type.cpp.

References getPointerTo(), and getX86_FP80Ty().

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

Definition at line 271 of file Type.cpp.

References getPointerTo(), and getX86_MMXTy().

Type * Type::getX86_MMXTy ( LLVMContext C) [static]
bool llvm::Type::isAggregateType ( ) const [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(), getStrideFromPointer(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::NVPTXTargetLowering::LowerCall(), llvm::NVPTXTargetLowering::LowerFormalArguments(), unpackLoadToAggregate(), and unpackStoreToAggregate().

bool llvm::Type::isArrayTy ( ) const [inline]
bool llvm::Type::isDoubleTy ( ) const [inline]
bool Type::isEmptyTy ( ) const
bool llvm::Type::isFirstClassType ( ) const [inline]
bool llvm::Type::isFloatingPointTy ( ) const [inline]
bool llvm::Type::isFloatTy ( ) const [inline]
bool llvm::Type::isFP128Ty ( ) const [inline]
bool llvm::Type::isFPOrFPVectorTy ( ) const [inline]
bool llvm::Type::isFunctionTy ( ) const [inline]

Definition at line 180 of file Type.cpp.

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

bool llvm::Type::isIntegerTy ( ) const [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(), 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(), 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::TargetLowering::getSingleConstraintMatchWeight(), GetStoreValueForLoad(), llvm::ConstantInt::getTrue(), getTrue(), llvm::ScalarEvolution::getTruncateOrNoop(), llvm::ScalarEvolution::getTruncateOrSignExtend(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), getUnderlyingObjectFromInt(), llvm::ARMTTIImpl::getVectorInstrCost(), llvm::AArch64TargetLowering::hasPairedLoad(), 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::VectorType::isValidElementType(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), llvm::ConstantInt::isValueValidForType(), isVectorPromotionViable(), isVectorPromotionViableForSlice(), llvm::MSP430TargetLowering::isZExtFree(), llvm::AArch64TargetLowering::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(), scalarConstantToHexString(), llvm::AArch64TargetLowering::shouldConvertConstantLoadToIntImm(), llvm::ARMTargetLowering::shouldConvertConstantLoadToIntImm(), llvm::PPCTargetLowering::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().

bool Type::isIntegerTy ( unsigned  Bitwidth) const

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().

bool llvm::Type::isLabelTy ( ) const [inline]
bool llvm::Type::isMetadataTy ( ) const [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().

bool llvm::Type::isPointerTy ( ) const [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::TargetLoweringBase::getPointerTypeSizeInBits(), 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::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(), 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().

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

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

bool llvm::Type::isSized ( SmallPtrSetImpl< const Type * > *  Visited = nullptr) const [inline]
bool llvm::Type::isStructTy ( ) const [inline]
bool llvm::Type::isVectorTy ( ) const [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(), findBaseOfVector(), FindLIVLoopCondition(), 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::ARMTTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::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::ARMTTIImpl::getVectorInstrCost(), llvm::AArch64TTIImpl::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().

bool llvm::Type::isVoidTy ( ) const [inline]
bool llvm::Type::isX86_FP80Ty ( ) const [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().

bool llvm::Type::isX86_MMXTy ( ) const [inline]
void Type::print ( raw_ostream O) const

Definition at line 3143 of file AsmWriter.cpp.

References llvm::StructType::isLiteral().

Referenced by dump(), emitGlobalConstantFP(), and llvm::operator<<().

void llvm::Type::setSubclassData ( unsigned  val) [inline, protected]
void llvm::Type::setTypeID ( TypeID  ID) [inline, protected]

Definition at line 96 of file Type.h.

References getTypeID().

Referenced by Type().

Definition at line 321 of file Type.h.

References subtype_end().

Definition at line 324 of file Type.h.

References subtype_begin().

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

Definition at line 316 of file Type.h.

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


Friends And Related Function Documentation

friend class LLVMContextImpl [friend]

Reimplemented in llvm::IntegerType.

Definition at line 88 of file Type.h.


Member Data Documentation

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().


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