LLVM 22.0.0git
llvm::sampleprof::FunctionSamples Class Reference

Representation of the samples collected for a function. More...

#include "llvm/ProfileData/SampleProf.h"

Public Member Functions

 FunctionSamples ()=default
LLVM_ABI void print (raw_ostream &OS=dbgs(), unsigned Indent=0) const
 Print the samples collected for a function on stream OS.
LLVM_ABI void dump () const
sampleprof_error addTotalSamples (uint64_t Num, uint64_t Weight=1)
void removeTotalSamples (uint64_t Num)
void setTotalSamples (uint64_t Num)
void setHeadSamples (uint64_t Num)
sampleprof_error addHeadSamples (uint64_t Num, uint64_t Weight=1)
sampleprof_error addBodySamples (uint32_t LineOffset, uint32_t Discriminator, uint64_t Num, uint64_t Weight=1)
sampleprof_error addCalledTargetSamples (uint32_t LineOffset, uint32_t Discriminator, FunctionId Func, uint64_t Num, uint64_t Weight=1)
sampleprof_error addSampleRecord (LineLocation Location, const SampleRecord &SampleRecord, uint64_t Weight=1)
uint64_t removeCalledTargetAndBodySample (uint32_t LineOffset, uint32_t Discriminator, FunctionId Func)
void removeAllCallsiteSamples ()
void updateCallsiteSamples ()
void updateTotalSamples ()
void setContextSynthetic ()
void setContextAttribute (ContextAttributeMask Attr)
const LineLocationmapIRLocToProfileLoc (const LineLocation &IRLoc) const
ErrorOr< uint64_tfindSamplesAt (uint32_t LineOffset, uint32_t Discriminator) const
 Return the number of samples collected at the given location.
ErrorOr< const SampleRecord::CallTargetMap & > findCallTargetMapAt (uint32_t LineOffset, uint32_t Discriminator) const
 Returns the call target map collected at a given location.
ErrorOr< const SampleRecord::CallTargetMap & > findCallTargetMapAt (const LineLocation &CallSite) const
 Returns the call target map collected at a given location specified by CallSite.
FunctionSamplesMapfunctionSamplesAt (const LineLocation &Loc)
 Return the function samples at the given callsite location.
const FunctionSamplesMapfindFunctionSamplesMapAt (const LineLocation &Loc) const
 Returns the FunctionSamplesMap at the given Loc.
const TypeCountMapfindCallsiteTypeSamplesAt (const LineLocation &Loc) const
 Returns the TypeCountMap for inlined callsites at the given Loc.
LLVM_ABI const FunctionSamplesfindFunctionSamplesAt (const LineLocation &Loc, StringRef CalleeName, SampleProfileReaderItaniumRemapper *Remapper, const HashKeyMap< std::unordered_map, FunctionId, FunctionId > *FuncNameToProfNameMap=nullptr) const
 Returns a pointer to FunctionSamples at the given callsite location Loc with callee CalleeName.
bool empty () const
uint64_t getTotalSamples () const
 Return the total number of samples collected inside the function.
uint64_t getHeadSamples () const
 For top-level functions, return the total number of branch samples that have the function as the branch target (or 0 otherwise).
uint64_t getHeadSamplesEstimate () const
 Return an estimate of the sample count of the function entry basic block.
const BodySampleMapgetBodySamples () const
 Return all the samples collected in the body of the function.
const CallsiteSampleMapgetCallsiteSamples () const
 Return all the callsite samples collected in the body of the function.
const CallsiteTypeMapgetCallsiteTypeCounts () const
 Returns vtable access samples for the C++ types collected in this function.
TypeCountMapgetTypeSamplesAt (const LineLocation &Loc)
 Returns the vtable access samples for the C++ types for Loc.
template<typename T>
sampleprof_error addCallsiteVTableTypeProfAt (const LineLocation &Loc, const T &Other, uint64_t Weight=1)
 Scale Other sample counts by Weight and add the scaled result to the type samples for Loc.
uint64_t getMaxCountInside (bool SkipCallSite=false) const
 Return the maximum of sample counts in a function body.
sampleprof_error merge (const FunctionSamples &Other, uint64_t Weight=1)
 Merge the samples in Other into this one.
void findInlinedFunctions (DenseSet< GlobalValue::GUID > &S, const HashKeyMap< std::unordered_map, FunctionId, Function * > &SymbolMap, uint64_t Threshold) const
 Recursively traverses all children, if the total sample count of the corresponding function is no less than Threshold, add its corresponding GUID to S.
