Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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)
LLVM_ABI hash_value_type ComputeHash (StringRef K)
StringRef ReadKey (const unsigned char *D, offset_type N)
LLVM_ABI bool readValueProfilingData (const unsigned char *&D, const unsigned char *const End)
LLVM_ABI data_type ReadData (StringRef K, const unsigned char *D, offset_type N)
void setValueProfDataEndianness (llvm::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 515 of file InstrProfReader.h.

Member Typedef Documentation

◆ data_type

◆ external_key_type

◆ hash_value_type

◆ internal_key_type

◆ offset_type

Constructor & Destructor Documentation

◆ InstrProfLookupTrait()

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

Definition at line 525 of file InstrProfReader.h.

Member Function Documentation

◆ ComputeHash()

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

Definition at line 916 of file InstrProfReader.cpp.

References llvm::IndexedInstrProf::ComputeHash().

◆ EqualKey()

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

Definition at line 535 of file InstrProfReader.h.

References A(), and B().

◆ GetExternalKey()

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

Definition at line 537 of file InstrProfReader.h.

◆ GetInternalKey()

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

Definition at line 536 of file InstrProfReader.h.

◆ ReadData()

◆ ReadKey()

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

Definition at line 552 of file InstrProfReader.h.

References D(), and N.

◆ ReadKeyDataLength()

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

Definition at line 542 of file InstrProfReader.h.

References D(), and llvm::support::endian::readNext().

◆ readValueProfilingData()

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

Definition at line 923 of file InstrProfReader.cpp.

References D(), llvm::Expected< T >::get(), and llvm::Expected< T >::takeError().

Referenced by ReadData().

◆ setValueProfDataEndianness()

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

Definition at line 562 of file InstrProfReader.h.


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