LLVM  10.0.0svn
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]
Collaboration diagram for llvm::NamedInstrProfRecord:
Collaboration graph
[legend]

Public Member Functions

 NamedInstrProfRecord ()=default
 
 NamedInstrProfRecord (StringRef Name, uint64_t Hash, std::vector< uint64_t > Counts)
 
- Public Member Functions inherited from llvm::InstrProfRecord
 InstrProfRecord ()=default
 
 InstrProfRecord (std::vector< uint64_t > Counts)
 
 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. More...
 
uint32_t getNumValueSites (uint32_t ValueKind) const
 Return the number of instrumented sites for ValueKind. More...
 
uint32_t getNumValueData (uint32_t ValueKind) const
 Return the total number of ValueData for ValueKind. More...
 
uint32_t getNumValueDataForSite (uint32_t ValueKind, uint32_t Site) const
 Return the number of value data collected for ValueKind at profiling site: Site. More...
 
std::unique_ptr< InstrProfValueData[]> getValueForSite (uint32_t ValueKind, uint32_t Site, uint64_t *TotalC=nullptr) const
 Return the array of profiled values at Site. More...
 
uint64_t getValueForSite (InstrProfValueData Dest[], uint32_t ValueKind, uint32_t Site) const
 Get the target value/counts of kind ValueKind collected at site Site and store the result in array Dest. More...
 
void reserveSites (uint32_t ValueKind, uint32_t NumValueSites)
 Reserve space for NumValueSites sites. More...
 
void addValueData (uint32_t ValueKind, uint32_t Site, InstrProfValueData *VData, uint32_t N, InstrProfSymtab *SymTab)
 Add ValueData for ValueKind at value Site. More...
 
void merge (InstrProfRecord &Other, uint64_t Weight, function_ref< void(instrprof_error)> Warn)
 Merge the counts in Other into this one. More...
 
void scale (uint64_t Weight, function_ref< void(instrprof_error)> Warn)
 Scale up profile counts (including value profile data) by Weight. More...
 
void sortValueData ()
 Sort value profile data (per site) by count. More...
 
void Clear ()
 Clear value data entries and edge counters. More...
 
void clearValueData ()
 Clear value data entries. More...
 
void accumulateCounts (CountSumOrPercent &Sum) const
 Compute the sums of all counts and store in Sum. More...
 
void overlap (InstrProfRecord &Other, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap, uint64_t ValueCutoff)
 Compute the overlap b/w this IntrprofRecord and Other. More...
 
void overlapValueProfData (uint32_t ValueKind, InstrProfRecord &Src, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap)
 Compute the overlap of value profile counts. More...
 

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_t > Counts
 

Static Public Attributes

static const int CS_FLAG_IN_FUNC_HASH = 60
 

Detailed Description

Definition at line 842 of file InstrProf.h.

Constructor & Destructor Documentation

◆ NamedInstrProfRecord() [1/2]

llvm::NamedInstrProfRecord::NamedInstrProfRecord ( )
default

◆ NamedInstrProfRecord() [2/2]

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

Definition at line 850 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 857 of file InstrProf.h.

Referenced by INITIALIZE_PASS().

Member Data Documentation

◆ CS_FLAG_IN_FUNC_HASH

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

Definition at line 847 of file InstrProf.h.

◆ Hash

uint64_t llvm::NamedInstrProfRecord::Hash

Definition at line 844 of file InstrProf.h.

Referenced by llvm::TextInstrProfReader::readNextRecord().

◆ Name

StringRef llvm::NamedInstrProfRecord::Name

Definition at line 843 of file InstrProf.h.

Referenced by llvm::TextInstrProfReader::readNextRecord().


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