void setFunction (FunctionId NewFunctionID)
 Set the name of the function.
FunctionId getFunction () const
 Return the function name.
StringRef getFuncName () const
 Return the original function name.
void setFunctionHash (uint64_t Hash)
uint64_t getFunctionHash () const
void setIRToProfileLocationMap (const LocToLocMap *LTLM)
StringRef getFuncName (FunctionId Func) const
 Translate Func into its original name.
LLVM_ABI const FunctionSamplesfindFunctionSamples (const DILocation *DIL, SampleProfileReaderItaniumRemapper *Remapper=nullptr, const HashKeyMap< std::unordered_map, FunctionId, FunctionId > *FuncNameToProfNameMap=nullptr) const
 Get the FunctionSamples of the inline instance where DIL originates from.
SampleContextgetContext () const
void setContext (const SampleContext &FContext)
uint64_t getGUID () const
 Return the GUID of the context's name.
LLVM_ABI void findAllNames (DenseSet< FunctionId > &NameSet) const
bool operator== (const FunctionSamples &Other) const
bool operator!= (const FunctionSamples &Other) const

Static Public Member Functions

static StringRef getCanonicalFnName (const Function &F)
 Return the canonical name for a function, taking into account suffix elision policy attributes.
static StringRef getCanonicalFnName (StringRef FnName, StringRef Attr="selected")
static LLVM_ABI unsigned getOffset (const DILocation *DIL)
 Returns the line offset to the start line of the subprogram.
static LLVM_ABI LineLocation getCallSiteIdentifier (const DILocation *DIL, bool ProfileIsFS=false)
 Returns a unique call site identifier for a given debug location of a call instruction.
static uint64_t getCallSiteHash (FunctionId Callee, const LineLocation &Callsite)
 Returns a unique hash code for a combination of a callsite location and the callee function name.

Public Attributes

DenseMap< uint64_t, StringRef > * GUIDToFuncNameMap = nullptr
 GUIDToFuncNameMap saves the mapping from GUID to the symbol name, for all the function symbols defined or declared in current module.

Static Public Attributes

static constexpr const charLLVMSuffix = ".llvm."
 Name suffixes which canonicalization should handle to avoid profile mismatch.
static constexpr const charPartSuffix = ".part."
static constexpr const charUniqSuffix = ".__uniq."
static LLVM_ABI bool ProfileIsProbeBased = false
static LLVM_ABI bool ProfileIsCS = false
static LLVM_ABI bool ProfileIsPreInlined = false
static LLVM_ABI bool UseMD5 = false
 Whether the profile uses MD5 to represent string.
static LLVM_ABI bool HasUniqSuffix = true
 Whether the profile contains any ".__uniq." suffix in a name.
static LLVM_ABI bool ProfileIsFS = false
 If this profile uses flow sensitive discriminators.

Detailed Description

Representation of the samples collected for a function.

This data structure contains all the collected samples for the body of a function. Each sample corresponds to a LineLocation instance within the body of the function.

Definition at line 777 of file SampleProf.h.

Constructor & Destructor Documentation

◆ FunctionSamples()

llvm::sampleprof::FunctionSamples::FunctionSamples ( )
default

Member Function Documentation

◆ addBodySamples()

sampleprof_error llvm::sampleprof::FunctionSamples::addBodySamples ( uint32_t LineOffset,
uint32_t Discriminator,
uint64_t Num,
uint64_t Weight = 1 )
inline

◆ addCalledTargetSamples()

sampleprof_error llvm::sampleprof::FunctionSamples::addCalledTargetSamples ( uint32_t LineOffset,
uint32_t Discriminator,
FunctionId Func,
uint64_t Num,
uint64_t Weight = 1 )
inline

◆ addCallsiteVTableTypeProfAt()

template<typename T>
sampleprof_error llvm::sampleprof::FunctionSamples::addCallsiteVTableTypeProfAt ( const LineLocation & Loc,
const T & Other,
uint64_t Weight = 1 )
inline

Scale Other sample counts by Weight and add the scaled result to the type samples for Loc.

Under the hoold, the caller-provided Loc will be un-drifted before the type sample lookup if possible. typename T is either a std::map or a DenseMap.

Definition at line 1049 of file SampleProf.h.

References llvm::Count, llvm::counter_overflow, getTypeSamplesAt(), llvm::Other, llvm::SaturatingMultiplyAdd(), llvm::success, and T.

