LLVM
15.0.0git
|
Class to accumulate and hold information about a callee. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Public Types | |
enum | HotnessType : uint8_t { HotnessType::Unknown = 0, HotnessType::Cold = 1, HotnessType::None = 2, HotnessType::Hot = 3, HotnessType::Critical = 4 } |
Public Member Functions | |
CalleeInfo () | |
CalleeInfo (HotnessType Hotness, uint64_t RelBF) | |
void | updateHotness (const HotnessType OtherHotness) |
HotnessType | getHotness () const |
void | updateRelBlockFreq (uint64_t BlockFreq, uint64_t EntryFreq) |
Update RelBlockFreq from BlockFreq and EntryFreq . More... | |
Public Attributes | |
uint32_t | Hotness: 3 |
uint32_t | RelBlockFreq: 29 |
The value stored in RelBlockFreq has to be interpreted as the digits of a scaled number with a scale of -ScaleShift . More... | |
Static Public Attributes | |
static constexpr int32_t | ScaleShift = 8 |
static constexpr uint64_t | MaxRelBlockFreq = (1 << 29) - 1 |
Class to accumulate and hold information about a callee.
Definition at line 56 of file ModuleSummaryIndex.h.
|
strong |
Enumerator | |
---|---|
Unknown | |
Cold | |
None | |
Hot | |
Critical |
Definition at line 57 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 75 of file ModuleSummaryIndex.h.
|
inlineexplicit |
Definition at line 77 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 84 of file ModuleSummaryIndex.h.
References Hotness.
|
inline |
Definition at line 80 of file ModuleSummaryIndex.h.
References Hotness, and llvm::max().
Update RelBlockFreq
from BlockFreq
and EntryFreq
.
BlockFreq is divided by EntryFreq and added to RelBlockFreq. To represent fractional values, the result is represented as a fixed point number with scale of -ScaleShift.
Definition at line 91 of file ModuleSummaryIndex.h.
References get, MaxRelBlockFreq, llvm::min(), RelBlockFreq, and ScaleShift.
uint32_t llvm::CalleeInfo::Hotness |
Definition at line 67 of file ModuleSummaryIndex.h.
Referenced by getHotness(), and updateHotness().
|
staticconstexpr |
Definition at line 73 of file ModuleSummaryIndex.h.
Referenced by updateRelBlockFreq().
uint32_t llvm::CalleeInfo::RelBlockFreq |
The value stored in RelBlockFreq has to be interpreted as the digits of a scaled number with a scale of -ScaleShift
.
Definition at line 71 of file ModuleSummaryIndex.h.
Referenced by updateRelBlockFreq().
|
staticconstexpr |
Definition at line 72 of file ModuleSummaryIndex.h.
Referenced by llvm::computeSyntheticCounts(), and updateRelBlockFreq().