LLVM 19.0.0git
Public Member Functions | List of all members
llvm::sampleprof::SampleProfileMap Class Reference

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"

Inheritance diagram for llvm::sampleprof::SampleProfileMap:
Inheritance graph
[legend]

Public Member Functions

mapped_typeCreate (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, booltry_emplace (const key_type &Hash, const original_key_type &Key, Ts &&...Args)
 
std::pair< iterator, booltry_emplace (const original_key_type &Key, Ts &&...Args)
 
std::pair< iterator, boolemplace (Ts &&...Args)
 
mapped_typeoperator[] (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
 

Detailed Description

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 1305 of file SampleProf.h.

Member Function Documentation

◆ Create()

mapped_type & llvm::sampleprof::SampleProfileMap::Create ( const SampleContext Ctx)
inline

◆ erase() [1/3]

size_t llvm::sampleprof::SampleProfileMap::erase ( const key_type Key)
inline

Definition at line 1332 of file SampleProf.h.

◆ erase() [2/3]

size_t llvm::sampleprof::SampleProfileMap::erase ( const SampleContext Ctx)
inline

◆ erase() [3/3]

iterator llvm::sampleprof::SampleProfileMap::erase ( iterator  It)
inline

Definition at line 1334 of file SampleProf.h.

◆ find() [1/2]

iterator llvm::sampleprof::SampleProfileMap::find ( const SampleContext Ctx)
inline

◆ find() [2/2]

const_iterator llvm::sampleprof::SampleProfileMap::find ( const SampleContext Ctx) const
inline

The documentation for this class was generated from the following file: