LLVM: llvm::StableFunctionMap Struct Reference (original) (raw)

#include "[llvm/CGData/StableFunctionMap.h](StableFunctionMap%5F8h%5Fsource.html)"

Public Member Functions
LLVM_ABI_FOR_TEST const HashFuncsMapType & getFunctionMap () const
Get the HashToFuncs map for serialization.
ArrayRef< std::string > getNames () const
Get the NameToId vector for serialization.
LLVM_ABI unsigned getIdOrCreateForName (StringRef Name)
Get an existing ID associated with the given name or create a new ID if it doesn't exist.
LLVM_ABI std::optional< std::string > getNameForId (unsigned Id) const
Get the name associated with a given ID.
LLVM_ABI void insert (const StableFunction &Func)
Insert a StableFunction object into the function map.
LLVM_ABI void merge (const StableFunctionMap &OtherMap)
Merge a OtherMap into this function map.
bool empty () const
bool contains (HashFuncsMapType::key_type FunctionHash) const
const StableFunctionEntries & at (HashFuncsMapType::key_type FunctionHash) const
LLVM_ABI size_t size (SizeType Type=UniqueHashCount) const
LLVM_ABI void finalize (bool SkipTrim=false)
Finalize the stable function map by trimming content.
Friends
struct StableFunctionMapRecord

Definition at line 55 of file StableFunctionMap.h.

HashFuncsMapType

StableFunctionEntries

Initial value:

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

Definition at line 78 of file StableFunctionMap.h.

SizeType

Enumerator
UniqueHashCount
TotalFunctionCount
MergeableFunctionCount

Definition at line 144 of file StableFunctionMap.h.

at()

const StableFunctionMap::StableFunctionEntries & StableFunctionMap::at ( HashFuncsMapType::key_type FunctionHash ) const

Returns

the stable function entries for the given function hash. If the map is lazily loaded, it will deserialize the entries if it is not already done, other requests to the same hash at the same time will be blocked until the entries are deserialized.

Definition at line 138 of file StableFunctionMap.cpp.

References assert().

Referenced by llvm::GlobalMergeFunc::merge().

contains()

bool llvm::StableFunctionMap::contains ( HashFuncsMapType::key_type FunctionHash) const inline

empty()

bool llvm::StableFunctionMap::empty ( ) const inline

finalize()

void StableFunctionMap::finalize ( bool SkipTrim = false )

Finalize the stable function map by trimming content.

Definition at line 243 of file StableFunctionMap.cpp.

References assert(), llvm::SmallVectorImpl< T >::erase(), getNameForId(), I, llvm::Invalid, isProfitable(), P, llvm::SmallVectorTemplateBase< T, bool >::push_back(), removeIdenticalIndexPair(), and llvm::stable_sort().

getFunctionMap()

const StableFunctionMap::HashFuncsMapType & StableFunctionMap::getFunctionMap ( ) const

getIdOrCreateForName()

getNameForId()

std::optional< std::string > StableFunctionMap::getNameForId ( unsigned Id ) const

getNames()

ArrayRef< std::string > llvm::StableFunctionMap::getNames ( ) const inline

insert()

merge()

size()

size_t StableFunctionMap::size ( SizeType Type = UniqueHashCount ) const

StableFunctionMapRecord


The documentation for this struct was generated from the following files: