LLVM
8.0.1
|
#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 45 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 54 of file ValueEnumerator.h.
using llvm::ValueEnumerator::TypeList = std::vector<Type *> |
Definition at line 47 of file ValueEnumerator.h.
using llvm::ValueEnumerator::ValueList = std::vector<std::pair<const Value *, unsigned> > |
Definition at line 50 of file ValueEnumerator.h.
Definition at line 321 of file ValueEnumerator.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::dyn_cast(), 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 470 of file ValueEnumerator.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 184 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 222 of file ValueEnumerator.h.
Referenced by getAttrKindEncoding().
|
inline |
Definition at line 177 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 220 of file ValueEnumerator.h.
Referenced by getAttrKindEncoding().
|
inline |
Definition at line 216 of file ValueEnumerator.h.
Referenced by emitSignedInt64().
Definition at line 450 of file ValueEnumerator.cpp.
References assert(), and llvm::UniqueVector< T >::idFor().
Referenced by getComdats(), and getStringEncoding().
|
inline |
Definition at line 226 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 194 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 444 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 205 of file ValueEnumerator.h.
References llvm::makeArrayRef().
Definition at line 154 of file ValueEnumerator.h.
References assert(), and getMetadataOrNullID().
Referenced by getOptimizationFlags(), getValueID(), and rotateSign().
Definition at line 160 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 210 of file ValueEnumerator.h.
References llvm::makeArrayRef().
Definition at line 168 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 214 of file ValueEnumerator.h.
Referenced by computeBitsRequiredForTypeIndicies(), emitSignedInt64(), and getAttrKindEncoding().
Definition at line 460 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 writeTypeIdSummaryRecord().
Definition at line 199 of file ValueEnumerator.h.
Referenced by emitSignedInt64().
|
inline |
Check whether the current block has any metadata to emit.
Definition at line 202 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 945 of file ValueEnumerator.cpp.
References llvm::Function::args(), assert(), llvm::ValueMap< KeyT, ValueT, Config >::count(), I, llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::SmallVectorBase::size().
Referenced by emitSignedInt64(), and getComdats().
|
inline |
Definition at line 164 of file ValueEnumerator.h.
|
delete |
void ValueEnumerator::print | ( | raw_ostream & | OS, |
const ValueMapType & | Map, | ||
const char * | Name | ||
) | const |
Definition at line 478 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 506 of file ValueEnumerator.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::ValueSymbolTable::begin(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin(), C, E, llvm::SmallVectorBase::empty(), llvm::ValueSymbolTable::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::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(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), and VI.
void ValueEnumerator::purgeFunction | ( | ) |
Remove purged values from the ValueMap.
Definition at line 1005 of file ValueEnumerator.cpp.
References 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 456 of file ValueEnumerator.cpp.
References I.
Referenced by emitSignedInt64(), and getTypeID().
|
inline |
Definition at line 166 of file ValueEnumerator.h.
Referenced by emitSignedInt64(), and writeIdentificationBlock().
UseListOrderStack llvm::ValueEnumerator::UseListOrders |
Definition at line 56 of file ValueEnumerator.h.
Referenced by emitSignedInt64(), and ValueEnumerator().