class ICallPromotionAnalysis

Declaration

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

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:24

Member Variables

private std::unique_ptr<InstrProfValueData[]> ValueDataArray

Method Overview

Methods

ICallPromotionAnalysis(
    const llvm::ICallPromotionAnalysis& other)

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:43

Parameters

const llvm::ICallPromotionAnalysis& other

ICallPromotionAnalysis()

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:48

uint32_t getProfitablePromotionCandidates(
    const llvm::Instruction* Inst,
    uint32_t NumVals,
    uint64_t TotalCount)

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:38

Parameters

const llvm::Instruction* Inst
uint32_t NumVals
uint64_t TotalCount

ArrayRef<InstrProfValueData>
getPromotionCandidatesForInstruction(
    const llvm::Instruction* I,
    uint32_t& NumVals,
    uint64_t& TotalCount,
    uint32_t& NumCandidates)

Description

Returns reference to array of InstrProfValueData for the given instruction \p I. The \p NumVals, \p TotalCount and \p NumCandidates are set to the number of values in the array, the total profile count of the indirect call \p I, and the number of profitable candidates in the given array (which is sorted in reverse order of profitability). The returned array space is owned by this class, and overwritten on subsequent calls.

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:61

Parameters

const llvm::Instruction* I
uint32_t& NumVals
uint64_t& TotalCount
uint32_t& NumCandidates

bool isPromotionProfitable(
    uint64_t Count,
    uint64_t TotalCount,
    uint64_t RemainingCount)

Declared at: llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h:33

Parameters

uint64_t Count
uint64_t TotalCount
uint64_t RemainingCount