LLVM API Documentation
#include <Type.h>
Inheritance diagram for llvm::Type:
Public Types | |
enum | TypeID { VoidTyID = 0, BoolTyID, UByteTyID, SByteTyID, UShortTyID, ShortTyID, UIntTyID, IntTyID, ULongTyID, LongTyID, FloatTyID, DoubleTyID, LabelTyID, FunctionTyID, StructTyID, ArrayTyID, PointerTyID, OpaqueTyID, PackedTyID, NumTypeIDs, LastPrimitiveTyID = LabelTyID, FirstDerivedTyID = FunctionTyID } |
typedef std::vector< PATypeHandle >::const_iterator | subtype_iterator |
typedef std::vector< PATypeHandle >::size_type | size_type |
Public Member Functions | |
void | print (std::ostream &O) const |
void | dump () const |
Debugging support: print to stderr. | |
TypeID | getTypeID () const |
const std::string & | getDescription () const |
getDescription - Return the string representation of the type... | |
bool | isSigned () const |
bool | isUnsigned () const |
bool | isInteger () const |
bool | isIntegral () const |
bool | isFloatingPoint () const |
bool | isAbstract () const |
bool | isLosslesslyConvertibleTo (const Type *Ty) const |
bool | isPrimitiveType () const |
bool | isDerivedType () const |
bool | isFirstClassType () const |
bool | isSized () const |
unsigned | getPrimitiveSize () const |
unsigned | getPrimitiveSizeInBits () const |
const Type * | getUnsignedVersion () const |
const Type * | getSignedVersion () const |
uint64_t | getIntegralTypeMask () const |
const Type * | getForwardedType () const |
const Type * | getVAArgsPromotedType () const |
subtype_iterator | subtype_begin () const |
subtype_iterator | subtype_end () const |
const Type * | getContainedType (unsigned i) const |
size_type | getNumContainedTypes () const |
void | addRef () const |
void | dropRef () const |
void | addAbstractTypeUser (AbstractTypeUser *U) const |
void | removeAbstractTypeUser (AbstractTypeUser *U) const |
Static Public Member Functions | |
static const Type * | getPrimitiveType (TypeID IDNumber) |
getPrimitiveType - Return a type based on an identifier. | |
static bool | classof (const Type *T) |
Methods for support type inquiry through isa, cast, and dyn_cast:. | |
static void | clearAllTypeMaps () |
Static Public Attributes | |
static Type * | VoidTy |
static Type * | BoolTy |
static Type * | SByteTy |
static Type * | UByteTy |
static Type * | ShortTy |
static Type * | UShortTy |
static Type * | IntTy |
static Type * | UIntTy |
static Type * | LongTy |
static Type * | ULongTy |
static Type * | FloatTy |
static Type * | DoubleTy |
static Type * | LabelTy |
Protected Member Functions | |
Type (const char *Name, TypeID id) | |
Type (TypeID id) | |
virtual | ~Type () |
void | setAbstract (bool Val) |
unsigned | getRefCount () const |
void | PromoteAbstractToConcrete () |
Protected Attributes | |
const Type * | ForwardType |
std::vector< PATypeHandle > | ContainedTys |
std::vector< AbstractTypeUser * > | AbstractTypeUsers |
Friends | |
class | TypeMapBase |
This file contains the declaration of the Type class. For more "Type" type stuff, look in DerivedTypes.h.
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, unless they are an abstract type that is resolved to a more concrete type.
Types themself don't have a name, and can be named either by:
Opaque types are simple derived types with no state. There may be many different Opaque type objects floating around, but two are only considered identical if they are pointer equals of each other. This allows us to have two opaque types that end up resolving to different concrete types later.
Opaque types are also kinda weird and scary and different because they have to keep a list of uses of the type. When, through linking, parsing, or bytecode reading, they become resolved, they need to find and update all users of the unknown type, causing them to reference a new, more concrete type. Opaque types are deleted when their use list dwindles to zero users.
Definition at line 63 of file Type.h.
typedef std::vector<PATypeHandle>::const_iterator llvm::Type::subtype_iterator |
typedef std::vector<PATypeHandle>::size_type llvm::Type::size_type |
enum llvm::Type::TypeID |
===-------------------------------------------------------------------===// Definitions of all of the base types for the Type system. Based on this value, you can cast to a "DerivedType" subclass (see 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!
Type::Type | ( | const char * | Name, | |
TypeID | id | |||
) | [protected] |
virtual llvm::Type::~Type | ( | ) | [inline, protected, virtual] |
void llvm::Type::setAbstract | ( | bool | Val | ) | [inline, protected] |
Types can become nonabstract later, if they are refined.
Definition at line 115 of file Type.h.
Referenced by llvm::ArrayType::ArrayType(), llvm::FunctionType::FunctionType(), llvm::OpaqueType::OpaqueType(), llvm::PointerType::PointerType(), and llvm::StructType::StructType().
unsigned llvm::Type::getRefCount | ( | ) | const [inline, protected] |
void Type::print | ( | std::ostream & | O | ) | const |
Definition at line 1323 of file AsmWriter.cpp.
References getDescription().
Referenced by dump(), and llvm::operator<<().
void Type::dump | ( | ) | const [virtual] |
Debugging support: print to stderr.
Implements llvm::AbstractTypeUser.
Reimplemented in llvm::DerivedType.
Definition at line 1341 of file AsmWriter.cpp.
References print().
Referenced by llvm::DerivedType::dump().
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 151 of file Type.h.
Referenced by CastConstantPacked(), llvm::OpaqueType::classof(), llvm::PointerType::classof(), llvm::PackedType::classof(), llvm::ArrayType::classof(), llvm::SequentialType::classof(), llvm::StructType::classof(), llvm::CompositeType::classof(), llvm::FunctionType::classof(), llvm::ConstantArray::ConstantArray(), llvm::ConstantPacked::ConstantPacked(), llvm::AsmPrinter::EmitGlobalConstant(), executeAddInst(), executeAndInst(), executeDivInst(), executeMulInst(), executeOrInst(), executeRemInst(), executeSetEQInst(), executeSetGEInst(), executeSetGTInst(), executeSetLEInst(), executeSetLTInst(), executeSetNEInst(), executeShlInst(), executeShrInst(), executeSubInst(), executeXorInst(), llvm::ConstantIntegral::getAllOnesValue(), llvm::ConstantIntegral::getMaxValue(), llvm::ConstantIntegral::getMinValue(), llvm::Constant::getNullValue(), getPrimitiveSize(), getPrimitiveSizeInBits(), getPromotedType(), getSignedVersion(), getSubElementHash(), getTypeID(), getTypeInfo(), getUnsignedVersion(), llvm::TargetLowering::getValueType(), llvm::SequentialType::indexValid(), isLosslesslyConvertibleTo(), llvm::ConstantFP::isValueValidForType(), llvm::ConstantUInt::isValueValidForType(), llvm::ConstantSInt::isValueValidForType(), llvm::ExecutionEngine::LoadValueFromMemory(), MergeInType(), llvm::DSNode::mergeTypeInfo(), llvm::BytecodeReader::ParseConstantPoolValue(), ResolveFunctions(), llvm::JIT::runFunction(), llvm::ExecutionEngine::StoreValueToMemory(), TypesEqual(), and llvm::Interpreter::visitVAArgInst().
const std::string & Type::getDescription | ( | ) | const |
getDescription - Return the string representation of the type...
Definition at line 355 of file Type.cpp.
References AbstractTypeDescriptions, ConcreteTypeDescriptions, getOrCreateDesc(), and isAbstract().
Referenced by calcTypeName(), HandleUpRefs(), llvm::TypeSymbolTable::insert(), llvm::SymbolTable::insert(), llvm::BytecodeReader::ParseConstantPool(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::BytecodeReader::ParseFunction(), print(), llvm::Constant::print(), printTypeInt(), llvm::SymbolTable::remove(), setTypeName(), WriteAsOperandInternal(), and llvm::WriteTypeSymbolic().
bool llvm::Type::isSigned | ( | ) | const [inline] |
isSigned - Return whether an integral numeric type is signed. This is true for SByteTy, ShortTy, IntTy, LongTy. Note that this is not true for Float and Double.
Definition at line 160 of file Type.h.
References IntTyID, LongTyID, SByteTyID, and ShortTyID.
Referenced by ComputeMaskedBits(), llvm::ConstantSInt::ConstantSInt(), llvm::ExpressionConvertibleToType(), llvm::SCEVConstant::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getSShr(), InsertSignExtendToPtrTy(), isSignBitCheck(), llvm::TargetLowering::LowerArguments(), llvm::TargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), LowerCTLZ(), LowerCTPOP(), OperandConvertibleToType(), llvm::SelectionDAGLowering::visitCast(), and llvm::SelectionDAGLowering::visitUserOp2().
bool llvm::Type::isUnsigned | ( | ) | const [inline] |
isUnsigned - Return whether a numeric type is unsigned. This is not quite the complement of isSigned... nonnumeric types return false as they do with isSigned. This returns true for UByteTy, UShortTy, UIntTy, and ULongTy
Definition at line 170 of file Type.h.
References UByteTyID, UIntTyID, ULongTyID, and UShortTyID.
Referenced by AddWithOverflow(), ComputeMaskedBits(), llvm::ConstantUInt::ConstantUInt(), llvm::SCEVSDivExpr::get(), GetConstantInType(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::SCEVSDivExpr::getType(), llvm::ConstantExpr::getUShr(), llvm::SelectionDAGLowering::visitSetCC(), and llvm::ConstantRange::zeroExtend().
bool llvm::Type::isInteger | ( | ) | const [inline] |
isInteger - Equivalent to isSigned() || isUnsigned()
Definition at line 177 of file Type.h.
References LongTyID, and UByteTyID.
Referenced by llvm::ConstantSInt::ConstantSInt(), llvm::ConstantUInt::ConstantUInt(), llvm::ExpressionConvertibleToType(), llvm::ConstantExpr::get(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), getSignedVersion(), getTruncateOrZeroExtend(), getUnsignedVersion(), llvm::SCEV::getValueRange(), InstCombineLoadCast(), InstCombineStoreToCast(), isIntegral(), OperandConvertibleToType(), RemoveNoopCast(), llvm::ConstantRange::subtract(), and llvm::ConstantRange::zeroExtend().
bool llvm::Type::isIntegral | ( | ) | const [inline] |
isIntegral - Returns true if this is an integral type, which is either BoolTy or one of the Integer types.
Definition at line 182 of file Type.h.
References BoolTy, and isInteger().
Referenced by CastConstantPacked(), ComputeMaskedBits(), llvm::ConstantRange::ConstantRange(), evaluateRelation(), llvm::ConstantExpr::get(), getIntegralTypeMask(), llvm::ConstantExpr::getShiftTy(), llvm::ConstantExpr::getSignExtend(), llvm::ConstantExpr::getZeroExtend(), MergeInType(), OperandConvertibleToType(), llvm::PackedType::PackedType(), llvm::SCEVExpander::visitAddRecExpr(), llvm::SelectionDAGLowering::visitBinary(), and llvm::Interpreter::visitCallSite().
bool llvm::Type::isFloatingPoint | ( | ) | const [inline] |
isFloatingPoint - Return true if this is one of the two floating point types
Definition at line 186 of file Type.h.
References DoubleTyID, and FloatTyID.
Referenced by CastConstantPacked(), llvm::ConstantFoldCastInstruction(), llvm::ExpressionConvertibleToType(), llvm::ConstantExpr::get(), llvm::SCEVUnknown::getIntegerSCEV(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), llvm::Instruction::isAssociative(), LowerNegateToMultiply(), OperandConvertibleToType(), llvm::PackedType::PackedType(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitSetCC(), and llvm::SelectionDAGLowering::visitSub().
bool llvm::Type::isAbstract | ( | ) | const [inline] |
isAbstract - True if the type is either an Opaque type, or is a derived type that includes an opaque type somewhere in it.
Definition at line 191 of file Type.h.
Referenced by AbstractTypeHasCycleThrough(), addAbstractTypeUser(), addRef(), llvm::ArrayType::ArrayType(), llvm::GraphTraits< TypePromotionGraph >::child_begin(), llvm::ConstantArray::ConstantArray(), llvm::ConstantPacked::ConstantPacked(), dropRef(), llvm::FunctionType::FunctionType(), getDescription(), HandleUpRefs(), llvm::TypeSymbolTable::insert(), llvm::SymbolTable::insert(), isSized(), PromoteAbstractToConcrete(), llvm::DerivedType::refineAbstractTypeTo(), llvm::SymbolTable::remove(), removeAbstractTypeUser(), llvm::StructType::StructType(), llvm::TypeMapBase::TypeBecameConcrete(), and TypeHasCycleThroughItself().
bool Type::isLosslesslyConvertibleTo | ( | const Type * | Ty | ) | const |
isLosslesslyConvertibleTo - Return true if this type can be converted to 'Ty' without any reinterpretation of bits. For example, uint to int.
Definition at line 93 of file Type.cpp.
References getTypeID(), IntTy, IntTyID, isPrimitiveType(), LongTy, LongTyID, PointerTyID, SByteTy, SByteTyID, ShortTy, ShortTyID, Ty, UByteTy, UByteTyID, UIntTy, UIntTyID, ULongTy, ULongTyID, UShortTy, and UShortTyID.
Referenced by ElementTypesAreCompatible(), llvm::ExpressionConvertibleToType(), isEliminableCastOfCast(), isReinterpretingCast(), and OperandConvertibleToType().
bool llvm::Type::isPrimitiveType | ( | ) | const [inline] |
Here are some useful little methods to query what type derived types are Note that all other types can just compare to see if this == Type::xxxTy;
Definition at line 202 of file Type.h.
References LastPrimitiveTyID.
Referenced by calcTypeName(), isLosslesslyConvertibleTo(), printTypeInt(), and ShouldNukeSymtabEntry().
bool llvm::Type::isDerivedType | ( | ) | const [inline] |
Definition at line 203 of file Type.h.
References FirstDerivedTyID.
Referenced by llvm::DerivedType::classof().
bool llvm::Type::isFirstClassType | ( | ) | const [inline] |
isFirstClassType - Return true if the value is holdable in a register.
Definition at line 207 of file Type.h.
References LastPrimitiveTyID, PackedTyID, PointerTyID, and VoidTyID.
Referenced by llvm::ExpressionConvertibleToType(), llvm::FunctionType::FunctionType(), llvm::ConstantExpr::getCast(), llvm::GetElementPtrInst::getIndexedType(), llvm::ConstantExpr::getSelectTy(), getVal(), OperandConvertibleToType(), and SCCPSolver::TrackValueOfGlobalVariable().
bool llvm::Type::isSized | ( | ) | const [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 TargetData subsystem to do this.
Definition at line 216 of file Type.h.
References ArrayTyID, BoolTyID, DoubleTyID, isAbstract(), PackedTyID, PointerTyID, and StructTyID.
Referenced by getTypeInfo(), llvm::DSNode::mergeTypeInfo(), and ProcessGlobalsWithSameName().
unsigned Type::getPrimitiveSize | ( | ) | const |
getPrimitiveSize - 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.
Definition at line 161 of file Type.cpp.
References BoolTyID, DoubleTyID, FloatTyID, getTypeID(), IntTyID, LongTyID, SByteTyID, ShortTyID, UByteTyID, UIntTyID, ULongTyID, and UShortTyID.
Referenced by llvm::ConstantIntegral::getMaxValue(), llvm::ConstantIntegral::getMinValue(), llvm::ConstantExpr::getSignExtend(), getSize(), getTruncateOrZeroExtend(), llvm::ConstantExpr::getZeroExtend(), InsertSignExtendToPtrTy(), llvm::ConstantUInt::isAllOnesValue(), llvm::ConstantRange::truncate(), llvm::Interpreter::visitCallSite(), and llvm::ConstantRange::zeroExtend().
unsigned Type::getPrimitiveSizeInBits | ( | ) | const |
Definition at line 178 of file Type.cpp.
References BoolTyID, DoubleTyID, FloatTyID, getTypeID(), IntTyID, LongTyID, SByteTyID, ShortTyID, UByteTyID, UIntTyID, ULongTyID, and UShortTyID.
Referenced by ComputeMaskedBits(), ComputeSignedMinMaxValuesFromKnownBits(), getIntegralTypeMask(), llvm::ConstantIntegral::getSExtValue(), llvm::ConstantIntegral::getZExtValue(), isSignBit(), isSignBitCheck(), OptimizeGEPExpression(), and RemoveNoopCast().
const Type * Type::getUnsignedVersion | ( | ) | const |
getUnsignedVersion - If this is an integer type, return the unsigned variant of this type. For example int -> uint.
Definition at line 124 of file Type.cpp.
References getTypeID(), IntTyID, isInteger(), LongTyID, SByteTyID, ShortTyID, UByteTy, UByteTyID, UIntTy, UIntTyID, ULongTy, ULongTyID, UShortTy, and UShortTyID.
Referenced by llvm::SCEVConstant::get(), llvm::SCEV::getValueRange(), LowerCTLZ(), LowerCTPOP(), llvm::SCEVExpander::visitZeroExtendExpr(), and llvm::ConstantRange::zeroExtend().
const Type * Type::getSignedVersion | ( | ) | const |
getSignedVersion - If this is an integer type, return the signed variant of this type. For example uint -> int.
Definition at line 141 of file Type.cpp.
References getTypeID(), IntTy, IntTyID, isInteger(), LongTy, LongTyID, SByteTy, SByteTyID, ShortTy, ShortTyID, UByteTyID, UIntTyID, ULongTyID, and UShortTyID.
Referenced by EmitGEPOffset(), llvm::SCEVSDivExpr::get(), llvm::SCEVSDivExpr::getType(), and InsertSignExtendToPtrTy().
uint64_t llvm::Type::getIntegralTypeMask | ( | ) | const [inline] |
getIntegralTypeMask - Return a bitmask with ones set for all of the bits that can be set by an unsigned version of this type. This is 0xFF for sbyte/ubyte, 0xFFFF for shorts, etc.
Definition at line 247 of file Type.h.
References getPrimitiveSizeInBits(), and isIntegral().
Referenced by ComputeMaskedBits(), ComputeSignedMinMaxValuesFromKnownBits(), and ComputeUnsignedMinMaxValuesFromKnownBits().
const Type* llvm::Type::getForwardedType | ( | ) | const [inline] |
getForwaredType - Return the type that this type has been resolved to if it has been resolved to anything. This is used to implement the union-find algorithm for type resolution, and shouldn't be used by general purpose clients.
Definition at line 256 of file Type.h.
References ForwardType.
Referenced by llvm::PATypeHolder::get(), and llvm::GetElementPtrInst::getIndexedType().
const Type* llvm::Type::getVAArgsPromotedType | ( | ) | const [inline] |
subtype_iterator llvm::Type::subtype_begin | ( | ) | const [inline] |
Definition at line 279 of file Type.h.
References ContainedTys.
Referenced by AbstractTypeHasCycleThrough(), llvm::GraphTraits< const Type * >::child_begin(), llvm::GraphTraits< Type * >::child_begin(), llvm::GraphTraits< TypePromotionGraph >::child_begin(), ConcreteTypeHasCycleThrough(), getSubElementHash(), PromoteAbstractToConcrete(), llvm::TypeMapBase::TypeBecameConcrete(), TypeContains(), and TypeHasCycleThroughItself().
subtype_iterator llvm::Type::subtype_end | ( | ) | const [inline] |
Definition at line 280 of file Type.h.
References ContainedTys.
Referenced by AbstractTypeHasCycleThrough(), llvm::GraphTraits< TypePromotionGraph >::child_begin(), llvm::GraphTraits< const Type * >::child_end(), llvm::GraphTraits< Type * >::child_end(), llvm::GraphTraits< TypePromotionGraph >::child_end(), ConcreteTypeHasCycleThrough(), getSubElementHash(), PromoteAbstractToConcrete(), llvm::TypeMapBase::TypeBecameConcrete(), TypeContains(), and TypeHasCycleThroughItself().
const Type* llvm::Type::getContainedType | ( | unsigned | i | ) | const [inline] |
getContainedType - This method is used to implement the type iterator (defined a the end of the file). For derived types, this returns the types 'contained' in the derived type.
Definition at line 286 of file Type.h.
References ContainedTys.
Referenced by getStructOffsetStep(), and lookupFunction().
size_type llvm::Type::getNumContainedTypes | ( | ) | const [inline] |
getPrimitiveType - Return a type based on an identifier.
Definition at line 70 of file Type.cpp.
References BoolTy, BoolTyID, DoubleTy, DoubleTyID, FloatTy, FloatTyID, IntTy, IntTyID, LabelTy, LabelTyID, LongTy, LongTyID, SByteTy, SByteTyID, ShortTy, ShortTyID, UByteTy, UByteTyID, UIntTy, UIntTyID, ULongTy, ULongTyID, UShortTy, UShortTyID, VoidTy, and VoidTyID.
Referenced by llvm::BytecodeReader::ParseType(), and llvm::SlotCalculator::SlotCalculator().
static bool llvm::Type::classof | ( | const Type * | T | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented in llvm::DerivedType, llvm::FunctionType, llvm::CompositeType, llvm::StructType, llvm::SequentialType, llvm::ArrayType, llvm::PackedType, llvm::PointerType, and llvm::OpaqueType.
void llvm::Type::addRef | ( | ) | const [inline] |
Definition at line 319 of file Type.h.
References isAbstract().
Referenced by llvm::DerivedType::refineAbstractTypeTo().
void llvm::Type::dropRef | ( | ) | const [inline] |
void llvm::Type::addAbstractTypeUser | ( | AbstractTypeUser * | U | ) | const [inline] |
addAbstractTypeUser - Notify an abstract type that there is a new user of it. This function is called primarily by the PATypeHandle class.
Definition at line 337 of file Type.h.
References AbstractTypeUsers, isAbstract(), and U.
void Type::removeAbstractTypeUser | ( | AbstractTypeUser * | U | ) | const |
removeAbstractTypeUser - Notify an abstract type that a user of the class no longer has a handle to the type. This function is called primarily by the PATypeHandle class. When there are no users of the abstract type, it is annihilated, because there is no way to get a reference to it ever again.
Definition at line 1237 of file Type.cpp.
References AbstractTypeUsers, getRefCount(), isAbstract(), and U.
Referenced by llvm::TypeMapBase::TypeBecameConcrete(), and llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >::typeBecameConcrete().
void Type::clearAllTypeMaps | ( | ) | [static] |
clearAllTypeMaps - This method frees all internal memory used by the type subsystem, which can be used in environments where this memory is otherwise reported as a leak.
Definition at line 1450 of file Type.cpp.
References ArrayTypes, E, FunctionTypes, PackedTypes, PointerTypes, and StructTypes.
void Type::PromoteAbstractToConcrete | ( | ) | [protected] |
Definition at line 543 of file Type.cpp.
References E, isAbstract(), llvm::scc_begin(), llvm::scc_end(), SE, subtype_begin(), and subtype_end().
Referenced by llvm::TypeMapBase::TypeBecameConcrete().
friend class TypeMapBase [friend] |
const Type* llvm::Type::ForwardType [mutable, protected] |
ForwardType - This field is used to implement the union find scheme for abstract types. When types are refined to other types, this field is set to the more refined type. Only abstract types can be forwarded.
Definition at line 122 of file Type.h.
Referenced by getForwardedType(), and llvm::DerivedType::refineAbstractTypeTo().
std::vector<PATypeHandle> llvm::Type::ContainedTys [protected] |
ContainedTys - The list of types contained by this one. For example, this includes the arguments of a function type, the elements of the structure, the pointee of a pointer, etc. Note that keeping this vector in the Type class wastes some space for types that do not contain anything (such as primitive types). However, keeping it here allows the subtype_* members to be implemented MUCH more efficiently, and dynamically very few types do not contain any elements (most are derived).
Definition at line 131 of file Type.h.
Referenced by llvm::DerivedType::dropAllTypeUses(), llvm::StructType::element_begin(), llvm::StructType::element_end(), llvm::FunctionType::FunctionType(), getContainedType(), llvm::SequentialType::getElementType(), llvm::StructType::getElementType(), getNumContainedTypes(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::StructType::getTypeAtIndex(), llvm::SequentialType::getTypeAtIndex(), llvm::StructType::indexValid(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), llvm::StructType::StructType(), subtype_begin(), and subtype_end().
std::vector<AbstractTypeUser *> llvm::Type::AbstractTypeUsers [mutable, protected] |
AbstractTypeUsers - Implement a list of the users that need to be notified if I am a type, and I get resolved into a more concrete type.
Definition at line 136 of file Type.h.
Referenced by addAbstractTypeUser(), dropRef(), llvm::DerivedType::notifyUsesThatTypeBecameConcrete(), llvm::DerivedType::refineAbstractTypeTo(), removeAbstractTypeUser(), and ~Type().
Type * Type::VoidTy [static] |
Definition at line 307 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), llvm::AllocationInst::AllocationInst(), llvm::DSNode::assertOK(), llvm::ConvertExpressionToType(), llvm::DSNode::foldNodeCompletely(), llvm::DSNode::forwardNode(), llvm::Function::Function(), llvm::FunctionType::FunctionType(), llvm::PointerType::get(), llvm::Module::getMainFunction(), getPrimitiveType(), llvm::MVT::getTypeForValueType(), hasNullValue(), llvm::InlineFunction(), llvm::DSNode::isNodeCompletelyFolded(), killIfUselessEdge(), llvm::TargetLowering::LowerCallTo(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), llvm::ReachabilityCloner::merge(), llvm::DSNode::mergeTypeInfo(), llvm::BytecodeReader::ParseType(), llvm::RemoveSuccessor(), llvm::JIT::runFunction(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::StructType::StructType(), llvm::UpgradeIntrinsicCall(), llvm::Value::Value(), llvm::InlineAsm::Verify(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitFree(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::Interpreter::visitReturnInst(), and llvm::SelectionDAGLowering::visitTargetIntrinsic().
Type * Type::BoolTy [static] |
Definition at line 307 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), DIGetTypesVisitor::Apply(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantExpr::get(), getPrimitiveType(), llvm::ConstantExpr::getSelectTy(), llvm::ConstantRange::getSetSize(), llvm::ConstantExpr::getSignExtend(), llvm::ConstantExpr::getTy(), llvm::MVT::getTypeForValueType(), llvm::ConstantExpr::getZeroExtend(), llvm::BinaryOperator::init(), isIntegral(), llvm::SimplifyCFG(), and llvm::Interpreter::visitCallSite().
Type * Type::SByteTy [static] |
Definition at line 308 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), CreateArgv(), llvm::ConstantArray::get(), llvm::Module::getMainFunction(), llvm::Constant::getNullValue(), llvm::SlotCalculator::getPlane(), getPrimitiveType(), getSignedVersion(), llvm::DISerializer::getStrPtrType(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), isLosslesslyConvertibleTo(), llvm::ConstantArray::isString(), llvm::BytecodeReader::ParseStringConstants(), and llvm::Interpreter::visitCallSite().
Type * Type::UByteTy [static] |
Definition at line 308 of file Type.h.
Referenced by llvm::ConstantExpr::get(), llvm::Constant::getNullValue(), llvm::SlotCalculator::getPlane(), getPrimitiveType(), llvm::ConstantExpr::getShiftTy(), llvm::MVT::getTypeForValueType(), getUnsignedVersion(), isLosslesslyConvertibleTo(), llvm::ConstantArray::isString(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::BytecodeReader::ParseStringConstants(), and llvm::Interpreter::visitCallSite().
Type * Type::ShortTy [static] |
Definition at line 308 of file Type.h.
Referenced by llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), isLosslesslyConvertibleTo(), and llvm::Interpreter::visitCallSite().
Type * Type::UShortTy [static] |
Definition at line 308 of file Type.h.
Referenced by ByteswapSCANFResults(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::MVT::getTypeForValueType(), getUnsignedVersion(), isLosslesslyConvertibleTo(), and llvm::Interpreter::visitCallSite().
Type * Type::IntTy [static] |
Definition at line 308 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), llvm::ConstantFoldCastInstruction(), llvm::DerivedType::dropAllTypeUses(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::Module::getMainFunction(), llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), llvm::getStructOffsetType(), getVAArgsPromotedType(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), llvm::InsertProfilingInitCall(), isLosslesslyConvertibleTo(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), and llvm::JIT::runFunction().
Type * Type::UIntTy [static] |
Definition at line 308 of file Type.h.
Referenced by DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), ByteswapSCANFResults(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::AsmPrinter::EmitConstantValueOnly(), getAISize(), llvm::ConstantExpr::getExtractElement(), llvm::TargetData::getIndexedOffset(), llvm::ConstantExpr::getInsertElement(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::ConstantExpr::getPtrPtrFromArrayPtr(), llvm::ConstantExpr::getSizeOf(), llvm::MVT::getTypeForValueType(), getUnsignedVersion(), getVAArgsPromotedType(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), llvm::StructType::indexValid(), llvm::InsertProfilingInitCall(), isLosslesslyConvertibleTo(), llvm::ShuffleVectorInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ExtractElementInst::isValidOperands(), LowerBSWAP(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::BytecodeReader::ParseInstruction(), and llvm::JIT::runFunction().
Type * Type::LongTy [static] |
Definition at line 308 of file Type.h.
Referenced by DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), llvm::ConstantFoldGetElementPtr(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), llvm::getStructOffsetType(), isLosslesslyConvertibleTo(), and llvm::JIT::runFunction().
Type * Type::ULongTy [static] |
Definition at line 308 of file Type.h.
Referenced by DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), ByteswapSCANFResults(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::ConstantExpr::getSizeOf(), llvm::MVT::getTypeForValueType(), getUnsignedVersion(), isLosslesslyConvertibleTo(), LowerBSWAP(), LowerCTPOP(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), and PartialFact().
Type * Type::FloatTy [static] |
Definition at line 312 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), llvm::ConstantCreator< ConstantFP, Type, uint32_t >::create(), llvm::ConstantFP::get(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::MVT::getTypeForValueType(), llvm::IA64TargetLowering::LowerArguments(), and llvm::DefaultIntrinsicLowering::LowerIntrinsicCall().
Type * Type::DoubleTy [static] |
Definition at line 312 of file Type.h.
Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), llvm::ConstantCreator< ConstantFP, Type, uint64_t >::create(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::ConstantFP::get(), llvm::Constant::getNullValue(), llvm::AsmPrinter::getPreferredAlignmentLog(), getPrimitiveType(), llvm::MVT::getTypeForValueType(), getVAArgsPromotedType(), and llvm::DefaultIntrinsicLowering::LowerIntrinsicCall().
Type * Type::LabelTy [static] |