|
LLVM 22.0.0git
|
Class to accumulate and hold information about a callee. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Public Types | |
| enum class | HotnessType : uint8_t { Unknown = 0 , Cold = 1 , None = 2 , Hot = 3 , Critical = 4 } |
Public Member Functions | |
| CalleeInfo () | |
| CalleeInfo (HotnessType Hotness, bool HasTC, uint64_t RelBF) | |
| void | updateHotness (const HotnessType OtherHotness) |
| bool | hasTailCall () const |
| void | setHasTailCall (const bool HasTC) |
| HotnessType | getHotness () const |
| void | updateRelBlockFreq (uint64_t BlockFreq, uint64_t EntryFreq) |
Update RelBlockFreq from BlockFreq and EntryFreq. | |
Public Attributes | |
| uint32_t | Hotness: 3 |
| uint32_t | HasTailCall: 1 |
| uint32_t | RelBlockFreq: RelBlockFreqBits |
Static Public Attributes | |
| static constexpr unsigned | RelBlockFreqBits = 28 |
The value stored in RelBlockFreq has to be interpreted as the digits of a scaled number with a scale of -ScaleShift. | |
| static constexpr int32_t | ScaleShift = 8 |
| static constexpr uint64_t | MaxRelBlockFreq = (1 << RelBlockFreqBits) - 1 |
Class to accumulate and hold information about a callee.
Definition at line 62 of file ModuleSummaryIndex.h.
|
strong |
| Enumerator | |
|---|---|
| Unknown | |
| Cold | |
| None | |
| Hot | |
| Critical | |
Definition at line 63 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 86 of file ModuleSummaryIndex.h.
References CalleeInfo(), HasTailCall, Hotness, RelBlockFreq, and Unknown.
Referenced by CalleeInfo().
|
inlineexplicit |
Definition at line 89 of file ModuleSummaryIndex.h.
References HasTailCall, Hotness, and RelBlockFreq.
|
inline |
Definition at line 101 of file ModuleSummaryIndex.h.
References Hotness.
|
inline |
Definition at line 97 of file ModuleSummaryIndex.h.
References HasTailCall.
Definition at line 99 of file ModuleSummaryIndex.h.
References HasTailCall.
|
inline |
Definition at line 93 of file ModuleSummaryIndex.h.
References Hotness.
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 108 of file ModuleSummaryIndex.h.
References MaxRelBlockFreq, RelBlockFreq, llvm::SaturatingAdd(), and ScaleShift.
| uint32_t llvm::CalleeInfo::HasTailCall |
Definition at line 77 of file ModuleSummaryIndex.h.
Referenced by CalleeInfo(), CalleeInfo(), getEncodedHotnessCallEdgeInfo(), getEncodedRelBFCallEdgeInfo(), hasTailCall(), and setHasTailCall().
| uint32_t llvm::CalleeInfo::Hotness |
Definition at line 73 of file ModuleSummaryIndex.h.
Referenced by CalleeInfo(), CalleeInfo(), getEncodedHotnessCallEdgeInfo(), getHotness(), and updateHotness().
|
staticconstexpr |
Definition at line 84 of file ModuleSummaryIndex.h.
Referenced by updateRelBlockFreq().
| uint32_t llvm::CalleeInfo::RelBlockFreq |
Definition at line 82 of file ModuleSummaryIndex.h.
Referenced by CalleeInfo(), CalleeInfo(), getEncodedRelBFCallEdgeInfo(), and updateRelBlockFreq().
|
staticconstexpr |
The value stored in RelBlockFreq has to be interpreted as the digits of a scaled number with a scale of -ScaleShift.
Definition at line 81 of file ModuleSummaryIndex.h.
Referenced by getDecodedRelBFCallEdgeInfo(), and getEncodedRelBFCallEdgeInfo().
|
staticconstexpr |
Definition at line 83 of file ModuleSummaryIndex.h.
Referenced by updateRelBlockFreq().