class SampleContextTracker
Declaration
class SampleContextTracker { /* full declaration omitted */ };
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:89
Member Variables
- private StringMap< llvm::SampleContextTracker::ContextSamplesTy> FuncToCtxtProfiles
- private std::unordered_map<const FunctionSamples*, ContextTrieNode*> ProfileToNodeMap
- private const DenseMap<uint64_t, llvm::StringRef>* GUIDToFuncNameMap
- private llvm::ContextTrieNode RootContext
Method Overview
- public SampleContextTracker(llvm::sampleprof::SampleProfileMap & Profiles, const DenseMap<uint64_t, llvm::StringRef> * GUIDToFuncNameMap)
- public SampleContextTracker()
- private llvm::ContextTrieNode & addTopLevelContextNode(llvm::StringRef FName)
- public llvm::SampleContextTracker::Iterator begin()
- public void createContextLessProfileMap(llvm::sampleprof::SampleProfileMap & ContextLessProfiles)
- public void dump()
- public llvm::SampleContextTracker::Iterator end()
- public llvm::SampleContextTracker::ContextSamplesTy & getAllContextSamplesFor(const llvm::Function & Func)
- public llvm::SampleContextTracker::ContextSamplesTy & getAllContextSamplesFor(llvm::StringRef Name)
- public llvm::sampleprof::FunctionSamples * getBaseSamplesFor(const llvm::Function & Func, bool MergeContext = true)
- public llvm::sampleprof::FunctionSamples * getBaseSamplesFor(llvm::StringRef Name, bool MergeContext = true)
- private llvm::ContextTrieNode * getCalleeContextFor(const llvm::DILocation * DIL, llvm::StringRef CalleeName)
- public llvm::sampleprof::FunctionSamples * getCalleeContextSamplesFor(const llvm::CallBase & Inst, llvm::StringRef CalleeName)
- public llvm::ContextTrieNode * getContextFor(const llvm::sampleprof::SampleContext & Context)
- private llvm::ContextTrieNode * getContextFor(const llvm::DILocation * DIL)
- public llvm::ContextTrieNode * getContextNodeForProfile(const llvm::sampleprof::FunctionSamples * FSamples) const
- public llvm::sampleprof::FunctionSamples * getContextSamplesFor(const llvm::sampleprof::SampleContext & Context)
- public llvm::sampleprof::FunctionSamples * getContextSamplesFor(const llvm::DILocation * DIL)
- public std::string getContextString(const llvm::sampleprof::FunctionSamples & FSamples) const
- public std::string getContextString(llvm::ContextTrieNode * Node) const
- public llvm::StringRef getFuncNameFor(llvm::ContextTrieNode * Node) const
- public StringMap<llvm::SampleContextTracker::ContextSamplesTy> & getFuncToCtxtProfiles()
- public std::vector<const FunctionSamples *> getIndirectCalleeContextSamplesFor(const llvm::DILocation * DIL)
- public llvm::ContextTrieNode * getOrCreateContextPath(const llvm::sampleprof::SampleContext & Context, bool AllowCreate)
- public llvm::ContextTrieNode & getRootContext()
- private llvm::ContextTrieNode * getTopLevelContextNode(llvm::StringRef FName)
- public void markContextSamplesInlined(const llvm::sampleprof::FunctionSamples * InlinedSamples)
- private void mergeContextNode(llvm::ContextTrieNode & FromNode, llvm::ContextTrieNode & ToNode)
- private llvm::ContextTrieNode & moveContextSamples(llvm::ContextTrieNode & ToNodeParent, const llvm::sampleprof::LineLocation & CallSite, llvm::ContextTrieNode && NodeToMove)
- public void populateFuncToCtxtMap()
- public void promoteMergeContextSamplesTree(const llvm::Instruction & Inst, llvm::StringRef CalleeName)
- private llvm::ContextTrieNode & promoteMergeContextSamplesTree(llvm::ContextTrieNode & NodeToPromo)
- private llvm::ContextTrieNode & promoteMergeContextSamplesTree(llvm::ContextTrieNode & FromNode, llvm::ContextTrieNode & ToNodeParent)
- private void setContextNode(const llvm::sampleprof::FunctionSamples * FSample, llvm::ContextTrieNode * Node)
Methods
¶SampleContextTracker(
llvm::sampleprof::SampleProfileMap& Profiles,
const DenseMap<uint64_t, llvm::StringRef>*
GUIDToFuncNameMap)
SampleContextTracker(
llvm::sampleprof::SampleProfileMap& Profiles,
const DenseMap<uint64_t, llvm::StringRef>*
GUIDToFuncNameMap)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:94
Parameters
- llvm::sampleprof::SampleProfileMap& Profiles
- const DenseMap<uint64_t, llvm::StringRef>* GUIDToFuncNameMap
¶SampleContextTracker()
SampleContextTracker()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:93
¶llvm::ContextTrieNode& addTopLevelContextNode(
llvm::StringRef FName)
llvm::ContextTrieNode& addTopLevelContextNode(
llvm::StringRef FName)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:198
Parameters
- llvm::StringRef FName
¶llvm::SampleContextTracker::Iterator begin()
llvm::SampleContextTracker::Iterator begin()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:182
¶void createContextLessProfileMap(
llvm::sampleprof::SampleProfileMap&
ContextLessProfiles)
void createContextLessProfileMap(
llvm::sampleprof::SampleProfileMap&
ContextLessProfiles)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:134
Parameters
- llvm::sampleprof::SampleProfileMap& ContextLessProfiles
¶void dump()
void dump()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:191
¶llvm::SampleContextTracker::Iterator end()
llvm::SampleContextTracker::Iterator end()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:183
¶llvm::SampleContextTracker::ContextSamplesTy&
getAllContextSamplesFor(
const llvm::Function& Func)
llvm::SampleContextTracker::ContextSamplesTy&
getAllContextSamplesFor(
const llvm::Function& Func)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:111
Parameters
- const llvm::Function& Func
¶llvm::SampleContextTracker::ContextSamplesTy&
getAllContextSamplesFor(llvm::StringRef Name)
llvm::SampleContextTracker::ContextSamplesTy&
getAllContextSamplesFor(llvm::StringRef Name)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:112
Parameters
- llvm::StringRef Name
¶llvm::sampleprof::FunctionSamples*
getBaseSamplesFor(const llvm::Function& Func,
bool MergeContext = true)
llvm::sampleprof::FunctionSamples*
getBaseSamplesFor(const llvm::Function& Func,
bool MergeContext = true)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:117
Parameters
- const llvm::Function& Func
- bool MergeContext = true
¶llvm::sampleprof::FunctionSamples*
getBaseSamplesFor(llvm::StringRef Name,
bool MergeContext = true)
llvm::sampleprof::FunctionSamples*
getBaseSamplesFor(llvm::StringRef Name,
bool MergeContext = true)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:120
Parameters
- llvm::StringRef Name
- bool MergeContext = true
¶llvm::ContextTrieNode* getCalleeContextFor(
const llvm::DILocation* DIL,
llvm::StringRef CalleeName)
llvm::ContextTrieNode* getCalleeContextFor(
const llvm::DILocation* DIL,
llvm::StringRef CalleeName)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:195
Parameters
- const llvm::DILocation* DIL
- llvm::StringRef CalleeName
¶llvm::sampleprof::FunctionSamples*
getCalleeContextSamplesFor(
const llvm::CallBase& Inst,
llvm::StringRef CalleeName)
llvm::sampleprof::FunctionSamples*
getCalleeContextSamplesFor(
const llvm::CallBase& Inst,
llvm::StringRef CalleeName)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:100
Parameters
- const llvm::CallBase& Inst
- llvm::StringRef CalleeName
¶llvm::ContextTrieNode* getContextFor(
const llvm::sampleprof::SampleContext&
Context)
llvm::ContextTrieNode* getContextFor(
const llvm::sampleprof::SampleContext&
Context)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:122
Parameters
- const llvm::sampleprof::SampleContext& Context
¶llvm::ContextTrieNode* getContextFor(
const llvm::DILocation* DIL)
llvm::ContextTrieNode* getContextFor(
const llvm::DILocation* DIL)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:194
Parameters
- const llvm::DILocation* DIL
¶llvm::ContextTrieNode* getContextNodeForProfile(
const llvm::sampleprof::FunctionSamples*
FSamples) const
llvm::ContextTrieNode* getContextNodeForProfile(
const llvm::sampleprof::FunctionSamples*
FSamples) const
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:136
Parameters
- const llvm::sampleprof::FunctionSamples* FSamples
¶llvm::sampleprof::FunctionSamples*
getContextSamplesFor(
const llvm::sampleprof::SampleContext&
Context)
llvm::sampleprof::FunctionSamples*
getContextSamplesFor(
const llvm::sampleprof::SampleContext&
Context)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:109
Parameters
- const llvm::sampleprof::SampleContext& Context
¶llvm::sampleprof::FunctionSamples*
getContextSamplesFor(const llvm::DILocation* DIL)
llvm::sampleprof::FunctionSamples*
getContextSamplesFor(const llvm::DILocation* DIL)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:107
Parameters
- const llvm::DILocation* DIL
¶std::string getContextString(
const llvm::sampleprof::FunctionSamples&
FSamples) const
std::string getContextString(
const llvm::sampleprof::FunctionSamples&
FSamples) const
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:187
Parameters
- const llvm::sampleprof::FunctionSamples& FSamples
¶std::string getContextString(
llvm::ContextTrieNode* Node) const
std::string getContextString(
llvm::ContextTrieNode* Node) const
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:188
Parameters
- llvm::ContextTrieNode* Node
¶llvm::StringRef getFuncNameFor(
llvm::ContextTrieNode* Node) const
llvm::StringRef getFuncNameFor(
llvm::ContextTrieNode* Node) const
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:124
Parameters
- llvm::ContextTrieNode* Node
¶StringMap<
llvm::SampleContextTracker::ContextSamplesTy>&
getFuncToCtxtProfiles()
StringMap<
llvm::SampleContextTracker::ContextSamplesTy>&
getFuncToCtxtProfiles()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:142
¶std::vector<const FunctionSamples*>
getIndirectCalleeContextSamplesFor(
const llvm::DILocation* DIL)
std::vector<const FunctionSamples*>
getIndirectCalleeContextSamplesFor(
const llvm::DILocation* DIL)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:104
Parameters
- const llvm::DILocation* DIL
¶llvm::ContextTrieNode* getOrCreateContextPath(
const llvm::sampleprof::SampleContext&
Context,
bool AllowCreate)
llvm::ContextTrieNode* getOrCreateContextPath(
const llvm::sampleprof::SampleContext&
Context,
bool AllowCreate)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:113
Parameters
- const llvm::sampleprof::SampleContext& Context
- bool AllowCreate
¶llvm::ContextTrieNode& getRootContext()
llvm::ContextTrieNode& getRootContext()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:129
¶llvm::ContextTrieNode* getTopLevelContextNode(
llvm::StringRef FName)
llvm::ContextTrieNode* getTopLevelContextNode(
llvm::StringRef FName)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:197
Parameters
- llvm::StringRef FName
¶void markContextSamplesInlined(
const llvm::sampleprof::FunctionSamples*
InlinedSamples)
void markContextSamplesInlined(
const llvm::sampleprof::FunctionSamples*
InlinedSamples)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:128
Parameters
- const llvm::sampleprof::FunctionSamples* InlinedSamples
¶void mergeContextNode(
llvm::ContextTrieNode& FromNode,
llvm::ContextTrieNode& ToNode)
void mergeContextNode(
llvm::ContextTrieNode& FromNode,
llvm::ContextTrieNode& ToNode)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:200
Parameters
- llvm::ContextTrieNode& FromNode
- llvm::ContextTrieNode& ToNode
¶llvm::ContextTrieNode& moveContextSamples(
llvm::ContextTrieNode& ToNodeParent,
const llvm::sampleprof::LineLocation&
CallSite,
llvm::ContextTrieNode&& NodeToMove)
llvm::ContextTrieNode& moveContextSamples(
llvm::ContextTrieNode& ToNodeParent,
const llvm::sampleprof::LineLocation&
CallSite,
llvm::ContextTrieNode&& NodeToMove)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:204
Parameters
- llvm::ContextTrieNode& ToNodeParent
- const llvm::sampleprof::LineLocation& CallSite
- llvm::ContextTrieNode&& NodeToMove
¶void populateFuncToCtxtMap()
void populateFuncToCtxtMap()
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:97
¶void promoteMergeContextSamplesTree(
const llvm::Instruction& Inst,
llvm::StringRef CalleeName)
void promoteMergeContextSamplesTree(
const llvm::Instruction& Inst,
llvm::StringRef CalleeName)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:130
Parameters
- const llvm::Instruction& Inst
- llvm::StringRef CalleeName
¶llvm::ContextTrieNode&
promoteMergeContextSamplesTree(
llvm::ContextTrieNode& NodeToPromo)
llvm::ContextTrieNode&
promoteMergeContextSamplesTree(
llvm::ContextTrieNode& NodeToPromo)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:199
Parameters
- llvm::ContextTrieNode& NodeToPromo
¶llvm::ContextTrieNode&
promoteMergeContextSamplesTree(
llvm::ContextTrieNode& FromNode,
llvm::ContextTrieNode& ToNodeParent)
llvm::ContextTrieNode&
promoteMergeContextSamplesTree(
llvm::ContextTrieNode& FromNode,
llvm::ContextTrieNode& ToNodeParent)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:202
Parameters
- llvm::ContextTrieNode& FromNode
- llvm::ContextTrieNode& ToNodeParent
¶void setContextNode(
const llvm::sampleprof::FunctionSamples*
FSample,
llvm::ContextTrieNode* Node)
void setContextNode(
const llvm::sampleprof::FunctionSamples*
FSample,
llvm::ContextTrieNode* Node)
Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:207
Parameters
- const llvm::sampleprof::FunctionSamples* FSample
- llvm::ContextTrieNode* Node