LLVM 22.0.0git
llvm::OverlapStats Struct Reference

#include "llvm/ProfileData/InstrProf.h"

Public Types

enum  OverlapStatsLevel { ProgramLevel , FunctionLevel }

Public Member Functions

 OverlapStats (OverlapStatsLevel L=ProgramLevel)
LLVM_ABI void dump (raw_fd_ostream &OS) const
void setFuncInfo (StringRef Name, uint64_t Hash)
LLVM_ABI Error accumulateCounts (const std::string &BaseFilename, const std::string &TestFilename, bool IsCS)
LLVM_ABI void addOneMismatch (const CountSumOrPercent &MismatchFunc)
LLVM_ABI void addOneUnique (const CountSumOrPercent &UniqueFunc)

Static Public Member Functions

static double score (uint64_t Val1, uint64_t Val2, double Sum1, double Sum2)

Public Attributes

CountSumOrPercent Base
CountSumOrPercent Test
CountSumOrPercent Overlap
CountSumOrPercent Mismatch
CountSumOrPercent Unique
OverlapStatsLevel Level
const std::string * BaseFilename = nullptr
const std::string * TestFilename = nullptr
StringRef FuncName
uint64_t FuncHash = 0
bool Valid = false

Detailed Description

Definition at line 817 of file InstrProf.h.

Member Enumeration Documentation

◆ OverlapStatsLevel

Enumerator
ProgramLevel 
FunctionLevel 

Definition at line 818 of file InstrProf.h.

Constructor & Destructor Documentation

◆ OverlapStats()

llvm::OverlapStats::OverlapStats ( OverlapStatsLevel L = ProgramLevel)
inline

Definition at line 834 of file InstrProf.h.

References Level, and ProgramLevel.

Member Function Documentation

◆ accumulateCounts()

Error llvm::OverlapStats::accumulateCounts ( const std::string & BaseFilename,
const std::string & TestFilename,
bool IsCS )

◆ addOneMismatch()

void llvm::OverlapStats::addOneMismatch ( const CountSumOrPercent & MismatchFunc)

◆ addOneUnique()

void llvm::OverlapStats::addOneUnique ( const CountSumOrPercent & UniqueFunc)

◆ dump()

void llvm::OverlapStats::dump ( raw_fd_ostream & OS) const

◆ score()

double llvm::OverlapStats::score ( uint64_t Val1,
uint64_t Val2,
double Sum1,
double Sum2 )
inlinestatic

◆ setFuncInfo()

void llvm::OverlapStats::setFuncInfo ( StringRef Name,
uint64_t Hash )
inline

Definition at line 838 of file InstrProf.h.

References FuncHash, and FuncName.

Member Data Documentation

◆ Base

◆ BaseFilename

const std::string* llvm::OverlapStats::BaseFilename = nullptr

Definition at line 828 of file InstrProf.h.

Referenced by accumulateCounts(), and dump().

◆ FuncHash

uint64_t llvm::OverlapStats::FuncHash = 0

Definition at line 831 of file InstrProf.h.

Referenced by dump(), and setFuncInfo().

◆ FuncName

StringRef llvm::OverlapStats::FuncName

Definition at line 830 of file InstrProf.h.

Referenced by dump(), and setFuncInfo().

◆ Level

OverlapStatsLevel llvm::OverlapStats::Level

Definition at line 827 of file InstrProf.h.

Referenced by dump(), and OverlapStats().

◆ Mismatch

CountSumOrPercent llvm::OverlapStats::Mismatch

Definition at line 825 of file InstrProf.h.

Referenced by addOneMismatch(), and dump().

◆ Overlap

◆ Test

◆ TestFilename

const std::string* llvm::OverlapStats::TestFilename = nullptr

Definition at line 829 of file InstrProf.h.

Referenced by accumulateCounts(), and dump().

◆ Unique

CountSumOrPercent llvm::OverlapStats::Unique

Definition at line 826 of file InstrProf.h.

Referenced by addOneUnique(), and dump().

◆ Valid

bool llvm::OverlapStats::Valid = false

Definition at line 832 of file InstrProf.h.

Referenced by accumulateCounts(), dump(), and llvm::InstrProfRecord::overlap().


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