LLVM API Documentation

llvm::Type Class Reference

#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

typedef std::vector< PATypeHandle
>::const_iterator 
subtype_iterator
typedef std::vector< PATypeHandle
>::size_type 
size_type
 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
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
}

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 TypegetUnsignedVersion () const
const TypegetSignedVersion () const
uint64_t getIntegralTypeMask () const
const TypegetForwardedType () const
const TypegetVAArgsPromotedType () const
subtype_iterator subtype_begin () const
subtype_iterator subtype_end () const
const TypegetContainedType (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 TypegetPrimitiveType (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 TypeVoidTy = &TheVoidTy
static TypeBoolTy = &TheBoolTy
static TypeSByteTy = &TheSByteTy
static TypeUByteTy = &TheUByteTy
static TypeShortTy = &TheShortTy
static TypeUShortTy = &TheUShortTy
static TypeIntTy = &TheIntTy
static TypeUIntTy = &TheUIntTy
static TypeLongTy = &TheLongTy
static TypeULongTy = &TheULongTy
static TypeFloatTy = &TheFloatTy
static TypeDoubleTy = &TheDoubleTy
static TypeLabelTy = &TheLabelTy

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 TypeForwardType
std::vector< PATypeHandleContainedTys
std::vector< AbstractTypeUser * > AbstractTypeUsers

Friends

class TypeMapBase

Detailed Description

Definition at line 56 of file Type.h.


Member Typedef Documentation

typedef std::vector<PATypeHandle>::size_type llvm::Type::size_type

getNumContainedTypes - Return the number of types in the derived type.

Definition at line 286 of file Type.h.

typedef std::vector<PATypeHandle>::const_iterator llvm::Type::subtype_iterator

Definition at line 271 of file Type.h.


Member Enumeration Documentation

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!

Enumerator:
VoidTyID 
BoolTyID 
UByteTyID 
SByteTyID 
UShortTyID 
ShortTyID 
UIntTyID 
IntTyID 
ULongTyID 
LongTyID 
FloatTyID 
DoubleTyID 
LabelTyID 
FunctionTyID 
StructTyID 
ArrayTyID 
PointerTyID 
OpaqueTyID 
PackedTyID 
NumTypeIDs 
LastPrimitiveTyID 
FirstDerivedTyID 

Definition at line 64 of file Type.h.


Constructor & Destructor Documentation

Type::Type ( const char *  Name,
TypeID  id 
) [protected]

Definition at line 46 of file Type.cpp.

References ConcreteTypeDescriptions.

llvm::Type::Type ( TypeID  id  )  [inline, protected]

Definition at line 101 of file Type.h.

virtual llvm::Type::~Type (  )  [inline, protected, virtual]

Definition at line 102 of file Type.h.

References AbstractTypeUsers.


Member Function Documentation

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

References AbstractTypeUsers, isAbstract(), and U.

void llvm::Type::addRef (  )  const [inline]

Definition at line 312 of file Type.h.

References isAbstract().

Referenced by llvm::DerivedType::refineAbstractTypeTo().

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.

Definition at line 310 of file Type.h.

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

References ArrayTypes, E, FunctionTypes, I, PackedTypes, PointerTypes, and StructTypes.

void llvm::Type::dropRef (  )  const [inline]

Definition at line 317 of file Type.h.

References AbstractTypeUsers, and isAbstract().

void Type::dump (  )  const [virtual]

Debugging support: print to stderr.

Implements llvm::AbstractTypeUser.

Reimplemented in llvm::DerivedType.

Definition at line 1338 of file AsmWriter.cpp.

References print().

Referenced by llvm::DerivedType::dump().

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

References ContainedTys.

Referenced by getStructOffsetStep(), and lookupFunction().

const std::string & Type::getDescription (  )  const

getDescription - Return the string representation of the type...

Definition at line 338 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().

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

References ForwardType.

Referenced by llvm::PATypeHolder::get(), and llvm::GetElementPtrInst::getIndexedType().

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

References getPrimitiveSizeInBits(), and isIntegral().

Referenced by ComputeMaskedBits(), ComputeSignedMinMaxValuesFromKnownBits(), and ComputeUnsignedMinMaxValuesFromKnownBits().

size_type llvm::Type::getNumContainedTypes (  )  const [inline]

Definition at line 287 of file Type.h.

References ContainedTys.

Referenced by lookupFunction().

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

References BoolTyID, DoubleTyID, FloatTyID, getTypeID(), IntTyID, LongTyID, SByteTyID, ShortTyID, UByteTyID, UIntTyID, ULongTyID, and UShortTyID.

Referenced by llvm::SparcV9FunctionInfo::computeOffsetforLocalVar(), findOptimalStorageSize(), 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 161 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::getPrimitiveType ( TypeID  IDNumber  )  [static]

getPrimitiveType - Return a type based on an identifier.

Definition at line 53 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().

unsigned llvm::Type::getRefCount (  )  const [inline, protected]

Definition at line 110 of file Type.h.

Referenced by removeAbstractTypeUser().

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

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 144 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(), llvm::SparcV9RegInfo::getRegClassIDOfType(), getSignedVersion(), getSubElementHash(), getTypeID(), getTypeInfo(), getUnsignedVersion(), llvm::TargetLowering::getValueType(), llvm::SequentialType::indexValid(), llvm::InstructionNode::InstructionNode(), 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(), TypeToDataDirective(), and llvm::Interpreter::visitVAArgInst().

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 107 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* llvm::Type::getVAArgsPromotedType (  )  const [inline]

getVAArgsPromotedType - Return the type an argument of this type will be promoted to if passed through a variable argument function.

Definition at line 257 of file Type.h.

References BoolTyID, DoubleTy, FloatTyID, IntTy, SByteTyID, ShortTyID, UByteTyID, UIntTy, and UShortTyID.

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 184 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 llvm::Type::isDerivedType (  )  const [inline]

Definition at line 196 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 200 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::isFloatingPoint (  )  const [inline]

isFloatingPoint - Return true if this is one of the two floating point types

Definition at line 179 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(), and llvm::SelectionDAGLowering::visitSub().

bool llvm::Type::isInteger (  )  const [inline]

isInteger - Equivalent to isSigned() || isUnsigned()

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

References BoolTy, and isInteger().

Referenced by CastConstantPacked(), llvm::SparcV9IntCCRegClass::colorIGNode(), ComputeMaskedBits(), llvm::SparcV9FunctionInfo::computeOffsetforLocalVar(), llvm::ConstantRange::ConstantRange(), ConstantTypeMustBeLoaded(), llvm::ConvertConstantToIntType(), evaluateRelation(), findOptimalStorageSize(), 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 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 76 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 195 of file Type.h.

References LastPrimitiveTyID.

Referenced by calcTypeName(), ConstantTypeMustBeLoaded(), isLosslesslyConvertibleTo(), printTypeInt(), and ShouldNukeSymtabEntry().

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

References IntTyID, LongTyID, SByteTyID, and ShortTyID.

Referenced by ComputeMaskedBits(), llvm::ConstantSInt::ConstantSInt(), llvm::ConvertConstantToIntType(), llvm::ExpressionConvertibleToType(), llvm::SCEVConstant::get(), llvm::ConstantInt::get(), llvm::ConstantExpr::getSShr(), InsertSignExtendToPtrTy(), isSignBitCheck(), llvm::TargetLowering::LowerArguments(), llvm::PPCTargetLowering::LowerCallTo(), llvm::AlphaTargetLowering::LowerCallTo(), LowerCTLZ(), LowerCTPOP(), OperandConvertibleToType(), llvm::SelectionDAGLowering::visitCast(), and llvm::SelectionDAGLowering::visitUserOp2().

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

References ArrayTyID, BoolTyID, DoubleTyID, isAbstract(), PackedTyID, PointerTyID, and StructTyID.

Referenced by getTypeInfo(), llvm::DSNode::mergeTypeInfo(), and ProcessGlobalsWithSameName().

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

void Type::print ( std::ostream &  O  )  const

Definition at line 1320 of file AsmWriter.cpp.

References getDescription().

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

void Type::PromoteAbstractToConcrete (  )  [protected]

Definition at line 526 of file Type.cpp.

References E, isAbstract(), llvm::scc_begin(), llvm::scc_end(), SE, subtype_begin(), and subtype_end().

Referenced by llvm::TypeMapBase::TypeBecameConcrete().

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

References AbstractTypeUsers, getRefCount(), isAbstract(), and U.

Referenced by llvm::TypeMapBase::TypeBecameConcrete().

void llvm::Type::setAbstract ( bool  Val  )  [inline, protected]

Types can become nonabstract later, if they are refined.

Definition at line 108 of file Type.h.

Referenced by llvm::ArrayType::ArrayType(), llvm::FunctionType::FunctionType(), llvm::OpaqueType::OpaqueType(), llvm::PointerType::PointerType(), and llvm::StructType::StructType().

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

Definition at line 272 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 273 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().


Friends And Related Function Documentation

friend class TypeMapBase [friend]

Definition at line 361 of file Type.h.


Member Data Documentation

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

Referenced by addAbstractTypeUser(), dropRef(), llvm::DerivedType::notifyUsesThatTypeBecameConcrete(), llvm::DerivedType::refineAbstractTypeTo(), removeAbstractTypeUser(), and ~Type().

Type * Type::BoolTy = &TheBoolTy [static]

Definition at line 300 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::ConstantExpr::getZeroExtend(), llvm::BinaryOperator::init(), llvm::InstructionNode::InstructionNode(), isIntegral(), llvm::SimplifyCFG(), and llvm::Interpreter::visitCallSite().

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

Type * Type::DoubleTy = &TheDoubleTy [static]

Definition at line 305 of file Type.h.

Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), llvm::SparcV9FloatRegClass::colorIGNode(), llvm::ConstantCreator< ConstantFP, Type, uint64_t >::create(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::ConstantFP::get(), llvm::Constant::getNullValue(), llvm::AsmPrinter::getPreferredAlignmentLog(), getPrimitiveType(), getVAArgsPromotedType(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), and llvm::SparcV9RegInfo::printReg().

Type * Type::FloatTy = &TheFloatTy [static]

Definition at line 305 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::IA64TargetLowering::LowerArguments(), and llvm::DefaultIntrinsicLowering::LowerIntrinsicCall().

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

Referenced by getForwardedType(), and llvm::DerivedType::refineAbstractTypeTo().

Type * Type::IntTy = &TheIntTy [static]

Definition at line 301 of file Type.h.

Referenced by llvm::DefaultIntrinsicLowering::AddPrototypes(), DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), llvm::ConstantFoldCastInstruction(), llvm::DerivedType::dropAllTypeUses(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AllocInfo::getConstantType(), llvm::Module::getMainFunction(), llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), llvm::getStructOffsetType(), getVAArgsPromotedType(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), llvm::InsertProfilingInitCall(), isLosslesslyConvertibleTo(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), llvm::JIT::runFunction(), and llvm::AllocInfo::toConstant().

Type * Type::LabelTy = &TheLabelTy [static]

Definition at line 307 of file Type.h.

Referenced by getPrimitiveType(), and hasNullValue().

Type * Type::LongTy = &TheLongTy [static]

Definition at line 301 of file Type.h.

Referenced by llvm::SparcV9IntCCRegClass::colorIGNode(), llvm::ConstantFoldGetElementPtr(), llvm::DecomposeArrayRef(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), llvm::getStructOffsetType(), isLosslesslyConvertibleTo(), and llvm::JIT::runFunction().

Type * Type::SByteTy = &TheSByteTy [static]

Definition at line 301 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::ShortTy = &TheShortTy [static]

Definition at line 301 of file Type.h.

Referenced by llvm::Constant::getNullValue(), getPrimitiveType(), getSignedVersion(), isLosslesslyConvertibleTo(), and llvm::Interpreter::visitCallSite().

Type * Type::UByteTy = &TheUByteTy [static]

Definition at line 301 of file Type.h.

Referenced by llvm::ConstantExpr::get(), llvm::Constant::getNullValue(), llvm::SlotCalculator::getPlane(), getPrimitiveType(), llvm::ConstantExpr::getShiftTy(), getUnsignedVersion(), isLosslesslyConvertibleTo(), llvm::ConstantArray::isString(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::BytecodeReader::ParseStringConstants(), and llvm::Interpreter::visitCallSite().

Type * Type::UIntTy = &TheUIntTy [static]

Definition at line 301 of file Type.h.

Referenced by DIGetTypesVisitor::Apply(), DISerializeVisitor::Apply(), ByteswapSCANFResults(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::AsmPrinter::EmitConstantValueOnly(), getAISize(), llvm::AllocInfo::getConstantType(), llvm::ConstantExpr::getExtractElement(), llvm::TargetData::getIndexedOffset(), llvm::ConstantExpr::getInsertElement(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::ConstantExpr::getPtrPtrFromArrayPtr(), llvm::ConstantExpr::getSizeOf(), 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(), llvm::JIT::runFunction(), and llvm::AllocInfo::toConstant().

Type * Type::ULongTy = &TheULongTy [static]

Definition at line 301 of file Type.h.

Referenced by ByteswapSCANFResults(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::AsmPrinter::EmitGlobalConstant(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), llvm::ConstantExpr::getSizeOf(), getUnsignedVersion(), isLosslesslyConvertibleTo(), LowerBSWAP(), LowerCTPOP(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), and PartialFact().

Type * Type::UShortTy = &TheUShortTy [static]

Definition at line 301 of file Type.h.

Referenced by ByteswapSCANFResults(), llvm::TargetData::getIntPtrType(), llvm::Constant::getNullValue(), getPrimitiveType(), getUnsignedVersion(), isLosslesslyConvertibleTo(), and llvm::Interpreter::visitCallSite().

Type * Type::VoidTy = &TheVoidTy [static]

Definition at line 300 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::Module::getMainFunction(), getPrimitiveType(), llvm::CallArgsDescriptor::getReturnValue(), hasNullValue(), llvm::InlineFunction(), llvm::DSNode::isNodeCompletelyFolded(), killIfUselessEdge(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), llvm::X86TargetLowering::LowerOperation(), 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().


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