class ProfileSummary

Declaration

class ProfileSummary { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/ProfileSummary.h:45

Member Variables

private const llvm::ProfileSummary::Kind PSK
private const llvm::SummaryEntryVector DetailedSummary
private const uint64_t TotalCount
private const uint64_t MaxCount
private const uint64_t MaxInternalCount
private const uint64_t MaxFunctionCount
private const uint32_t NumCounts
private const uint32_t NumFunctions
private bool Partial = false
If 'Partial' is false, it means the profile being used to optimize a target is collected from the same target. If 'Partial' is true, it means the profile is for common/shared code. The common profile is usually merged from profiles collected from running other targets.
private double PartialProfileRatio = 0.
This approximately represents the ratio of the number of profile counters of the program being built to the number of profile counters in the partial sample profile. When 'Partial' is false, it is undefined. This is currently only available under thin LTO mode.
public static const int Scale = 1000000

Method Overview

Methods

ProfileSummary(llvm::ProfileSummary::Kind K,
               const llvm::SummaryEntryVector&
                   DetailedSummary,
               uint64_t TotalCount,
               uint64_t MaxCount,
               uint64_t MaxInternalCount,
               uint64_t MaxFunctionCount,
               uint32_t NumCounts,
               uint32_t NumFunctions,
               bool Partial = false,
               double PartialProfileRatio = 0)

Declared at: llvm/include/llvm/IR/ProfileSummary.h:71

Parameters

llvm::ProfileSummary::Kind K
const llvm::SummaryEntryVector& DetailedSummary
uint64_t TotalCount
uint64_t MaxCount
uint64_t MaxInternalCount
uint64_t MaxFunctionCount
uint32_t NumCounts
uint32_t NumFunctions
bool Partial = false
double PartialProfileRatio = 0

const llvm::SummaryEntryVector&
getDetailedSummary()

Declared at: llvm/include/llvm/IR/ProfileSummary.h:88

llvm::Metadata* getDetailedSummaryMD(
    llvm::LLVMContext& Context)

Description

Return detailed summary as metadata.

Declared at: llvm/include/llvm/IR/ProfileSummary.h:66

Parameters

llvm::LLVMContext& Context

static llvm::ProfileSummary* getFromMD(
    llvm::Metadata* MD)

Description

Construct profile summary from metdata.

Declared at: llvm/include/llvm/IR/ProfileSummary.h:87

Parameters

llvm::Metadata* MD

llvm::ProfileSummary::Kind getKind() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:82

llvm::Metadata* getMD(
    llvm::LLVMContext& Context,
    bool AddPartialField = true,
    bool AddPartialProfileRatioField = true)

Description

Return summary information as metadata.

Declared at: llvm/include/llvm/IR/ProfileSummary.h:84

Parameters

llvm::LLVMContext& Context
bool AddPartialField = true
bool AddPartialProfileRatioField = true

uint64_t getMaxCount() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:93

uint64_t getMaxFunctionCount() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:90

uint64_t getMaxInternalCount() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:94

uint32_t getNumCounts() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:91

uint32_t getNumFunctions() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:89

double getPartialProfileRatio() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:97

uint64_t getTotalCount() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:92

bool isPartialProfile() const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:96

void printDetailedSummary(
    llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:103

Parameters

llvm::raw_ostream& OS

void printSummary(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/IR/ProfileSummary.h:102

Parameters

llvm::raw_ostream& OS

void setPartialProfile(bool PP)

Declared at: llvm/include/llvm/IR/ProfileSummary.h:95

Parameters

bool PP

void setPartialProfileRatio(double R)

Declared at: llvm/include/llvm/IR/ProfileSummary.h:98

Parameters

double R