LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::NamedInstrProfRecord Struct Reference

#include "llvm/ProfileData/InstrProf.h"

Inheritance diagram for llvm::NamedInstrProfRecord:
Inheritance graph
[legend]

Public Member Functions

 NamedInstrProfRecord ()=default
 
 NamedInstrProfRecord (StringRef Name, uint64_t Hash, std::vector< uint64_t > Counts)
 
 NamedInstrProfRecord (StringRef Name, uint64_t Hash, std::vector< uint64_t > Counts, std::vector< uint8_t > BitmapBytes)
 
- Public Member Functions inherited from llvm::InstrProfRecord
 InstrProfRecord ()=default
 
 InstrProfRecord (std::vector< uint64_t > Counts)
 
 InstrProfRecord (std::vector< uint64_t > Counts, std::vector< uint8_t > BitmapBytes)
 
 InstrProfRecord (InstrProfRecord &&)=default
 
 InstrProfRecord (const InstrProfRecord &RHS)
 
InstrProfRecordoperator= (InstrProfRecord &&)=default
 
InstrProfRecordoperator= (const InstrProfRecord &RHS)
 
uint32_t getNumValueKinds () const
 Return the number of value profile kinds with non-zero number of profile sites.
 
uint32_t getNumValueSites (uint32_t ValueKind) const
 Return the number of instrumented sites for ValueKind.
 
uint32_t getNumValueData (uint32_t ValueKind) const
 Return the total number of ValueData for ValueKind.
 
ArrayRef< InstrProfValueData > getValueArrayForSite (uint32_t ValueKind, uint32_t Site) const
 Return the array of profiled values at Site.
 
void reserveSites (uint32_t ValueKind, uint32_t NumValueSites)
 Reserve space for NumValueSites sites.
 
void addValueData (uint32_t ValueKind, uint32_t Site, ArrayRef< InstrProfValueData > VData, InstrProfSymtab *SymTab)
 Add ValueData for ValueKind at value Site.
 
void merge (InstrProfRecord &Other, uint64_t Weight, function_ref< void(instrprof_error)> Warn)
 Merge the counts in Other into this one.
 
void scale (uint64_t N, uint64_t D, function_ref< void(instrprof_error)> Warn)
 Scale up profile counts (including value profile data) by a factor of (N / D).
 
void sortValueData ()
 Sort value profile data (per site) by count.
 
void Clear ()
 Clear value data entries and edge counters.
 
void clearValueData ()
 Clear value data entries.
 
void accumulateCounts (CountSumOrPercent &Sum) const
 Compute the sums of all counts and store in Sum.
 
void overlap (InstrProfRecord &Other, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap, uint64_t ValueCutoff)
 Compute the overlap b/w this IntrprofRecord and Other.
 
void overlapValueProfData (uint32_t ValueKind, InstrProfRecord &Src, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap)
 Compute the overlap of value profile counts.
 
CountPseudoKind getCountPseudoKind () const
 
void setPseudoCount (CountPseudoKind Kind)
 

Static Public Member Functions

static bool hasCSFlagInHash (uint64_t FuncHash)
 
static void setCSFlagInHash (uint64_t &FuncHash)
 

Public Attributes

StringRef Name
 
uint64_t Hash
 
- Public Attributes inherited from llvm::InstrProfRecord
std::vector< uint64_tCounts
 
std::vector< uint8_tBitmapBytes
 

Static Public Attributes

static const int CS_FLAG_IN_FUNC_HASH = 60
 

Additional Inherited Members

- Public Types inherited from llvm::InstrProfRecord
enum  CountPseudoKind { NotPseudo = 0 , PseudoHot , PseudoWarm }
 
enum  PseudoCountVal { HotFunctionVal = -1 , WarmFunctionVal = -2 }
 

Detailed Description

Definition at line 997 of file InstrProf.h.

Constructor & Destructor Documentation

◆ NamedInstrProfRecord() [1/3]

llvm::NamedInstrProfRecord::NamedInstrProfRecord ( )
default

◆ NamedInstrProfRecord() [2/3]

llvm::NamedInstrProfRecord::NamedInstrProfRecord ( StringRef  Name,
uint64_t  Hash,
std::vector< uint64_t Counts 
)
inline

Definition at line 1005 of file InstrProf.h.

◆ NamedInstrProfRecord() [3/3]

llvm::NamedInstrProfRecord::NamedInstrProfRecord ( StringRef  Name,
uint64_t  Hash,
std::vector< uint64_t Counts,
std::vector< uint8_t BitmapBytes 
)
inline

Definition at line 1008 of file InstrProf.h.

Member Function Documentation

◆ hasCSFlagInHash()

static bool llvm::NamedInstrProfRecord::hasCSFlagInHash ( uint64_t  FuncHash)
inlinestatic

◆ setCSFlagInHash()

static void llvm::NamedInstrProfRecord::setCSFlagInHash ( uint64_t FuncHash)
inlinestatic

Definition at line 1017 of file InstrProf.h.

References CS_FLAG_IN_FUNC_HASH.

Member Data Documentation

◆ CS_FLAG_IN_FUNC_HASH

const int llvm::NamedInstrProfRecord::CS_FLAG_IN_FUNC_HASH = 60
static

Definition at line 1002 of file InstrProf.h.

Referenced by hasCSFlagInHash(), and setCSFlagInHash().

◆ Hash

uint64_t llvm::NamedInstrProfRecord::Hash

Definition at line 999 of file InstrProf.h.

◆ Name

StringRef llvm::NamedInstrProfRecord::Name

Definition at line 998 of file InstrProf.h.


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