LLVM API Documentation
#include <ValueEnumerator.h>
Public Types | |
| typedef std::vector< Type * > | TypeList |
| typedef std::vector< std::pair < const Value *, unsigned > > | ValueList |
Public Member Functions | |
| ValueEnumerator (const Module *M) | |
| ValueEnumerator - Enumerate module-level information. | |
| void | dump () const |
| void | print (raw_ostream &OS, const ValueMapType &Map, const char *Name) const |
| unsigned | getValueID (const Value *V) const |
| unsigned | getTypeID (Type *T) const |
| unsigned | getInstructionID (const Instruction *I) const |
| void | setInstructionID (const Instruction *I) |
| unsigned | getAttributeID (AttributeSet PAL) const |
| unsigned | getAttributeGroupID (AttributeSet PAL) const |
| void | getFunctionConstantRange (unsigned &Start, unsigned &End) const |
| const ValueList & | getValues () const |
| const ValueList & | getMDValues () const |
| const SmallVector< const MDNode *, 8 > & | getFunctionLocalMDValues () const |
| const TypeList & | getTypes () const |
| const std::vector< const BasicBlock * > & | getBasicBlocks () const |
| const std::vector< AttributeSet > & | getAttributes () const |
| const std::vector< AttributeSet > & | getAttributeGroups () const |
| unsigned | getGlobalBasicBlockID (const BasicBlock *BB) const |
| void | incorporateFunction (const Function &F) |
| void | purgeFunction () |
Definition at line 37 of file ValueEnumerator.h.
| typedef std::vector<Type*> llvm::ValueEnumerator::TypeList |
Definition at line 39 of file ValueEnumerator.h.
| typedef std::vector<std::pair<const Value*, unsigned> > llvm::ValueEnumerator::ValueList |
Definition at line 42 of file ValueEnumerator.h.
| ValueEnumerator::ValueEnumerator | ( | const Module * | M | ) |
ValueEnumerator - Enumerate module-level information.
Definition at line 32 of file ValueEnumerator.cpp.
References llvm::Module::alias_begin(), llvm::Module::alias_end(), llvm::Module::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::Module::end(), F(), getAttributes(), llvm::Module::getValueSymbolTable(), llvm::Module::global_begin(), llvm::Module::global_end(), I, and llvm::SmallVectorTemplateCommon< T >::size().
| void ValueEnumerator::dump | ( | ) | const |
Definition at line 134 of file ValueEnumerator.cpp.
References llvm::dbgs(), and print().
| unsigned llvm::ValueEnumerator::getAttributeGroupID | ( | AttributeSet | PAL | ) | const [inline] |
Definition at line 112 of file ValueEnumerator.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), I, and llvm::AttributeSet::isEmpty().
Referenced by WriteAttributeGroupTable(), and WriteAttributeTable().
| const std::vector<AttributeSet>& llvm::ValueEnumerator::getAttributeGroups | ( | ) | const [inline] |
Definition at line 138 of file ValueEnumerator.h.
Referenced by WriteAttributeGroupTable().
| unsigned llvm::ValueEnumerator::getAttributeID | ( | AttributeSet | PAL | ) | const [inline] |
Definition at line 105 of file ValueEnumerator.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), I, and llvm::AttributeSet::isEmpty().
Referenced by WriteInstruction(), and WriteModuleInfo().
| const std::vector<AttributeSet>& llvm::ValueEnumerator::getAttributes | ( | ) | const [inline] |
Definition at line 135 of file ValueEnumerator.h.
Referenced by ValueEnumerator(), and WriteAttributeTable().
| const std::vector<const BasicBlock*>& llvm::ValueEnumerator::getBasicBlocks | ( | ) | const [inline] |
Definition at line 132 of file ValueEnumerator.h.
Referenced by WriteFunction().
| 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 121 of file ValueEnumerator.h.
Referenced by WriteFunction().
| const SmallVector<const MDNode *, 8>& llvm::ValueEnumerator::getFunctionLocalMDValues | ( | ) | const [inline] |
Definition at line 128 of file ValueEnumerator.h.
Referenced by WriteFunctionLocalMetadata().
| unsigned ValueEnumerator::getGlobalBasicBlockID | ( | const BasicBlock * | BB | ) | const |
getGlobalBasicBlockID - This returns the function-specific ID for the specified basic block. This is relatively expensive information, so it should only be used by rare constructs such as address-of-label.
Definition at line 532 of file ValueEnumerator.cpp.
References llvm::BasicBlock::getParent(), and IncorporateFunctionInfoGlobalBBIDs().
Referenced by WriteConstants().
| unsigned ValueEnumerator::getInstructionID | ( | const Instruction * | I | ) | const |
Definition at line 112 of file ValueEnumerator.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and I.
Referenced by WriteMetadataAttachment().
| const ValueList& llvm::ValueEnumerator::getMDValues | ( | ) | const [inline] |
Definition at line 127 of file ValueEnumerator.h.
Referenced by WriteModuleMetadata().
Definition at line 96 of file ValueEnumerator.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), and I.
Referenced by PushValueAndType(), WriteConstants(), WriteInstruction(), WriteMDNode(), WriteModuleInfo(), and WriteTypeTable().
| const TypeList& llvm::ValueEnumerator::getTypes | ( | ) | const [inline] |
Definition at line 131 of file ValueEnumerator.h.
Referenced by WriteBlockInfo(), and WriteTypeTable().
Definition at line 122 of file ValueEnumerator.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::ValueMap< KeyT, ValueT, Config >::find(), and I.
Referenced by pushValue(), pushValue64(), PushValueAndType(), pushValueSigned(), WriteConstants(), WriteFunction(), WriteInstruction(), WriteMDNode(), WriteMetadataAttachment(), WriteModuleInfo(), WriteModuleMetadata(), and WriteValueSymbolTable().
| const ValueList& llvm::ValueEnumerator::getValues | ( | ) | const [inline] |
Definition at line 126 of file ValueEnumerator.h.
Referenced by WriteConstants(), and WriteModuleConstants().
| 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 443 of file ValueEnumerator.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Function::begin(), llvm::Function::end(), llvm::Function::getAttributes(), llvm::MDNode::getFunction(), I, llvm::MDNode::isFunctionLocal(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by WriteFunction(), and WriteFunctionUseList().
| void ValueEnumerator::print | ( | raw_ostream & | OS, |
| const ValueMapType & | Map, | ||
| const char * | Name | ||
| ) | const |
Definition at line 141 of file ValueEnumerator.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::begin(), llvm::Value::dump(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::Value::getName(), llvm::Value::hasName(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::size(), llvm::Value::use_begin(), and llvm::Value::use_end().
Referenced by dump().
| void ValueEnumerator::purgeFunction | ( | ) |
Remove purged values from the ValueMap.
Definition at line 507 of file ValueEnumerator.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::ValueMap< KeyT, ValueT, Config >::erase(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase().
Referenced by WriteFunction(), and WriteFunctionUseList().
| void ValueEnumerator::setInstructionID | ( | const Instruction * | I | ) |