LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::ProfileSummary Class Reference

#include "llvm/IR/ProfileSummary.h"

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

Public Types

enum  Kind { PSK_Instr, PSK_Sample }
 

Public Member Functions

 ProfileSummary (Kind K, SummaryEntryVector DetailedSummary, uint64_t TotalCount, uint64_t MaxCount, uint64_t MaxInternalCount, uint64_t MaxFunctionCount, uint32_t NumCounts, uint32_t NumFunctions)
 
Kind getKind () const
 
MetadatagetMD (LLVMContext &Context)
 Return summary information as metadata. More...
 
SummaryEntryVectorgetDetailedSummary ()
 
uint32_t getNumFunctions ()
 
uint64_t getMaxFunctionCount ()
 
uint32_t getNumCounts ()
 
uint64_t getTotalCount ()
 
uint64_t getMaxCount ()
 
uint64_t getMaxInternalCount ()
 

Static Public Member Functions

static ProfileSummarygetFromMD (Metadata *MD)
 Construct profile summary from metdata. More...
 

Static Public Attributes

static const int Scale = 1000000
 

Detailed Description

Definition at line 44 of file ProfileSummary.h.

Member Enumeration Documentation

◆ Kind

Enumerator
PSK_Instr 
PSK_Sample 

Definition at line 46 of file ProfileSummary.h.

Constructor & Destructor Documentation

◆ ProfileSummary()

llvm::ProfileSummary::ProfileSummary ( Kind  K,
SummaryEntryVector  DetailedSummary,
uint64_t  TotalCount,
uint64_t  MaxCount,
uint64_t  MaxInternalCount,
uint64_t  MaxFunctionCount,
uint32_t  NumCounts,
uint32_t  NumFunctions 
)
inline

Definition at line 60 of file ProfileSummary.h.

Referenced by getFromMD().

Member Function Documentation

◆ getDetailedSummary()

SummaryEntryVector& llvm::ProfileSummary::getDetailedSummary ( )
inline

Definition at line 74 of file ProfileSummary.h.

Referenced by setSummary().

◆ getFromMD()

ProfileSummary * ProfileSummary::getFromMD ( Metadata MD)
static

Construct profile summary from metdata.

Definition at line 144 of file ProfileSummary.cpp.

References llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), getSummaryFromMD(), getVal(), isKeyValuePair(), ProfileSummary(), PSK_Instr, and PSK_Sample.

Referenced by getEntryForPercentile().

◆ getKind()

Kind llvm::ProfileSummary::getKind ( ) const
inline

Definition at line 69 of file ProfileSummary.h.

◆ getMaxCount()

uint64_t llvm::ProfileSummary::getMaxCount ( )
inline

Definition at line 79 of file ProfileSummary.h.

Referenced by getMD(), and setSummary().

◆ getMaxFunctionCount()

uint64_t llvm::ProfileSummary::getMaxFunctionCount ( )
inline

Definition at line 76 of file ProfileSummary.h.

Referenced by getMD(), and setSummary().

◆ getMaxInternalCount()

uint64_t llvm::ProfileSummary::getMaxInternalCount ( )
inline

Definition at line 80 of file ProfileSummary.h.

Referenced by getMD(), and setSummary().

◆ getMD()

Metadata * ProfileSummary::getMD ( LLVMContext Context)

◆ getNumCounts()

uint32_t llvm::ProfileSummary::getNumCounts ( )
inline

Definition at line 77 of file ProfileSummary.h.

References llvm::ProfileSummaryEntry::NumCounts.

Referenced by getMD(), and setSummary().

◆ getNumFunctions()

uint32_t llvm::ProfileSummary::getNumFunctions ( )
inline

Definition at line 75 of file ProfileSummary.h.

Referenced by getMD(), and setSummary().

◆ getTotalCount()

uint64_t llvm::ProfileSummary::getTotalCount ( )
inline

Definition at line 78 of file ProfileSummary.h.

Referenced by getMD(), and setSummary().

Member Data Documentation

◆ Scale

const int llvm::ProfileSummary::Scale = 1000000
static

Definition at line 58 of file ProfileSummary.h.


The documentation for this class was generated from the following files: