LLVM API Documentation
#include <ValueEnumerator.h>
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 () |
Definition at line 32 of file ValueEnumerator.h.
| 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.
| ValueEnumerator::ValueEnumerator | ( | const Module * | M | ) |
ValueEnumerator - Enumerate module-level information.
Definition at line 41 of file ValueEnumerator.cpp.
References llvm::Module::alias_begin(), llvm::Module::alias_end(), BB, llvm::MachineBasicBlock::begin(), llvm::Module::begin(), CompareByFrequency(), E, llvm::MachineBasicBlock::end(), llvm::Module::end(), F, first, getAttributes(), llvm::Module::getTypeSymbolTable(), llvm::Module::getValueSymbolTable(), llvm::Module::global_begin(), llvm::Module::global_end(), II, isSingleValueType(), and Values.
Definition at line 67 of file ValueEnumerator.h.
Referenced by PushValueAndType(), WriteConstants(), WriteInstruction(), WriteModuleInfo(), and WriteValueSymbolTable().
Definition at line 73 of file ValueEnumerator.h.
Referenced by PushValueAndType(), WriteConstants(), WriteInstruction(), WriteModuleInfo(), WriteTypeSymbolTable(), and WriteTypeTable().
| unsigned llvm::ValueEnumerator::getAttributeID | ( | const AttrListPtr & | PAL | ) | const [inline] |
Definition at line 79 of file ValueEnumerator.h.
References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find(), llvm::AttrListPtr::getRawPointer(), and llvm::AttrListPtr::isEmpty().
Referenced by WriteInstruction(), and WriteModuleInfo().
| 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] |
| 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().