LLVM 20.0.0git
|
This class provides operator overloads to the map container using MD5 as the key type, so that existing code can still work in most cases using SampleContext as key. More...
#include "llvm/ProfileData/SampleProf.h"
Public Member Functions | |
mapped_type & | create (const SampleContext &Ctx) |
iterator | find (const SampleContext &Ctx) |
const_iterator | find (const SampleContext &Ctx) const |
size_t | erase (const SampleContext &Ctx) |
size_t | erase (const key_type &Key) |
iterator | erase (iterator It) |
Public Member Functions inherited from llvm::sampleprof::HashKeyMap< std::unordered_map, SampleContext, FunctionSamples > | |
std::pair< iterator, bool > | try_emplace (const key_type &Hash, const original_key_type &Key, Ts &&...Args) |
std::pair< iterator, bool > | try_emplace (const original_key_type &Key, Ts &&...Args) |
std::pair< iterator, bool > | emplace (Ts &&...Args) |
mapped_type & | operator[] (const original_key_type &Key) |
iterator | find (const original_key_type &Key) |
const_iterator | find (const original_key_type &Key) const |
mapped_type | lookup (const original_key_type &Key) const |
size_t | count (const original_key_type &Key) const |
size_t | erase (const original_key_type &Ctx) |
iterator | erase (const_iterator It) |
Additional Inherited Members | |
Public Types inherited from llvm::sampleprof::HashKeyMap< std::unordered_map, SampleContext, FunctionSamples > | |
using | base_type = std::unordered_map< decltype(hash_value(SampleContext())), FunctionSamples, MapTArgs... > |
using | key_type = decltype(hash_value(SampleContext())) |
using | original_key_type = SampleContext |
using | mapped_type = FunctionSamples |
using | value_type = typename base_type::value_type |
using | iterator = typename base_type::iterator |
using | const_iterator = typename base_type::const_iterator |
This class provides operator overloads to the map container using MD5 as the key type, so that existing code can still work in most cases using SampleContext as key.
Note: when populating container, make sure to assign the SampleContext to the mapped value immediately because the key no longer holds it.
Definition at line 1312 of file SampleProf.h.
|
inline |
Definition at line 1317 of file SampleProf.h.
References llvm::sampleprof::HashKeyMap< std::unordered_map, SampleContext, FunctionSamples >::try_emplace().
Referenced by llvm::SampleContextTracker::createContextLessProfileMap(), llvm::sampleprof::ProfileConverter::flattenProfile(), llvm::sampleprof::SampleProfileReaderText::readImpl(), and llvm::sampleprof::SampleContextTrimmer::trimAndMergeColdContextProfiles().
Definition at line 1339 of file SampleProf.h.
|
inline |
Definition at line 1334 of file SampleProf.h.
References llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::erase().
Referenced by llvm::sampleprof::DefaultFunctionPruningStrategy::Erase().
Definition at line 1341 of file SampleProf.h.
|
inline |
Definition at line 1324 of file SampleProf.h.
References llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::find().
Referenced by llvm::sampleprof::SampleProfileReader::getSamplesFor(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncMetadata().
|
inline |
Definition at line 1329 of file SampleProf.h.
References llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::find().