LLVM  13.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::InstrProfLookupTrait Class Reference

Trait for lookups into the on-disk hash table for the binary instrprof format. More...

#include "llvm/ProfileData/InstrProfReader.h"

Public Types

using data_type = ArrayRef< NamedInstrProfRecord >
 
using internal_key_type = StringRef
 
using external_key_type = StringRef
 
using hash_value_type = uint64_t
 
using offset_type = uint64_t
 

Public Member Functions

 InstrProfLookupTrait (IndexedInstrProf::HashT HashType, unsigned FormatVersion)
 
hash_value_type ComputeHash (StringRef K)
 
StringRef ReadKey (const unsigned char *D, offset_type N)
 
bool readValueProfilingData (const unsigned char *&D, const unsigned char *const End)
 
data_type ReadData (StringRef K, const unsigned char *D, offset_type N)
 
void setValueProfDataEndianness (support::endianness Endianness)
 

Static Public Member Functions

static bool EqualKey (StringRef A, StringRef B)
 
static StringRef GetInternalKey (StringRef K)
 
static StringRef GetExternalKey (StringRef K)
 
static std::pair< offset_type, offset_typeReadKeyDataLength (const unsigned char *&D)
 

Detailed Description

Trait for lookups into the on-disk hash table for the binary instrprof format.

Definition at line 318 of file InstrProfReader.h.

Member Typedef Documentation

◆ data_type

Definition at line 331 of file InstrProfReader.h.

◆ external_key_type

Definition at line 334 of file InstrProfReader.h.

◆ hash_value_type

Definition at line 335 of file InstrProfReader.h.

◆ internal_key_type

Definition at line 333 of file InstrProfReader.h.

◆ offset_type

Definition at line 336 of file InstrProfReader.h.

Constructor & Destructor Documentation

◆ InstrProfLookupTrait()

llvm::InstrProfLookupTrait::InstrProfLookupTrait ( IndexedInstrProf::HashT  HashType,
unsigned  FormatVersion 
)
inline

Definition at line 328 of file InstrProfReader.h.

Member Function Documentation

◆ ComputeHash()

InstrProfLookupTrait::hash_value_type InstrProfLookupTrait::ComputeHash ( StringRef  K)

Definition at line 517 of file InstrProfReader.cpp.

References llvm::IndexedInstrProf::ComputeHash().

◆ EqualKey()

static bool llvm::InstrProfLookupTrait::EqualKey ( StringRef  A,
StringRef  B 
)
inlinestatic

Definition at line 338 of file InstrProfReader.h.

References B.

◆ GetExternalKey()

static StringRef llvm::InstrProfLookupTrait::GetExternalKey ( StringRef  K)
inlinestatic

Definition at line 340 of file InstrProfReader.h.

◆ GetInternalKey()

static StringRef llvm::InstrProfLookupTrait::GetInternalKey ( StringRef  K)
inlinestatic

Definition at line 339 of file InstrProfReader.h.

◆ ReadData()

data_type InstrProfLookupTrait::ReadData ( StringRef  K,
const unsigned char *  D,
offset_type  N 
)

Definition at line 538 of file InstrProfReader.cpp.

References N, and support().

◆ ReadKey()

StringRef llvm::InstrProfLookupTrait::ReadKey ( const unsigned char *  D,
offset_type  N 
)
inline

Definition at line 353 of file InstrProfReader.h.

References D, and N.

◆ ReadKeyDataLength()

static std::pair<offset_type, offset_type> llvm::InstrProfLookupTrait::ReadKeyDataLength ( const unsigned char *&  D)
inlinestatic

Definition at line 345 of file InstrProfReader.h.

References D, and support().

◆ readValueProfilingData()

bool InstrProfLookupTrait::readValueProfilingData ( const unsigned char *&  D,
const unsigned char *const  End 
)

Definition at line 524 of file InstrProfReader.cpp.

◆ setValueProfDataEndianness()

void llvm::InstrProfLookupTrait::setValueProfDataEndianness ( support::endianness  Endianness)
inline

Definition at line 362 of file InstrProfReader.h.

References llvm::msgpack::Endianness.


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