LLVM  8.0.1
Public Member Functions | 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...
 

Public Attributes

StringRef Name
 
uint64_t Hash
 
- Public Attributes inherited from llvm::InstrProfRecord
std::vector< uint64_t > Counts
 

Detailed Description

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

Member Data Documentation

◆ Hash

uint64_t llvm::NamedInstrProfRecord::Hash

Definition at line 769 of file InstrProf.h.

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

◆ Name

StringRef llvm::NamedInstrProfRecord::Name

Definition at line 768 of file InstrProf.h.

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


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