LLVM: llvm::InstrProfRecord Struct Reference (original) (raw)
Profiling information for a single function. More...
#include "[llvm/ProfileData/InstrProf.h](InstrProf%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | CountPseudoKind { NotPseudo = 0 , PseudoHot, PseudoWarm } |
| enum | PseudoCountVal { HotFunctionVal = -1 , WarmFunctionVal = -2 } |
| Public Member Functions | |
|---|---|
| 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) | |
| InstrProfRecord & | operator= (InstrProfRecord &&)=default |
| InstrProfRecord & | operator= (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. | |
| LLVM_ABI void | addValueData (uint32_t ValueKind, uint32_t Site, ArrayRef< InstrProfValueData > VData, InstrProfSymtab *SymTab) |
| Add ValueData for ValueKind at value Site. | |
| LLVM_ABI void | merge (InstrProfRecord &Other, uint64_t Weight, function_ref< void(instrprof_error)> Warn) |
| Merge the counts in Other into this one. | |
| LLVM_ABI 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. | |
| LLVM_ABI void | accumulateCounts (CountSumOrPercent &Sum) const |
| Compute the sums of all counts and store in Sum. | |
| LLVM_ABI void | overlap (InstrProfRecord &Other, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap, uint64_t ValueCutoff) |
| Compute the overlap b/w this IntrprofRecord and Other. | |
| LLVM_ABI 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) |
Profiling information for a single function.
Definition at line 894 of file InstrProf.h.
◆ CountPseudoKind
| Enumerator |
|---|
| NotPseudo |
| PseudoHot |
| PseudoWarm |
Definition at line 984 of file InstrProf.h.
◆ PseudoCountVal
| Enumerator |
|---|
| HotFunctionVal |
| WarmFunctionVal |
Definition at line 989 of file InstrProf.h.
| llvm::InstrProfRecord::InstrProfRecord ( ) | default |
|---|
◆ InstrProfRecord() [2/5]
| llvm::InstrProfRecord::InstrProfRecord ( std::vector< uint64_t > Counts) | inline |
|---|
◆ InstrProfRecord() [3/5]
| llvm::InstrProfRecord::InstrProfRecord ( std::vector< uint64_t > Counts, std::vector< uint8_t > BitmapBytes ) | inline |
|---|
◆ InstrProfRecord() [4/5]
References InstrProfRecord().
◆ InstrProfRecord() [5/5]
◆ accumulateCounts()
◆ addValueData()
◆ Clear()
| void llvm::InstrProfRecord::Clear ( ) | inline |
|---|
◆ clearValueData()
| void llvm::InstrProfRecord::clearValueData ( ) | inline |
|---|
◆ getCountPseudoKind()
| CountPseudoKind llvm::InstrProfRecord::getCountPseudoKind ( ) const | inline |
|---|
◆ getNumValueData()
| uint32_t llvm::InstrProfRecord::getNumValueData ( uint32_t ValueKind) const | inline |
|---|
Return the total number of ValueData for ValueKind.
Definition at line 1090 of file InstrProf.h.
References N.
◆ getNumValueKinds()
| uint32_t llvm::InstrProfRecord::getNumValueKinds ( ) const | inline |
|---|
Return the number of value profile kinds with non-zero number of profile sites.
Definition at line 1083 of file InstrProf.h.
◆ getNumValueSites()
| uint32_t llvm::InstrProfRecord::getNumValueSites ( uint32_t ValueKind) const | inline |
|---|
◆ getValueArrayForSite()
◆ merge()
Merge the counts in Other into this one.
Optionally scale merged counts by Weight.
Definition at line 957 of file InstrProf.cpp.
References llvm::bitmap_mismatch, BitmapBytes, llvm::count_mismatch, llvm::counter_overflow, Counts, getCountPseudoKind(), llvm::getInstrMaxCountValue(), I, InstrProfRecord(), NotPseudo, llvm::Other, PseudoHot, PseudoWarm, llvm::SaturatingMultiplyAdd(), and setPseudoCount().
◆ operator=() [1/2]
◆ operator=() [2/2]
References InstrProfRecord().
◆ overlap()
Compute the overlap b/w this IntrprofRecord and Other.
Definition at line 846 of file InstrProf.cpp.
References accumulateCounts(), llvm::OverlapStats::addOneMismatch(), assert(), llvm::OverlapStats::Base, Counts, llvm::CountSumOrPercent::CountSum, getNumValueSites(), I, InstrProfRecord(), llvm::CountSumOrPercent::NumEntries, llvm::Other, llvm::OverlapStats::Overlap, overlapValueProfData(), llvm::OverlapStats::score(), llvm::OverlapStats::Test, and llvm::OverlapStats::Valid.
Referenced by llvm::InstrProfWriter::overlapRecord(), and overlapValueProfData().
◆ overlapValueProfData()
◆ reserveSites()
| void llvm::InstrProfRecord::reserveSites ( uint32_t ValueKind, uint32_t NumValueSites ) | inline |
|---|
◆ scale()
◆ setPseudoCount()
| void llvm::InstrProfRecord::setPseudoCount ( CountPseudoKind Kind) | inline |
|---|
◆ sortValueData()
| void llvm::InstrProfRecord::sortValueData ( ) | inline |
|---|
Sort value profile data (per site) by count.
Definition at line 957 of file InstrProf.h.
◆ BitmapBytes
std::vector<uint8_t> llvm::InstrProfRecord::BitmapBytes
◆ Counts
std::vector<uint64_t> llvm::InstrProfRecord::Counts
Definition at line 895 of file InstrProf.h.
Referenced by accumulateCounts(), Clear(), llvm::InstrProfRecordWriterTrait::EmitData(), llvm::InstrProfRecordWriterTrait::EmitKeyDataLength(), getCountPseudoKind(), InstrProfRecord(), InstrProfRecord(), InstrProfRecord(), merge(), llvm::NamedInstrProfRecord::NamedInstrProfRecord(), llvm::NamedInstrProfRecord::NamedInstrProfRecord(), operator=(), overlap(), scale(), and setPseudoCount().
The documentation for this struct was generated from the following files:
- include/llvm/ProfileData/InstrProf.h
- lib/ProfileData/InstrProf.cpp