Referenced by merge().

◆ addHeadSamples()

◆ addSampleRecord()

sampleprof_error llvm::sampleprof::FunctionSamples::addSampleRecord ( LineLocation Location,
const SampleRecord & SampleRecord,
uint64_t Weight = 1 )
inline

Definition at line 826 of file SampleProf.h.

◆ addTotalSamples()

◆ dump()

LLVM_DUMP_METHOD void FunctionSamples::dump ( ) const

Definition at line 396 of file SampleProf.cpp.

References llvm::dbgs(), LLVM_DUMP_METHOD, and print().

◆ empty()

bool llvm::sampleprof::FunctionSamples::empty ( ) const
inline

Definition at line 982 of file SampleProf.h.

◆ findAllNames()

◆ findCallsiteTypeSamplesAt()

const TypeCountMap * llvm::sampleprof::FunctionSamples::findCallsiteTypeSamplesAt ( const LineLocation & Loc) const
inline

Returns the TypeCountMap for inlined callsites at the given Loc.

Definition at line 963 of file SampleProf.h.

References mapIRLocToProfileLoc().

Referenced by print(), and llvm::sampleprof::SampleProfileWriterText::writeSample().

◆ findCallTargetMapAt() [1/2]

ErrorOr< const SampleRecord::CallTargetMap & > llvm::sampleprof::FunctionSamples::findCallTargetMapAt ( const LineLocation & CallSite) const
inline

Returns the call target map collected at a given location specified by CallSite.

If the location is not found in profile, return error.

Definition at line 941 of file SampleProf.h.

References mapIRLocToProfileLoc().

◆ findCallTargetMapAt() [2/2]

ErrorOr< const SampleRecord::CallTargetMap & > llvm::sampleprof::FunctionSamples::findCallTargetMapAt ( uint32_t LineOffset,
uint32_t Discriminator ) const
inline

Returns the call target map collected at a given location.

Each location is specified by LineOffset and Discriminator. If the location is not found in profile, return error.

Definition at line 930 of file SampleProf.h.

References mapIRLocToProfileLoc().

Referenced by llvm::sampleprof::ProfiledCallGraph::ProfiledCallGraph().

◆ findFunctionSamples()

const FunctionSamples * FunctionSamples::findFunctionSamples ( const DILocation * DIL,
SampleProfileReaderItaniumRemapper * Remapper = nullptr,
const HashKeyMap< std::unordered_map, FunctionId, FunctionId > * FuncNameToProfNameMap = nullptr ) const

Get the FunctionSamples of the inline instance where DIL originates from.

The FunctionSamples of the instruction (Machine or IR) associated to DIL is the inlined instance in which that instruction is coming from. We traverse the inline stack of that instruction, and match it with the tree nodes in the profile.

Returns
the FunctionSamples pointer to the inlined instance. If Remapper or FuncNameToProfNameMap is not nullptr, it will be used to find matching FunctionSamples with not exactly the same but equivalent name.

Definition at line 307 of file SampleProf.cpp.

References assert(), llvm::SmallVectorImpl< T >::emplace_back(), FunctionSamples(), getCallSiteIdentifier(), ProfileIsFS, and llvm::SmallVectorTemplateCommon< T, typename >::size().

◆ findFunctionSamplesAt()

const FunctionSamples * FunctionSamples::findFunctionSamplesAt ( const LineLocation & Loc,
StringRef CalleeName,
SampleProfileReaderItaniumRemapper * Remapper,
const HashKeyMap< std::unordered_map, FunctionId, FunctionId > * FuncNameToProfNameMap = nullptr ) const

Returns a pointer to FunctionSamples at the given callsite location Loc with callee CalleeName.

If no callsite can be found, relax the restriction to return the FunctionSamples at callsite location Loc with the maximum total sample count. If Remapper or FuncNameToProfNameMap is not nullptr, use them to find FunctionSamples with equivalent name as CalleeName.

Definition at line 349 of file SampleProf.cpp.

References llvm::StringRef::empty(), llvm::sampleprof::HashKeyMap< MapT, KeyT, ValueT, MapTArgs >::find(), FunctionSamples(), getCanonicalFnName(), llvm::sampleprof::getRepInFormat(), I, llvm::sampleprof::SampleProfileReaderItaniumRemapper::lookUpNameInProfile(), and mapIRLocToProfileLoc().

◆ findFunctionSamplesMapAt()

