LLVM API Documentation

Type.cpp File Reference

#include "llvm/DerivedTypes.h"
#include "llvm/Constants.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Debug.h"
#include <algorithm>
#include <cstdarg>

Include dependency graph for Type.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  llvm::GraphTraits< TypePromotionGraph >
class  llvm::TypeMapBase
class  llvm::TypeMap< ValType, TypeClass >
class  llvm::IntegerValType
class  llvm::FunctionValType
class  llvm::ArrayValType
class  llvm::VectorValType
class  llvm::StructValType
class  llvm::PointerValType

Functions

static std::string getTypeDescription (const Type *Ty, std::vector< const Type * > &TypeStack)
static const std::string & getOrCreateDesc (std::map< const Type *, std::string > &Map, const Type *Ty)
static bool TypesEqual (const Type *Ty, const Type *Ty2, std::map< const Type *, const Type * > &EqTypes)
static bool TypesEqual (const Type *Ty, const Type *Ty2)
static bool AbstractTypeHasCycleThrough (const Type *TargetTy, const Type *CurTy, SmallPtrSet< const Type *, 128 > &VisitedTypes)
static bool ConcreteTypeHasCycleThrough (const Type *TargetTy, const Type *CurTy, SmallPtrSet< const Type *, 128 > &VisitedTypes)
static bool TypeHasCycleThroughItself (const Type *Ty)
static unsigned getSubElementHash (const Type *Ty)
std::ostream & llvm::operator<< (std::ostream &OS, const Type *T)
std::ostream & llvm::operator<< (std::ostream &OS, const Type &T)

Variables

static ManagedStatic< std::map
< const Type *, std::string > > 
ConcreteTypeDescriptions
static ManagedStatic< std::map
< const Type *, std::string > > 
AbstractTypeDescriptions
static ManagedStatic< TypeMap
< IntegerValType, IntegerType > > 
IntegerTypes
static ManagedStatic< TypeMap
< FunctionValType,
FunctionType > > 
FunctionTypes
static ManagedStatic< TypeMap
< ArrayValType, ArrayType > > 
ArrayTypes
static ManagedStatic< TypeMap
< VectorValType, VectorType > > 
VectorTypes
static ManagedStatic< TypeMap
< StructValType, StructType > > 
StructTypes
static ManagedStatic< TypeMap
< PointerValType, PointerType > > 
PointerTypes


Function Documentation

static bool AbstractTypeHasCycleThrough ( const Type TargetTy,
const Type CurTy,
SmallPtrSet< const Type *, 128 > &  VisitedTypes 
) [static]

static bool ConcreteTypeHasCycleThrough ( const Type TargetTy,
const Type CurTy,
SmallPtrSet< const Type *, 128 > &  VisitedTypes 
) [static]

static const std::string& getOrCreateDesc ( std::map< const Type *, std::string > &  Map,
const Type Ty 
) [static]

Definition at line 361 of file Type.cpp.

References getTypeDescription(), I, and TypeStack.

Referenced by llvm::Type::getDescription().

static unsigned getSubElementHash ( const Type Ty  )  [static]

getSubElementHash - Generate a hash value for all of the SubType's of this type. The hash value is guaranteed to be zero if any of the subtypes are an opaque type. Otherwise we try to mix them in as well as possible, but do not look at the subtype's subtype's.

Definition at line 756 of file Type.cpp.

References llvm::Type::ArrayTyID, llvm::Type::FunctionTyID, llvm::Type::getTypeID(), I, llvm::Type::IntegerTyID, llvm::Type::OpaqueTyID, llvm::Type::PointerTyID, llvm::Type::StructTyID, llvm::Type::subtype_begin(), llvm::Type::subtype_end(), and llvm::Type::VectorTyID.

Referenced by llvm::PointerValType::hashTypeStructure().

static std::string getTypeDescription ( const Type Ty,
std::vector< const Type * > &  TypeStack 
) [static]

static bool TypeHasCycleThroughItself ( const Type Ty  )  [static]

TypeHasCycleThroughItself - Return true if the specified type has a cycle back to itself.

Definition at line 735 of file Type.cpp.

References AbstractTypeHasCycleThrough(), ConcreteTypeHasCycleThrough(), I, llvm::Type::isAbstract(), llvm::Type::subtype_begin(), and llvm::Type::subtype_end().

Referenced by llvm::TypeMap< ValType, TypeClass >::RefineAbstractType().

static bool TypesEqual ( const Type Ty,
const Type Ty2 
) [static]

Definition at line 695 of file Type.cpp.

References TypesEqual().

static bool TypesEqual ( const Type Ty,
const Type Ty2,
std::map< const Type *, const Type * > &  EqTypes 
) [static]


Variable Documentation

ManagedStatic<std::map<const Type*, std::string> > AbstractTypeDescriptions [static]

Definition at line 1147 of file Type.cpp.

ManagedStatic<std::map<const Type*, std::string> > ConcreteTypeDescriptions [static]

Definition at line 46 of file Type.cpp.

Referenced by llvm::Type::getDescription(), and getTypeDescription().

Definition at line 1091 of file Type.cpp.

Definition at line 1020 of file Type.cpp.

Definition at line 1306 of file Type.cpp.

Referenced by RecursiveResolveTypes().

Definition at line 1245 of file Type.cpp.

Type* Ty

Definition at line 553 of file Type.cpp.

Referenced by llvm::TypeMap< ValType, TypeClass >::add(), ByteswapSCANFResults(), calculateFunctionInfo(), llvm::ComputeNumSignBits(), llvm::ConstantFoldCall(), llvm::ConstantFoldGetElementPtr(), llvm::MachOCodeEmitter::emitConstantPool(), llvm::AsmPrinter::EmitConstantPool(), llvm::AsmPrinter::EmitConstantValueOnly(), llvm::ExecutionEngine::emitGlobals(), EvaluateFunction(), fillTypeNameTable(), llvm::PATypeHolder::get(), llvm::IntegerValType::get(), llvm::ScalarEvolution::getAddExpr(), GetConstantPoolSizeInBytes(), getIndexedTypeInternal(), llvm::MachineFunction::getInfo(), llvm::DISerializer::getTagType(), llvm::SCEVSignExtendExpr::getType(), llvm::SCEVZeroExtendExpr::getType(), llvm::SCEVTruncateExpr::getType(), LLVMGetParamTypes(), LLVMGetStructElementTypes(), llvm::AlphaTargetLowering::LowerCallTo(), llvm::ELFTargetAsmInfo::MergeableStringSection(), llvm::SCEVSignExtendExpr::print(), llvm::SCEVZeroExtendExpr::print(), llvm::SCEVTruncateExpr::print(), llvm::SCEVSignExtendExpr::replaceSymbolicValuesWithConcrete(), llvm::SCEVZeroExtendExpr::replaceSymbolicValuesWithConcrete(), llvm::SCEVTruncateExpr::replaceSymbolicValuesWithConcrete(), llvm::DISerializer::Serialize(), llvm::FunctionLoweringInfo::set(), SRAGlobal(), llvm::SCEVExpander::visitAddRecExpr(), llvm::Interpreter::visitAllocationInst(), llvm::Interpreter::visitBinaryOperator(), llvm::Interpreter::visitCallSite(), llvm::Interpreter::visitFCmpInst(), llvm::Interpreter::visitICmpInst(), llvm::Interpreter::visitVAArgInst(), and WriteConstants().

Definition at line 1191 of file Type.cpp.




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.