LLVM  14.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::SampleContextTracker Class Reference

#include "llvm/Transforms/IPO/SampleContextTracker.h"

Classes

struct  ProfileComparer
 

Public Types

using ContextSamplesTy = std::set< FunctionSamples *, ProfileComparer >
 

Public Member Functions

 SampleContextTracker (SampleProfileMap &Profiles, const DenseMap< uint64_t, StringRef > *GUIDToFuncNameMap)
 
FunctionSamplesgetCalleeContextSamplesFor (const CallBase &Inst, StringRef CalleeName)
 
std::vector< const FunctionSamples * > getIndirectCalleeContextSamplesFor (const DILocation *DIL)
 
FunctionSamplesgetContextSamplesFor (const DILocation *DIL)
 
FunctionSamplesgetContextSamplesFor (const SampleContext &Context)
 
ContextSamplesTygetAllContextSamplesFor (const Function &Func)
 
ContextSamplesTygetAllContextSamplesFor (StringRef Name)
 
FunctionSamplesgetBaseSamplesFor (const Function &Func, bool MergeContext=true)
 
FunctionSamplesgetBaseSamplesFor (StringRef Name, bool MergeContext=true)
 
ContextTrieNodegetContextFor (const SampleContext &Context)
 
StringRef getFuncNameFor (ContextTrieNode *Node) const
 
void markContextSamplesInlined (const FunctionSamples *InlinedSamples)
 
ContextTrieNodegetRootContext ()
 
void promoteMergeContextSamplesTree (const Instruction &Inst, StringRef CalleeName)
 
void dump ()
 

Detailed Description

Definition at line 97 of file SampleContextTracker.h.

Member Typedef Documentation

◆ ContextSamplesTy

Definition at line 111 of file SampleContextTracker.h.

Constructor & Destructor Documentation

◆ SampleContextTracker()

llvm::SampleContextTracker::SampleContextTracker ( SampleProfileMap Profiles,
const DenseMap< uint64_t, StringRef > *  GUIDToFuncNameMap 
)

Member Function Documentation

◆ dump()

void llvm::SampleContextTracker::dump ( )

Definition at line 429 of file SampleContextTracker.cpp.

References llvm::ContextTrieNode::dumpTree().

◆ getAllContextSamplesFor() [1/2]

SampleContextTracker::ContextSamplesTy & llvm::SampleContextTracker::getAllContextSamplesFor ( const Function Func)

◆ getAllContextSamplesFor() [2/2]

SampleContextTracker::ContextSamplesTy & llvm::SampleContextTracker::getAllContextSamplesFor ( StringRef  Name)

Definition at line 310 of file SampleContextTracker.cpp.

◆ getBaseSamplesFor() [1/2]

FunctionSamples * llvm::SampleContextTracker::getBaseSamplesFor ( const Function Func,
bool  MergeContext = true 
)

◆ getBaseSamplesFor() [2/2]

FunctionSamples * llvm::SampleContextTracker::getBaseSamplesFor ( StringRef  Name,
bool  MergeContext = true 
)

◆ getCalleeContextSamplesFor()

FunctionSamples * llvm::SampleContextTracker::getCalleeContextSamplesFor ( const CallBase Inst,
StringRef  CalleeName 
)

◆ getContextFor()

ContextTrieNode * llvm::SampleContextTracker::getContextFor ( const SampleContext Context)

◆ getContextSamplesFor() [1/2]

FunctionSamples * llvm::SampleContextTracker::getContextSamplesFor ( const DILocation DIL)

◆ getContextSamplesFor() [2/2]

FunctionSamples * llvm::SampleContextTracker::getContextSamplesFor ( const SampleContext Context)

Definition at line 295 of file SampleContextTracker.cpp.

◆ getFuncNameFor()

StringRef llvm::SampleContextTracker::getFuncNameFor ( ContextTrieNode Node) const

◆ getIndirectCalleeContextSamplesFor()

std::vector< const FunctionSamples * > llvm::SampleContextTracker::getIndirectCalleeContextSamplesFor ( const DILocation DIL)

◆ getRootContext()

ContextTrieNode & llvm::SampleContextTracker::getRootContext ( )

◆ markContextSamplesInlined()

void llvm::SampleContextTracker::markContextSamplesInlined ( const FunctionSamples InlinedSamples)

◆ promoteMergeContextSamplesTree()

void llvm::SampleContextTracker::promoteMergeContextSamplesTree ( const Instruction Inst,
StringRef  CalleeName 
)

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