LLVM API Documentation
#include <Type.h>


Public Types | |
| enum | TypeID { VoidTyID = 0, FloatTyID, DoubleTyID, X86_FP80TyID, FP128TyID, PPC_FP128TyID, LabelTyID, IntegerTyID, FunctionTyID, StructTyID, ArrayTyID, PointerTyID, OpaqueTyID, VectorTyID, NumTypeIDs, LastPrimitiveTyID = LabelTyID, FirstDerivedTyID = IntegerTyID } |
| typedef PATypeHandle * | subtype_iterator |
Public Member Functions | |
| void | print (raw_ostream &O) const |
| void | print (std::ostream &O) const |
| void | dump () const |
| Debugging support: print to stderr. | |
| void | dump (const Module *Context) const |
| Debugging support: print to stderr (use type names from context module). | |
| TypeID | getTypeID () const |
| const std::string & | getDescription () const |
| getDescription - Return the string representation of the type... | |
| bool | isInteger () const |
| bool | isIntOrIntVector () const |
| bool | isFloatingPoint () const |
| bool | isFPOrFPVector () const |
| bool | isAbstract () const |
| bool | canLosslesslyBitCastTo (const Type *Ty) const |
| Determine if this type could be losslessly bitcast to Ty. | |
| bool | isPrimitiveType () const |
| bool | isDerivedType () const |
| bool | isFirstClassType () const |
| bool | isSingleValueType () const |
| bool | isAggregateType () const |
| bool | isSized () const |
| unsigned | getPrimitiveSizeInBits () const |
| int | getFPMantissaWidth () 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 |
| unsigned | 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 *) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
Static Public Attributes | |
| static const Type * | VoidTy = new Type(Type::VoidTyID) |
| static const Type * | LabelTy = new Type(Type::LabelTyID) |
| static const Type * | FloatTy = new Type(Type::FloatTyID) |
| static const Type * | DoubleTy = new Type(Type::DoubleTyID) |
| static const Type * | X86_FP80Ty = new Type(Type::X86_FP80TyID) |
| static const Type * | FP128Ty = new Type(Type::FP128TyID) |
| static const Type * | PPC_FP128Ty = new Type(Type::PPC_FP128TyID) |
| static const IntegerType * | Int1Ty = new BuiltinIntegerType(1) |
| static const IntegerType * | Int8Ty = new BuiltinIntegerType(8) |
| static const IntegerType * | Int16Ty = new BuiltinIntegerType(16) |
| static const IntegerType * | Int32Ty = new BuiltinIntegerType(32) |
| static const IntegerType * | Int64Ty = new BuiltinIntegerType(64) |
Protected Member Functions | |
| Type (TypeID id) | |
| virtual | ~Type () |
| void | setAbstract (bool Val) |
| unsigned | getRefCount () const |
| unsigned | getSubclassData () const |
| void | setSubclassData (unsigned val) |
| void | PromoteAbstractToConcrete () |
Protected Attributes | |
| const Type * | ForwardType |
| std::vector< AbstractTypeUser * > | AbstractTypeUsers |
| unsigned | NumContainedTys |
| PATypeHandle * | ContainedTys |
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 bitcode 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 61 of file Type.h.
| typedef PATypeHandle* llvm::Type::subtype_iterator |
| enum llvm::Type::TypeID |
Definitions of all of the base types for the Type system. Based on this value, you can cast to a "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!
| virtual llvm::Type::~Type | ( | ) | [inline, protected, virtual] |
| void llvm::Type::setAbstract | ( | bool | Val | ) | [inline, protected] |
| unsigned llvm::Type::getRefCount | ( | ) | const [inline, protected] |
| unsigned llvm::Type::getSubclassData | ( | ) | const [inline, protected] |
Definition at line 126 of file Type.h.
Referenced by llvm::IntegerType::getBitWidth(), getVAArgsPromotedType(), and llvm::StructType::isPacked().
| void llvm::Type::setSubclassData | ( | unsigned | val | ) | [inline, protected] |
| void Type::print | ( | raw_ostream & | O | ) | const |
Definition at line 1724 of file AsmWriter.cpp.
References getDescription().
Referenced by llvm::TypeMap< ValType, TypeClass >::add(), llvm::TypeMap< ValType, TypeClass >::dump(), dump(), llvm::operator<<(), print(), and llvm::TypeMap< ValType, TypeClass >::~TypeMap().
| void Type::print | ( | std::ostream & | O | ) | const |
| void Type::dump | ( | ) | const [virtual] |
Debugging support: print to stderr.
Implements llvm::AbstractTypeUser.
Reimplemented in llvm::DerivedType.
Definition at line 1774 of file AsmWriter.cpp.
References llvm::errs(), llvm::raw_ostream::flush(), and print().
| void Type::dump | ( | const Module * | Context | ) | const |
Debugging support: print to stderr (use type names from context module).
Definition at line 1778 of file AsmWriter.cpp.
References llvm::errs(), llvm::raw_ostream::flush(), and llvm::WriteTypeSymbolic().
| 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 178 of file Type.h.
Referenced by calcTypeName(), llvm::OpaqueType::classof(), llvm::PointerType::classof(), llvm::VectorType::classof(), llvm::ArrayType::classof(), llvm::SequentialType::classof(), llvm::StructType::classof(), llvm::CompositeType::classof(), llvm::FunctionType::classof(), llvm::IntegerType::classof(), llvm::ConstantArray::ConstantArray(), llvm::ConstantStruct::ConstantStruct(), llvm::ConstantVector::ConstantVector(), executeAddInst(), executeFCMP_OEQ(), executeFCMP_OGE(), executeFCMP_OGT(), executeFCMP_OLE(), executeFCMP_OLT(), executeFCMP_ONE(), executeFDivInst(), executeFRemInst(), executeICMP_EQ(), executeICMP_NE(), executeICMP_SGE(), executeICMP_SGT(), executeICMP_SLE(), executeICMP_SLT(), executeICMP_UGE(), executeICMP_UGT(), executeICMP_ULE(), executeICMP_ULT(), executeMulInst(), executeSubInst(), llvm::ConstantExpr::getCompareTy(), llvm::ExecutionEngine::getConstantValue(), getFloatBitCastField(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::MVT::getMVT(), llvm::Constant::getNullValue(), getPrimitiveSizeInBits(), llvm::ConstantExpr::getSIToFP(), getSubElementHash(), getTypeDescription(), getTypeID(), getTypePrefix(), llvm::TargetData::getTypeSizeInBits(), llvm::ConstantExpr::getUIToFP(), llvm::MachOWriter::InitMem(), llvm::ConstantFP::isValueValidForType(), llvm::ExecutionEngine::LoadValueFromMemory(), MergeInType(), llvm::AsmPrinter::printDataDirective(), RecursiveResolveTypesI(), ReplaceFPIntrinsicWithCall(), llvm::JIT::runFunction(), llvm::ExecutionEngine::StoreValueToMemory(), TypesEqual(), llvm::Interpreter::visitVAArgInst(), and WriteTypeTable().
| const std::string & Type::getDescription | ( | ) | const |
getDescription - Return the string representation of the type...
Definition at line 372 of file Type.cpp.
References AbstractTypeDescriptions, ConcreteTypeDescriptions, getOrCreateDesc(), and isAbstract().
Referenced by calcTypeName(), llvm::Interpreter::callExternalFunction(), llvm::TypeSymbolTable::insert(), print(), printTypeInt(), and llvm::WriteTypeSymbolic().
| bool llvm::Type::isInteger | ( | ) | const [inline] |
isInteger - True if this is an instance of IntegerType.
Definition at line 185 of file Type.h.
References IntegerTyID.
Referenced by calcTypeName(), llvm::CastInst::castIsValid(), llvm::ComputeMaskedBits(), llvm::CastInst::CreateIntegerCast(), llvm::CastInst::CreatePointerCast(), dyn_castFoldableMul(), dyn_castNegVal(), evaluateICmpRelation(), FoldBitCast(), llvm::ConstantExpr::get(), llvm::CastInst::getCastOpcode(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getPtrToInt(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getTrunc(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), llvm::ConstantExpr::getZExt(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::CastInst::isCastable(), llvm::CastInst::isEliminableCastPair(), isFPIntBitCast(), llvm::CastInst::isIntegerCast(), isIntOrIntVector(), llvm::X86TargetLowering::isTruncateFree(), LowerBSWAP(), LowerCTPOP(), LowerPartSelect(), LowerPartSet(), MergeInType(), printTypeInt(), ShouldNukeSymtabEntry(), SpeculativelyExecuteBB(), llvm::Attribute::typeIncompatible(), llvm::SCEVExpander::visitAddRecExpr(), and llvm::Interpreter::visitCallSite().
| bool Type::isIntOrIntVector | ( | ) | const |
isIntOrIntVector - Return true if this is an integer type or a vector of integer types.
isIntOrIntVector - Return true if this is an integer type or a vector of integer types.
Definition at line 117 of file Type.cpp.
References isInteger(), and VectorTyID.
Referenced by llvm::CastInst::castIsValid(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getSIToFP(), and llvm::ConstantExpr::getUIToFP().
| bool llvm::Type::isFloatingPoint | ( | ) | const [inline] |
isFloatingPoint - Return true if this is one of the two floating point types
Definition at line 194 of file Type.h.
References DoubleTyID, FloatTyID, FP128TyID, PPC_FP128TyID, and X86_FP80TyID.
Referenced by llvm::ConstantFoldCompareInstruction(), llvm::CastInst::CreateFPCast(), FoldBitCast(), llvm::ConstantExpr::get(), llvm::CastInst::getCastOpcode(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), getFPMantissaWidth(), llvm::ConstantExpr::getFPTrunc(), llvm::ScalarEvolution::getIntegerSCEV(), llvm::ConstantExpr::getZeroValueForNegationExpr(), llvm::CastInst::isCastable(), llvm::CastInst::isEliminableCastPair(), isFPIntBitCast(), isSized(), SemanticsForType(), and TryToShrinkGlobalToBoolean().
| bool Type::isFPOrFPVector | ( | ) | const |
isFPOrFPVector - Return true if this is a FP type or a vector of FP types.
Definition at line 127 of file Type.cpp.
References DoubleTyID, FloatTyID, FP128TyID, PPC_FP128TyID, VectorTyID, and X86_FP80TyID.
Referenced by llvm::CastInst::castIsValid(), DominatesMergePoint(), GetDecodedBinaryOpcode(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getSIToFP(), llvm::ConstantExpr::getUIToFP(), llvm::Instruction::isAssociative(), and llvm::FastISel::SelectOperator().
| 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 204 of file Type.h.
Referenced by AbstractTypeHasCycleThrough(), addAbstractTypeUser(), addRef(), llvm::GraphTraits< TypePromotionGraph >::child_begin(), llvm::ConstantArray::ConstantArray(), llvm::ConstantStruct::ConstantStruct(), llvm::ConstantVector::ConstantVector(), dropRef(), getDescription(), getTypeDescription(), llvm::TypeSymbolTable::insert(), isSized(), PromoteAbstractToConcrete(), RecursiveResolveTypesI(), llvm::DerivedType::refineAbstractTypeTo(), removeAbstractTypeUser(), llvm::TypeMapBase::TypeBecameConcrete(), and TypeHasCycleThroughItself().
| bool Type::canLosslesslyBitCastTo | ( | const Type * | Ty | ) | const |
Determine if this type could be losslessly bitcast to Ty.
canLosslesslyBitCastTo - Return true if this type could be converted with a lossless BitCast to type 'Ty'. For example, uint to int. BitCasts are valid for types of the same size only where no re-interpretation of the bits is done.
Definition at line 140 of file Type.cpp.
References isFirstClassType().
| 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 217 of file Type.h.
References LastPrimitiveTyID.
Referenced by calcTypeName(), getTypeDescription(), printTypeInt(), and ShouldNukeSymtabEntry().
| bool llvm::Type::isDerivedType | ( | ) | const [inline] |
Definition at line 218 of file Type.h.
References FirstDerivedTyID.
Referenced by llvm::DerivedType::classof().
| bool llvm::Type::isFirstClassType | ( | ) | const [inline] |
isFirstClassType - Return true if the type is "first class", meaning it is a valid type for a Value.
Definition at line 223 of file Type.h.
References FunctionTyID, OpaqueTyID, and VoidTyID.
Referenced by canLosslesslyBitCastTo(), llvm::CastInst::castIsValid(), foldConstantCastPair(), llvm::ConstantExpr::getCast(), llvm::CastInst::getCastOpcode(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getExtractValueTy(), getFoldedCast(), llvm::ConstantExpr::getInsertValue(), llvm::ConstantExpr::getInsertValueTy(), llvm::ExecutionEngine::InitializeMemory(), llvm::CastInst::isCastable(), and llvm::FunctionType::isValidReturnType().
| bool llvm::Type::isSingleValueType | ( | ) | const [inline] |
isSingleValueType - Return true if the type is a valid type for a virtual register in codegen. This includes all first-class types except struct and array types.
Definition at line 233 of file Type.h.
References IntegerTyID, LastPrimitiveTyID, PointerTyID, VectorTyID, and VoidTyID.
Referenced by llvm::SDISelAsmOperandInfo::getCallOperandValMVT(), and llvm::MachOWriter::InitMem().
| 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 243 of file Type.h.
References ArrayTyID, and StructTyID.
Referenced by llvm::SelectionDAGLowering::getValue().
| 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 251 of file Type.h.
References ArrayTyID, IntegerTyID, isAbstract(), isFloatingPoint(), PointerTyID, StructTyID, and VectorTyID.
Referenced by llvm::ComputeMaskedBits(), llvm::SDISelAsmOperandInfo::getCallOperandValMVT(), llvm::TargetData::getTypeSizeInBits(), isObjectSmallerThan(), isSafeToEliminateVarargsCast(), and TryToOptimizeStoreOfMallocToGlobal().
| unsigned Type::getPrimitiveSizeInBits | ( | ) | const |
getPrimitiveSizeInBits - Return the basic size of this type if it is a primitive type. These are fixed by LLVM and are not target dependent. This will return zero if the type does not have a size or is not a primitive type.
Definition at line 163 of file Type.cpp.
References DoubleTyID, FloatTyID, FP128TyID, getTypeID(), IntegerTyID, PPC_FP128TyID, VectorTyID, and X86_FP80TyID.
Referenced by llvm::CastInst::castIsValid(), CollectBSwapParts(), llvm::ComputeMaskedBits(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInstOperands(), llvm::CastInst::CreateFPCast(), llvm::CastInst::CreateIntegerCast(), llvm::CastInst::CreateSExtOrBitCast(), llvm::CastInst::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), EvaluateGEPOffsetExpression(), FoldBitCast(), llvm::ConstantExpr::getBitCast(), llvm::CastInst::getCastOpcode(), llvm::VectorType::getExtendedElementVectorType(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPTrunc(), llvm::VectorType::getInteger(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), llvm::ConstantExpr::getTrunc(), llvm::VectorType::getTruncatedElementVectorType(), llvm::ScalarEvolution::getTruncateOrZeroExtend(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::ConstantExpr::getVFCmp(), llvm::ConstantExpr::getZExt(), llvm::ConstantExpr::getZExtOrBitCast(), InsertCastToIntPtrTy(), InstCombineLoadCast(), llvm::CastInst::isCastable(), llvm::CastInst::isEliminableCastPair(), llvm::CastInst::isNoopCast(), isSignBitCheck(), llvm::X86TargetLowering::isTruncateFree(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), and llvm::IntrinsicLowering::LowerIntrinsicCall().
| int llvm::Type::getFPMantissaWidth | ( | ) | const [inline] |
getFPMantissaWidth - Return the width of the mantissa of this type. This is only valid on scalar 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 274 of file Type.h.
References DoubleTyID, FloatTyID, FP128TyID, isFloatingPoint(), PPC_FP128TyID, and X86_FP80TyID.
| const Type* llvm::Type::getForwardedType | ( | ) | const [inline] |
getForwardedType - 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 288 of file Type.h.
References ForwardType.
Referenced by llvm::PATypeHolder::get(), and getIndexedTypeInternal().
| const Type * Type::getVAArgsPromotedType | ( | ) | const |
getVAArgsPromotedType - Return the type an argument of this type will be promoted to if passed through a variable argument function.
Definition at line 105 of file Type.cpp.
References DoubleTy, FloatTyID, getSubclassData(), Int32Ty, and IntegerTyID.
| subtype_iterator llvm::Type::subtype_begin | ( | ) | const [inline] |
Definition at line 302 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(), and TypeHasCycleThroughItself().
| subtype_iterator llvm::Type::subtype_end | ( | ) | const [inline] |
Definition at line 303 of file Type.h.
References ContainedTys, and NumContainedTys.
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(), and TypeHasCycleThroughItself().
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 309 of file Type.h.
References ContainedTys, llvm::PATypeHandle::get(), and NumContainedTys.
Referenced by lookupFunction().
| unsigned llvm::Type::getNumContainedTypes | ( | ) | const [inline] |
getNumContainedTypes - Return the number of types in the derived type.
Definition at line 316 of file Type.h.
References NumContainedTys.
Referenced by lookupFunction(), and RecursiveResolveTypesI().
getPrimitiveType - Return a type based on an identifier.
Definition at line 91 of file Type.cpp.
References DoubleTy, DoubleTyID, FloatTy, FloatTyID, FP128Ty, FP128TyID, LabelTy, LabelTyID, PPC_FP128Ty, PPC_FP128TyID, VoidTy, VoidTyID, X86_FP80Ty, and X86_FP80TyID.
| static bool llvm::Type::classof | ( | const Type * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented in llvm::DerivedType, llvm::IntegerType, llvm::FunctionType, llvm::CompositeType, llvm::StructType, llvm::SequentialType, llvm::ArrayType, llvm::VectorType, llvm::PointerType, and llvm::OpaqueType.
| void llvm::Type::addRef | ( | ) | const [inline] |
Definition at line 336 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 354 of file Type.h.
References AbstractTypeUsers, and isAbstract().
| 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 1336 of file Type.cpp.
References AbstractTypeUsers, DOUT, getRefCount(), and isAbstract().
Referenced by llvm::TypeMapBase::TypeBecameConcrete(), and llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >::typeBecameConcrete().
| void Type::PromoteAbstractToConcrete | ( | ) | [protected] |
Definition at line 581 of file Type.cpp.
References CI, 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 132 of file Type.h.
Referenced by getForwardedType(), and llvm::DerivedType::refineAbstractTypeTo().
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 138 of file Type.h.
Referenced by addAbstractTypeUser(), dropRef(), llvm::DerivedType::notifyUsesThatTypeBecameConcrete(), llvm::DerivedType::refineAbstractTypeTo(), removeAbstractTypeUser(), and ~Type().
unsigned llvm::Type::NumContainedTys [protected] |
NumContainedTys - Keeps track of how many PATypeHandle instances there are at the end of this type instance for the list of contained types. It is the subclasses responsibility to set this up. Set to 0 if there are no contained types in this type.
Definition at line 144 of file Type.h.
Referenced by llvm::DerivedType::dropAllTypeUses(), llvm::StructType::element_end(), getContainedType(), llvm::StructType::getElementType(), getNumContainedTypes(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::StructType::indexValid(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), and subtype_end().
PATypeHandle* llvm::Type::ContainedTys [protected] |
ContainedTys - A pointer to the array of Types (PATypeHandle) 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). In general, the subclass should arrange for space for the PATypeHandles to be included in the allocation of the type object and set this pointer to the address of the first element. This allows the Type class to manipulate the ContainedTys without understanding the subclass's placement for this array. keeping it here also allows the subtype_* members to be implemented MUCH more efficiently, and dynamically very few types do not contain any elements.
Definition at line 157 of file Type.h.
Referenced by llvm::DerivedType::dropAllTypeUses(), llvm::StructType::element_begin(), llvm::StructType::element_end(), getContainedType(), llvm::SequentialType::getElementType(), llvm::StructType::getElementType(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::StructType::getTypeAtIndex(), llvm::SequentialType::getTypeAtIndex(), llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), llvm::SequentialType::SequentialType(), subtype_begin(), and subtype_end().
const Type * Type::VoidTy = new Type(Type::VoidTyID) [static] |
Definition at line 329 of file Type.h.
Referenced by llvm::IntrinsicLowering::AddPrototypes(), llvm::AllocationInst::AllocationInst(), llvm::SelectionDAG::getMemcpy(), llvm::SelectionDAG::getMemmove(), llvm::SelectionDAG::getMemset(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), llvm::ValueEnumerator::incorporateFunction(), llvm::TargetLowering::LowerCallTo(), llvm::SelectionDAGLowering::LowerCallTo(), llvm::IntrinsicLowering::LowerIntrinsicCall(), NumRetVals(), llvm::RemoveSuccessor(), llvm::Interpreter::run(), llvm::JIT::runFunction(), llvm::ExecutionEngine::runFunctionAsMain(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::Value::setName(), llvm::Value::Value(), llvm::InlineAsm::Verify(), and llvm::Interpreter::visitReturnInst().
const Type * Type::LabelTy = new Type(Type::LabelTyID) [static] |
const Type * Type::FloatTy = new Type(Type::FloatTyID) [static] |
Definition at line 329 of file Type.h.
Referenced by ByteswapSCANFResults(), ConstantFoldBinaryFP(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCall(), llvm::ConstantFoldCastInstruction(), ConstantFoldFP(), executeFCMP_ORD(), executeFCMP_UNO(), llvm::ConstantFP::get(), llvm::ExecutionEngine::getConstantValue(), llvm::ScalarEvolution::getIntegerSCEV(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), llvm::IA64TargetLowering::LowerArguments(), llvm::MachineOperand::print(), ReplaceFPIntrinsicWithCall(), and TypeToFloatSemantics().
const Type * Type::DoubleTy = new Type(Type::DoubleTyID) [static] |
Definition at line 329 of file Type.h.
Referenced by ByteswapSCANFResults(), llvm::ComputeMaskedBits(), ConstantFoldBinaryFP(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCall(), llvm::ConstantFoldCastInstruction(), ConstantFoldFP(), llvm::ConstantFP::get(), llvm::ExecutionEngine::getConstantValue(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), getVAArgsPromotedType(), ReplaceFPIntrinsicWithCall(), TypeToFloatSemantics(), and llvm::UpgradeIntrinsicCall().
const Type * Type::X86_FP80Ty = new Type(Type::X86_FP80TyID) [static] |
Definition at line 330 of file Type.h.
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConstantFP::get(), llvm::ExecutionEngine::getConstantValue(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), and TypeToFloatSemantics().
const Type * Type::FP128Ty = new Type(Type::FP128TyID) [static] |
Definition at line 330 of file Type.h.
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConstantFP::get(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), and TypeToFloatSemantics().
const Type * Type::PPC_FP128Ty = new Type(Type::PPC_FP128TyID) [static] |
Definition at line 330 of file Type.h.
Referenced by llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), evaluateFCmpRelation(), llvm::ConstantFP::get(), getPrimitiveType(), llvm::MVT::getTypeForMVT(), and TypeToFloatSemantics().
const IntegerType * Type::Int1Ty = new BuiltinIntegerType(1) [static] |
Definition at line 331 of file Type.h.
Referenced by llvm::SelectInst::areInvalidOperands(), llvm::ConstantFoldCompareInstruction(), llvm::DIFactory::CreateGlobalVariable(), llvm::DIFactory::CreateSubprogram(), llvm::DebugInfoBuilder::createSubProgramDescriptor(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getTy(), llvm::MVT::getTypeForMVT(), llvm::ConstantInt::isValueValidForType(), OptimizeGlobalAddressOfMalloc(), TryToShrinkGlobalToBoolean(), and WriteConstantInt().
const IntegerType * Type::Int8Ty = new BuiltinIntegerType(8) [static] |
Definition at line 331 of file Type.h.
Referenced by llvm::IntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), llvm::ConstantFoldGetElementPtr(), CreateArgv(), llvm::ConstantArray::get(), llvm::GetConstantStringInfo(), llvm::DISerializer::getStrPtrType(), llvm::MVT::getTypeForMVT(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), llvm::ConstantArray::isCString(), llvm::ConstantArray::isString(), and llvm::ExecutionEngine::runFunctionAsMain().
const IntegerType * Type::Int16Ty = new BuiltinIntegerType(16) [static] |
Definition at line 331 of file Type.h.
Referenced by ByteswapSCANFResults(), and llvm::MVT::getTypeForMVT().
const IntegerType * Type::Int32Ty = new BuiltinIntegerType(32) [static] |
Definition at line 331 of file Type.h.
Referenced by llvm::IntrinsicLowering::AddPrototypes(), ByteswapSCANFResults(), llvm::DIFactory::CreateBasicType(), llvm::DebugInfoBuilder::createBasicTypeDescriptor(), llvm::DebugInfoBuilder::createCharacterTypeDescriptor(), llvm::DIFactory::CreateCompileUnit(), llvm::DebugInfoBuilder::createCompileUnitDescriptor(), llvm::DIFactory::CreateCompositeType(), llvm::DIFactory::CreateDerivedType(), llvm::DebugInfoBuilder::createFloatTypeDescriptor(), llvm::IRBuilder< preserveNames, T >::CreateGlobalStringPtr(), llvm::DIFactory::CreateGlobalVariable(), llvm::DebugInfoBuilder::createIntegerTypeDescriptor(), llvm::DebugInfoBuilder::createPointerTypeDescriptor(), llvm::IRBuilder< preserveNames, T >::CreateStructGEP(), llvm::DIFactory::CreateSubprogram(), llvm::DebugInfoBuilder::createSubProgramDescriptor(), llvm::DIFactory::CreateVariable(), llvm::DebugInfoBuilder::DebugInfoBuilder(), llvm::ARMRegisterInfo::emitLoadConstPool(), llvm::ExtractElementInst::ExtractElementInst(),