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 ValueList & | getMDValues () const |
| const TypeList & | getTypes () const |
| const std::vector< const BasicBlock * > & | getBasicBlocks () const |
| const std::vector< AttrListPtr > & | getAttributes () const |
| void | incorporateFunction (const Function &F) |
| void | purgeFunction () |
Definition at line 33 of file ValueEnumerator.h.
| typedef std::vector<std::pair<const Type*, unsigned> > llvm::ValueEnumerator::TypeList |
Definition at line 36 of file ValueEnumerator.h.
| typedef std::vector<std::pair<const Value*, unsigned> > llvm::ValueEnumerator::ValueList |
Definition at line 39 of file ValueEnumerator.h.
| ValueEnumerator::ValueEnumerator | ( | const Module * | M | ) |
ValueEnumerator - Enumerate module-level information.
Definition at line 42 of file ValueEnumerator.cpp.
References llvm::Module::alias_begin(), llvm::Module::alias_end(), BB, llvm::MachineBasicBlock::begin(), llvm::Module::begin(), CompareByFrequency(), E, llvm::Module::end(), llvm::MachineBasicBlock::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 117 of file ValueEnumerator.cpp.
Referenced by PushValueAndType(), WriteConstants(), WriteInstruction(), WriteMDNode(), WriteModuleInfo(), WriteModuleMetadata(), and WriteValueSymbolTable().
Definition at line 72 of file ValueEnumerator.h.
Referenced by PushValueAndType(), WriteConstants(), WriteInstruction(), WriteMDNode(), WriteModuleInfo(), WriteTypeSymbolTable(), and WriteTypeTable().
| unsigned llvm::ValueEnumerator::getAttributeID | ( | const AttrListPtr & | PAL | ) | const [inline] |
Definition at line 78 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 87 of file ValueEnumerator.h.
Referenced by WriteFunction().
| const ValueList& llvm::ValueEnumerator::getValues | ( | ) | const [inline] |
Definition at line 92 of file ValueEnumerator.h.
Referenced by WriteConstants(), and WriteModuleConstants().
| const ValueList& llvm::ValueEnumerator::getMDValues | ( | ) | const [inline] |
| 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().
| 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 327 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(), llvm::Function::getContext(), and llvm::Type::getVoidTy().
Referenced by WriteFunction().
| void ValueEnumerator::purgeFunction | ( | ) |
Remove purged values from the ValueMap.
Definition at line 368 of file ValueEnumerator.cpp.
Referenced by WriteFunction().