LLVM API Documentation

llvm::ValueEnumerator Class Reference

#include <ValueEnumerator.h>

Collaboration diagram for llvm::ValueEnumerator:
[legend]

List of all members.

Public Types

typedef std::vector< std::pair
< const Type *, unsigned > > 
TypeList
typedef std::vector< std::pair
< const Value *, unsigned > > 
ValueList

Public Member Functions

 ValueEnumerator (const Module *M)
 ValueEnumerator - Enumerate module-level information.
unsigned getValueID (const Value *V) const
unsigned getTypeID (const Type *T) const
unsigned getAttributeID (const AttrListPtr &PAL) const
void getFunctionConstantRange (unsigned &Start, unsigned &End) const
const ValueList & getValues () const
const TypeList & getTypes () const
const std::vector< const
BasicBlock * > & 
getBasicBlocks () const
const std::vector< AttrListPtr > & getAttributes () const
int PurgeAggregateValues ()
void incorporateFunction (const Function &F)
void purgeFunction ()


Detailed Description

Definition at line 32 of file ValueEnumerator.h.


Member Typedef Documentation

typedef std::vector<std::pair<const Type*, unsigned> > llvm::ValueEnumerator::TypeList

Definition at line 35 of file ValueEnumerator.h.

typedef std::vector<std::pair<const Value*, unsigned> > llvm::ValueEnumerator::ValueList

Definition at line 38 of file ValueEnumerator.h.


Constructor & Destructor Documentation

ValueEnumerator::ValueEnumerator ( const Module *  M  ) 


Member Function Documentation

unsigned llvm::ValueEnumerator::getValueID ( const Value *  V  )  const [inline]

unsigned llvm::ValueEnumerator::getTypeID ( const Type *  T  )  const [inline]

unsigned llvm::ValueEnumerator::getAttributeID ( const AttrListPtr &  PAL  )  const [inline]

void llvm::ValueEnumerator::getFunctionConstantRange ( unsigned &  Start,
unsigned &  End 
) const [inline]

getFunctionConstantRange - Return the range of values that corresponds to function-local constants.

Definition at line 88 of file ValueEnumerator.h.

Referenced by WriteFunction().

const ValueList& llvm::ValueEnumerator::getValues (  )  const [inline]

Definition at line 93 of file ValueEnumerator.h.

Referenced by WriteConstants(), and WriteModuleConstants().

const TypeList& llvm::ValueEnumerator::getTypes (  )  const [inline]

Definition at line 94 of file ValueEnumerator.h.

Referenced by WriteBlockInfo(), WriteTypeSymbolTable(), and WriteTypeTable().

const std::vector<const BasicBlock*>& llvm::ValueEnumerator::getBasicBlocks (  )  const [inline]

Definition at line 95 of file ValueEnumerator.h.

Referenced by WriteFunction().

const std::vector<AttrListPtr>& llvm::ValueEnumerator::getAttributes (  )  const [inline]

Definition at line 98 of file ValueEnumerator.h.

Referenced by ValueEnumerator(), and WriteAttributeTable().

int ValueEnumerator::PurgeAggregateValues (  ) 

PurgeAggregateValues - If there are any aggregate values at the end of the value list, remove them and return the count of the remaining values. If there are none, return -1.

PurgeAggregateValues - If there are any aggregate values at the end of the value list, remove them and return the count of the remaining values. If there are none, return -1.

Definition at line 265 of file ValueEnumerator.cpp.

Referenced by WriteModule().

void ValueEnumerator::incorporateFunction ( const Function &  F  ) 

incorporateFunction/purgeFunction - If you'd like to deal with a function, use these two methods to get its data into the ValueEnumerator!

Definition at line 278 of file ValueEnumerator.cpp.

References llvm::Function::arg_begin(), llvm::Function::arg_end(), BB, llvm::MachineBasicBlock::begin(), llvm::Function::begin(), E, llvm::MachineBasicBlock::end(), llvm::Function::end(), llvm::Function::getAttributes(), and llvm::Type::VoidTy.

Referenced by WriteFunction().

void ValueEnumerator::purgeFunction (  ) 

Remove purged values from the ValueMap.

Definition at line 319 of file ValueEnumerator.cpp.

Referenced by WriteFunction().


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