LLVM  8.0.0svn
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::CalleeInfo Struct Reference

Class to accumulate and hold information about a callee. More...

#include "llvm/IR/ModuleSummaryIndex.h"

Collaboration diagram for llvm::CalleeInfo:
Collaboration graph
[legend]

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
 

Detailed Description

Class to accumulate and hold information about a callee.

Definition at line 53 of file ModuleSummaryIndex.h.

Member Enumeration Documentation

◆ HotnessType

enum llvm::CalleeInfo::HotnessType : uint8_t
strong
Enumerator
Unknown 
Cold 
None 
Hot 
Critical 

Definition at line 54 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

◆ CalleeInfo() [1/2]

llvm::CalleeInfo::CalleeInfo ( )
inline

Definition at line 72 of file ModuleSummaryIndex.h.

◆ CalleeInfo() [2/2]

llvm::CalleeInfo::CalleeInfo ( HotnessType  Hotness,
uint64_t  RelBF 
)
inlineexplicit

Definition at line 74 of file ModuleSummaryIndex.h.

Member Function Documentation

◆ getHotness()

HotnessType llvm::CalleeInfo::getHotness ( ) const
inline

Definition at line 81 of file ModuleSummaryIndex.h.

◆ updateHotness()

void llvm::CalleeInfo::updateHotness ( const HotnessType  OtherHotness)
inline

Definition at line 77 of file ModuleSummaryIndex.h.

References llvm::max().

◆ updateRelBlockFreq()

void llvm::CalleeInfo::updateRelBlockFreq ( uint64_t  BlockFreq,
uint64_t  EntryFreq 
)
inline

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 88 of file ModuleSummaryIndex.h.

Member Data Documentation

◆ Hotness

uint32_t llvm::CalleeInfo::Hotness

Definition at line 64 of file ModuleSummaryIndex.h.

◆ MaxRelBlockFreq

constexpr uint64_t llvm::CalleeInfo::MaxRelBlockFreq = (1 << 29) - 1
static

Definition at line 70 of file ModuleSummaryIndex.h.

◆ RelBlockFreq

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 68 of file ModuleSummaryIndex.h.

◆ ScaleShift

constexpr int32_t llvm::CalleeInfo::ScaleShift = 8
static

Definition at line 69 of file ModuleSummaryIndex.h.


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