|
LLVM
10.0.0
|
#include "Bitcode/Writer/ValueEnumerator.h"
Public Types | |
| using | TypeList = std::vector< Type * > |
| using | ValueList = std::vector< std::pair< const Value *, unsigned > > |
| using | IndexAndAttrSet = std::pair< unsigned, AttributeSet > |
| Attribute groups as encoded in bitcode are almost AttributeSets, but they include the AttributeList index, so we have to track that in our map. More... | |
Public Attributes | |
| UseListOrderStack | UseListOrders |
Definition at line 44 of file ValueEnumerator.h.
| using llvm::ValueEnumerator::IndexAndAttrSet = std::pair<unsigned, AttributeSet> |
Attribute groups as encoded in bitcode are almost AttributeSets, but they include the AttributeList index, so we have to track that in our map.
Definition at line 53 of file ValueEnumerator.h.
| using llvm::ValueEnumerator::TypeList = std::vector<Type *> |
Definition at line 46 of file ValueEnumerator.h.
| using llvm::ValueEnumerator::ValueList = std::vector<std::pair<const Value *, unsigned> > |
Definition at line 49 of file ValueEnumerator.h.
Definition at line 320 of file ValueEnumerator.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::dyn_cast(), llvm::numbers::e, F(), llvm::AttributeList::FunctionIndex, llvm::Type::getMetadataTy(), llvm::Module::globals(), I, predictUseListOrder(), second, and UseListOrders.
|
delete |
| uint64_t ValueEnumerator::computeBitsRequiredForTypeIndicies | ( | ) | const |
Definition at line 1039 of file ValueEnumerator.cpp.
References getTypes(), llvm::Log2_32_Ceil(), and llvm::size().
Referenced by emitSignedInt64(), getAttrKindEncoding(), and getComdats().
| LLVM_DUMP_METHOD void ValueEnumerator::dump | ( | ) | const |
Definition at line 467 of file ValueEnumerator.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 183 of file ValueEnumerator.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by getAttrKindEncoding().
|
inline |
Definition at line 221 of file ValueEnumerator.h.
Referenced by getAttrKindEncoding().
|
inline |
Definition at line 176 of file ValueEnumerator.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and llvm::AttributeList::isEmpty().
Referenced by emitSignedInt64(), and getStringEncoding().
|
inline |
Definition at line 219 of file ValueEnumerator.h.
Referenced by getAttrKindEncoding().
|
inline |
Definition at line 215 of file ValueEnumerator.h.
Referenced by emitSignedInt64().
Definition at line 447 of file ValueEnumerator.cpp.
References assert(), and llvm::UniqueVector< T >::idFor().
Referenced by getComdats(), and getStringEncoding().
|
inline |
Definition at line 225 of file ValueEnumerator.h.
References C, computeBitsRequiredForTypeIndicies(), F(), getComdatID(), getGlobalBasicBlockID(), incorporateFunction(), purgeFunction(), and llvm::ARM_MB::ST.
Referenced by getEncodedUnnamedAddr().
|
inline |
getFunctionConstantRange - Return the range of values that corresponds to function-local constants.
Definition at line 193 of file ValueEnumerator.h.
Referenced by emitSignedInt64().
| 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 1030 of file ValueEnumerator.cpp.
References llvm::BasicBlock::getParent(), and IncorporateFunctionInfoGlobalBBIDs().
Referenced by emitSignedInt64(), and getComdats().
| unsigned ValueEnumerator::getInstructionID | ( | const Instruction * | I | ) | const |
Definition at line 441 of file ValueEnumerator.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and I.
Referenced by getTypeID().
Get the MDString metadata for this block.
Definition at line 204 of file ValueEnumerator.h.
References llvm::makeArrayRef().
Definition at line 153 of file ValueEnumerator.h.
References assert(), and getMetadataOrNullID().
Referenced by getOptimizationFlags(), getValueID(), and rotateSign().
Definition at line 159 of file ValueEnumerator.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
Referenced by emitSignedInt64(), getMetadataID(), getOptimizationFlags(), and rotateSign().
Get the non-MDString metadata for this block.
Definition at line 209 of file ValueEnumerator.h.
References llvm::makeArrayRef().
Definition at line 167 of file ValueEnumerator.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), getInstructionID(), I, and setInstructionID().
Referenced by emitSignedInt64(), getAttrKindEncoding(), getOptimizationFlags(), getStringEncoding(), and print().
Definition at line 213 of file ValueEnumerator.h.
Referenced by computeBitsRequiredForTypeIndicies(), emitSignedInt64(), and getAttrKindEncoding().
Definition at line 457 of file ValueEnumerator.cpp.
References assert(), llvm::ValueMap< KeyT, ValueT, Config >::end(), llvm::ValueMap< KeyT, ValueT, Config >::find(), getMetadataID(), and I.
Referenced by emitSignedInt64(), getMetadataTypeOrder(), getOptimizationFlags(), getStringEncoding(), print(), and writeTypeIdCompatibleVtableSummaryRecord().
Definition at line 198 of file ValueEnumerator.h.
Referenced by emitSignedInt64().
|
inline |
Check whether the current block has any metadata to emit.
Definition at line 201 of file ValueEnumerator.h.
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 943 of file ValueEnumerator.cpp.
References llvm::Function::args(), assert(), llvm::ValueMap< KeyT, ValueT, Config >::count(), llvm::numbers::e, I, llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::SmallVectorBase::size().
Referenced by emitSignedInt64(), and getComdats().
|
inline |
Definition at line 163 of file ValueEnumerator.h.
|
delete |
| void ValueEnumerator::print | ( | raw_ostream & | OS, |
| const ValueMapType & | Map, | ||
| const char * | Name | ||
| ) | const |
Definition at line 475 of file ValueEnumerator.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), E, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::errs(), llvm::Value::getName(), llvm::Value::getNumUses(), llvm::Value::hasName(), I, llvm::Value::print(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::Value::use_begin(), and llvm::Value::uses().
Referenced by dump().
| void ValueEnumerator::print | ( | raw_ostream & | OS, |
| const MetadataMapType & | Map, | ||
| const char * | Name | ||
| ) | const |
Definition at line 503 of file ValueEnumerator.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), llvm::ValueSymbolTable::begin(), C, llvm::numbers::e, E, llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::ValueSymbolTable::end(), F(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::find_if(), first, llvm::NamedMDNode::getNumOperands(), llvm::NamedMDNode::getOperand(), getTypeID(), llvm::ValueAsMetadata::getValue(), getValueID(), I, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::MDNode::isDistinct(), isIntOrIntVectorValue(), N, llvm::Module::named_metadata(), llvm::MDNode::op_begin(), llvm::MDNode::op_end(), llvm::MDNode::operands(), llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::Metadata::print(), push(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::stable_sort(), and VI.
| void ValueEnumerator::purgeFunction | ( | ) |
Remove purged values from the ValueMap.
Definition at line 1005 of file ValueEnumerator.cpp.
References llvm::numbers::e, llvm::ValueMap< KeyT, ValueT, Config >::erase(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase().
Referenced by emitSignedInt64(), and getComdats().
| void ValueEnumerator::setInstructionID | ( | const Instruction * | I | ) |
Definition at line 453 of file ValueEnumerator.cpp.
References I.
Referenced by emitSignedInt64(), and getTypeID().
|
inline |
Definition at line 165 of file ValueEnumerator.h.
Referenced by emitSignedInt64(), and writeIdentificationBlock().
| UseListOrderStack llvm::ValueEnumerator::UseListOrders |
Definition at line 55 of file ValueEnumerator.h.
Referenced by emitSignedInt64(), and ValueEnumerator().
1.8.13