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

Methods

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()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:93

llvm::ContextTrieNode& addTopLevelContextNode(
    llvm::StringRef FName)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:198

Parameters

llvm::StringRef FName

llvm::SampleContextTracker::Iterator begin()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:182

void createContextLessProfileMap(
    llvm::sampleprof::SampleProfileMap&
        ContextLessProfiles)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:134

Parameters

llvm::sampleprof::SampleProfileMap& ContextLessProfiles

void dump()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:191

llvm::SampleContextTracker::Iterator end()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:183

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)

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)

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)

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)

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)

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:122

Parameters

const llvm::sampleprof::SampleContext& Context

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

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:109

Parameters

const llvm::sampleprof::SampleContext& Context

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

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:187

Parameters

const llvm::sampleprof::FunctionSamples& FSamples

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

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:124

Parameters

llvm::ContextTrieNode* Node

StringMap<
    llvm::SampleContextTracker::ContextSamplesTy>&
getFuncToCtxtProfiles()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:142

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:113

Parameters

const llvm::sampleprof::SampleContext& Context
bool AllowCreate

llvm::ContextTrieNode& getRootContext()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:129

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:128

Parameters

const llvm::sampleprof::FunctionSamples* InlinedSamples

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:204

Parameters

llvm::ContextTrieNode& ToNodeParent
const llvm::sampleprof::LineLocation& CallSite
llvm::ContextTrieNode&& NodeToMove

void populateFuncToCtxtMap()

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:97

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:199

Parameters

llvm::ContextTrieNode& NodeToPromo

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)

Declared at: llvm/include/llvm/Transforms/IPO/SampleContextTracker.h:207

Parameters

const llvm::sampleprof::FunctionSamples* FSample
llvm::ContextTrieNode* Node