LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::InstrProfValueSiteRecord Struct Reference

#include "llvm/ProfileData/InstrProf.h"

Public Member Functions

 InstrProfValueSiteRecord ()
 
template<class InputIterator >
 InstrProfValueSiteRecord (InputIterator F, InputIterator L)
 
void sortByTargetValues ()
 Sort ValueData ascending by Value.
 
void sortByCount ()
 Sort ValueData Descending by Count.
 
void merge (InstrProfValueSiteRecord &Input, uint64_t Weight, function_ref< void(instrprof_error)> Warn)
 Merge data from another InstrProfValueSiteRecord Optionally scale merged counts by Weight.
 
void scale (uint64_t N, uint64_t D, function_ref< void(instrprof_error)> Warn)
 Scale up value profile data counts by N (Numerator) / D (Denominator).
 
void overlap (InstrProfValueSiteRecord &Input, uint32_t ValueKind, OverlapStats &Overlap, OverlapStats &FuncLevelOverlap)
 Compute the overlap b/w this record and Input record.
 

Public Attributes

std::list< InstrProfValueData > ValueData
 Value profiling data pairs at a given value site.
 

Detailed Description

Definition at line 776 of file InstrProf.h.

Constructor & Destructor Documentation

◆ InstrProfValueSiteRecord() [1/2]

llvm::InstrProfValueSiteRecord::InstrProfValueSiteRecord ( )
inline

Definition at line 780 of file InstrProf.h.

References ValueData.

◆ InstrProfValueSiteRecord() [2/2]

template<class InputIterator >
llvm::InstrProfValueSiteRecord::InstrProfValueSiteRecord ( InputIterator  F,
InputIterator  L 
)
inline

Definition at line 782 of file InstrProf.h.

Member Function Documentation

◆ merge()

void llvm::InstrProfValueSiteRecord::merge ( InstrProfValueSiteRecord Input,
uint64_t  Weight,
function_ref< void(instrprof_error)>  Warn 
)

Merge data from another InstrProfValueSiteRecord Optionally scale merged counts by Weight.

Definition at line 811 of file InstrProf.cpp.

References llvm::counter_overflow, I, llvm::SaturatingMultiplyAdd(), sortByTargetValues(), and ValueData.

◆ overlap()

void llvm::InstrProfValueSiteRecord::overlap ( InstrProfValueSiteRecord Input,
uint32_t  ValueKind,
OverlapStats Overlap,
OverlapStats FuncLevelOverlap 
)

◆ scale()

void llvm::InstrProfValueSiteRecord::scale ( uint64_t  N,
uint64_t  D,
function_ref< void(instrprof_error)>  Warn 
)

Scale up value profile data counts by N (Numerator) / D (Denominator).

Definition at line 833 of file InstrProf.cpp.

References llvm::counter_overflow, D, I, N, llvm::SaturatingMultiply(), and ValueData.

◆ sortByCount()

void llvm::InstrProfValueSiteRecord::sortByCount ( )
inline

Sort ValueData Descending by Count.

Definition at line 1088 of file InstrProf.h.

References ValueData.

◆ sortByTargetValues()

void llvm::InstrProfValueSiteRecord::sortByTargetValues ( )
inline

Sort ValueData ascending by Value.

Definition at line 786 of file InstrProf.h.

References ValueData.

Referenced by merge(), and overlap().

Member Data Documentation

◆ ValueData

std::list<InstrProfValueData> llvm::InstrProfValueSiteRecord::ValueData

Value profiling data pairs at a given value site.

Definition at line 778 of file InstrProf.h.

Referenced by InstrProfValueSiteRecord(), merge(), overlap(), scale(), sortByCount(), and sortByTargetValues().


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