const FunctionSamplesMap * llvm::sampleprof::FunctionSamples::findFunctionSamplesMapAt ( const LineLocation & Loc) const
inline

Returns the FunctionSamplesMap at the given Loc.

Definition at line 955 of file SampleProf.h.

References mapIRLocToProfileLoc().

◆ findInlinedFunctions()

void llvm::sampleprof::FunctionSamples::findInlinedFunctions ( DenseSet< GlobalValue::GUID > & S,
const HashKeyMap< std::unordered_map, FunctionId, Function * > & SymbolMap,
uint64_t Threshold ) const
inline

Recursively traverses all children, if the total sample count of the corresponding function is no less than Threshold, add its corresponding GUID to S.

Also traverse the BodySamples to add hot CallTarget's GUID to S.

Definition at line 1136 of file SampleProf.h.

References F, getFunction(), getGUID(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().

◆ findSamplesAt()

ErrorOr< uint64_t > llvm::sampleprof::FunctionSamples::findSamplesAt ( uint32_t LineOffset,
uint32_t Discriminator ) const
inline

Return the number of samples collected at the given location.

Each location is specified by LineOffset and Discriminator. If the location is not found in profile, return error.

Definition at line 917 of file SampleProf.h.

References mapIRLocToProfileLoc().

◆ functionSamplesAt()

FunctionSamplesMap & llvm::sampleprof::FunctionSamples::functionSamplesAt ( const LineLocation & Loc)
inline

◆ getBodySamples()

const BodySampleMap & llvm::sampleprof::FunctionSamples::getBodySamples ( ) const
inline

◆ getCallSiteHash()

uint64_t llvm::sampleprof::FunctionSamples::getCallSiteHash ( FunctionId Callee,
const LineLocation & Callsite )
inlinestatic

Returns a unique hash code for a combination of a callsite location and the callee function name.

Guarantee MD5 and non-MD5 representation of the same function results in the same hash.

Definition at line 1258 of file SampleProf.h.

References llvm::sampleprof::SampleContextFrame::getHashCode().

Referenced by llvm::ContextTrieNode::getChildContext(), llvm::ContextTrieNode::getOrCreateChildContext(), llvm::sampleprof::ProfileConverter::FrameNode::getOrCreateChildFrame(), and llvm::ContextTrieNode::removeChildContext().

◆ getCallSiteIdentifier()

LineLocation FunctionSamples::getCallSiteIdentifier ( const DILocation * DIL,
bool ProfileIsFS = false )
static

Returns a unique call site identifier for a given debug location of a call instruction.

This is wrapper of two scenarios, the probe-based profile and regular profile, to hide implementation details from the sample loader and the context tracker.

Definition at line 290 of file SampleProf.cpp.

References llvm::PseudoProbeDwarfDiscriminator::extractProbeIndex(), llvm::DILocation::getBaseDiscriminator(), getOffset(), ProfileIsFS, and ProfileIsProbeBased.

Referenced by findFunctionSamples(), llvm::SampleContextTracker::getIndirectCalleeContextSamplesFor(), and llvm::SampleContextTracker::promoteMergeContextSamplesTree().

◆ getCallsiteSamples()

◆ getCallsiteTypeCounts()

const CallsiteTypeMap & llvm::sampleprof::FunctionSamples::getCallsiteTypeCounts ( ) const
inline

Returns vtable access samples for the C++ types collected in this function.

Definition at line 1033 of file SampleProf.h.

Referenced by llvm::sampleprof::SampleProfileWriterBinary::addNames(), and llvm::sampleprof::SampleProfileWriterBinary::writeBody().

◆ getCanonicalFnName() [1/2]

◆ getCanonicalFnName() [2/2]

StringRef llvm::sampleprof::FunctionSamples::getCanonicalFnName ( StringRef FnName,
StringRef Attr = "selected" )
inlinestatic

◆ getContext()

◆ getFuncName() [1/2]

StringRef llvm::sampleprof::FunctionSamples::getFuncName ( ) const
inline

Return the original function name.

Definition at line 1172 of file SampleProf.h.

References getFuncName(), and getFunction().

Referenced by getFuncName().

◆ getFuncName() [2/2]

StringRef llvm::sampleprof::FunctionSamples::getFuncName ( FunctionId Func) const
inline

Translate Func into its original name.

When profile doesn't use MD5, Func needs no translation. When profile uses MD5, Func in current FunctionSamples is actually GUID of the original function name. getFuncName will translate Func in current FunctionSamples into its original name by looking up in the function map GUIDToFuncNameMap. If the original name doesn't exist in the map, return empty StringRef.

Definition at line 1235 of file SampleProf.h.

References assert(), GUIDToFuncNameMap, and UseMD5.

◆ getFunction()

◆ getFunctionHash()

◆ getGUID()

uint64_t llvm::sampleprof::FunctionSamples::getGUID ( ) const
inline

Return the GUID of the context's name.

If the context is already using MD5, don't hash it again.

Definition at line 1306 of file SampleProf.h.

References getFunction(), and llvm::sampleprof::FunctionId::getHashCode().

Referenced by findInlinedFunctions().

◆ getHeadSamples()

uint64_t llvm::sampleprof::FunctionSamples::getHeadSamples ( ) const
inline

For top-level functions, return the total number of branch samples that have the function as the branch target (or 0 otherwise).

This is the raw data fetched from the profile. This should be equivalent to the sample of the first instruction of the symbol. But as we directly get this info for raw profile without referring to potentially inaccurate debug info, this gives more accurate profile data and is preferred for standalone symbols.

Definition at line 993 of file SampleProf.h.

Referenced by dumpFunctionProfileJson(), getHeadSamplesEstimate(), llvm::sampleprof::SampleProfileWriterBinary::writeSample(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeSample(), and llvm::sampleprof::SampleProfileWriterText::writeSample().

◆ getHeadSamplesEstimate()

uint64_t llvm::sampleprof::FunctionSamples::getHeadSamplesEstimate ( ) const
inline

Return an estimate of the sample count of the function entry basic block.

The function can be either a standalone symbol or an inlined function. For Context-Sensitive profiles, this will prefer returning the head samples (i.e. getHeadSamples()), if non-zero. Otherwise it estimates from the function body's samples or callsite samples.

Definition at line 1000 of file SampleProf.h.

References llvm::Count, getHeadSamples(), and ProfileIsCS.

Referenced by llvm::sampleprof::ProfiledCallGraph::ProfiledCallGraph().

◆ getMaxCountInside()

uint64_t llvm::sampleprof::FunctionSamples::getMaxCountInside ( bool SkipCallSite = false) const
inline

Return the maximum of sample counts in a function body.

When SkipCallSite is false, which is the default, the return count includes samples in the inlined functions. When SkipCallSite is true, the return count only considers the body samples.

Definition at line 1075 of file SampleProf.h.

References llvm::CallingConv::C, F, getBodySamples(), and getCallsiteSamples().

◆ getOffset()

unsigned FunctionSamples::getOffset ( const DILocation * DIL)
static

Returns the line offset to the start line of the subprogram.

We assume that a single function will not exceed 65535 LOC.

Definition at line 285 of file SampleProf.cpp.

Referenced by getCallSiteIdentifier(), and llvm::SampleProfileLoaderBaseImpl< FT >::getInstWeightImpl().

◆ getTotalSamples()

◆ getTypeSamplesAt()

TypeCountMap & llvm::sampleprof::FunctionSamples::getTypeSamplesAt ( const LineLocation & Loc)
inline

Returns the vtable access samples for the C++ types for Loc.

Under the hood, the caller-specified Loc will be un-drifted before the type sample lookup if possible.

Definition at line 1040 of file SampleProf.h.

References mapIRLocToProfileLoc().

Referenced by addCallsiteVTableTypeProfAt(), and llvm::sampleprof::SampleProfileReaderBinary::readCallsiteVTableProf().

◆ mapIRLocToProfileLoc()

const LineLocation & llvm::sampleprof::FunctionSamples::mapIRLocToProfileLoc ( const LineLocation & IRLoc) const
inline

◆ merge()

◆ operator!=()

bool llvm::sampleprof::FunctionSamples::operator!= ( const FunctionSamples & Other) const
inline

Definition at line 1325 of file SampleProf.h.

References FunctionSamples(), and llvm::Other.

◆ operator==()

bool llvm::sampleprof::FunctionSamples::operator== ( const FunctionSamples & Other) const
inline

Definition at line 1314 of file SampleProf.h.

References FunctionSamples(), GUIDToFuncNameMap, and llvm::Other.

◆ print()

void FunctionSamples::print ( raw_ostream & OS = dbgs(),
unsigned Indent = 0 ) const

◆ removeAllCallsiteSamples()

void llvm::sampleprof::FunctionSamples::removeAllCallsiteSamples ( )
inline

Definition at line 850 of file SampleProf.h.

◆ removeCalledTargetAndBodySample()

uint64_t llvm::sampleprof::FunctionSamples::removeCalledTargetAndBodySample ( uint32_t LineOffset,
uint32_t Discriminator,
FunctionId Func )
inline

Definition at line 834 of file SampleProf.h.

References llvm::Count, and I.

◆ removeTotalSamples()

void llvm::sampleprof::FunctionSamples::removeTotalSamples ( uint64_t Num)
inline

Definition at line 792 of file SampleProf.h.

◆ setContext()

void llvm::sampleprof::FunctionSamples::setContext ( const SampleContext & FContext)
inline

◆ setContextAttribute()

void llvm::sampleprof::FunctionSamples::setContextAttribute ( ContextAttributeMask Attr)
inline

Definition at line 893 of file SampleProf.h.

References I.

◆ setContextSynthetic()

void llvm::sampleprof::FunctionSamples::setContextSynthetic ( )
inline

Definition at line 882 of file SampleProf.h.

References I, and llvm::sampleprof::SyntheticContext.

◆ setFunction()

void llvm::sampleprof::FunctionSamples::setFunction ( FunctionId NewFunctionID)
inline

◆ setFunctionHash()

void llvm::sampleprof::FunctionSamples::setFunctionHash ( uint64_t Hash)
inline

◆ setHeadSamples()

void llvm::sampleprof::FunctionSamples::setHeadSamples ( uint64_t Num)
inline

Definition at line 801 of file SampleProf.h.

◆ setIRToProfileLocationMap()

void llvm::sampleprof::FunctionSamples::setIRToProfileLocationMap ( const LocToLocMap * LTLM)
inline

Definition at line 1178 of file SampleProf.h.

References assert().

◆ setTotalSamples()

void llvm::sampleprof::FunctionSamples::setTotalSamples ( uint64_t Num)
inline

Definition at line 799 of file SampleProf.h.

Referenced by updateTotalSamples().

◆ updateCallsiteSamples()

void llvm::sampleprof::FunctionSamples::updateCallsiteSamples ( )
inline

Definition at line 855 of file SampleProf.h.

References I.

◆ updateTotalSamples()

void llvm::sampleprof::FunctionSamples::updateTotalSamples ( )
inline

Definition at line 868 of file SampleProf.h.

References addTotalSamples(), I, and setTotalSamples().

Member Data Documentation

◆ GUIDToFuncNameMap

DenseMap<uint64_t, StringRef>* llvm::sampleprof::FunctionSamples::GUIDToFuncNameMap = nullptr

GUIDToFuncNameMap saves the mapping from GUID to the symbol name, for all the function symbols defined or declared in current module.

Definition at line 1302 of file SampleProf.h.

Referenced by getFuncName(), merge(), and operator==().

◆ HasUniqSuffix

bool llvm::sampleprof::FunctionSamples::HasUniqSuffix = true
static

Whether the profile contains any ".__uniq." suffix in a name.

Definition at line 1295 of file SampleProf.h.

Referenced by getCanonicalFnName(), and llvm::sampleprof::SampleProfileReaderExtBinaryBase::readOneSection().

◆ LLVMSuffix

const char* llvm::sampleprof::FunctionSamples::LLVMSuffix = ".llvm."
staticconstexpr

Name suffixes which canonicalization should handle to avoid profile mismatch.

Definition at line 1193 of file SampleProf.h.

Referenced by getCanonicalFnName().

◆ PartSuffix

const char* llvm::sampleprof::FunctionSamples::PartSuffix = ".part."
staticconstexpr

Definition at line 1194 of file SampleProf.h.

Referenced by getCanonicalFnName().

◆ ProfileIsCS

◆ ProfileIsFS

◆ ProfileIsPreInlined

◆ ProfileIsProbeBased

◆ UniqSuffix

const char* llvm::sampleprof::FunctionSamples::UniqSuffix = ".__uniq."
staticconstexpr

◆ UseMD5

bool llvm::sampleprof::FunctionSamples::UseMD5 = false
static

Whether the profile uses MD5 to represent string.

Definition at line 1292 of file SampleProf.h.

Referenced by getFuncName(), llvm::SampleContextTracker::getFuncNameFor(), llvm::sampleprof::getRepInFormat(), and llvm::sampleprof::SampleProfileReader::read().


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