LLVM 22.0.0git
llvm::ContextTrieNode Class Reference

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

Public Member Functions

 ContextTrieNode (ContextTrieNode *Parent=nullptr, FunctionId FName=FunctionId(), FunctionSamples *FSamples=nullptr, LineLocation CallLoc={0, 0})
LLVM_ABI ContextTrieNodegetChildContext (const LineLocation &CallSite, FunctionId ChildName)
LLVM_ABI ContextTrieNodegetHottestChildContext (const LineLocation &CallSite)
LLVM_ABI ContextTrieNodegetOrCreateChildContext (const LineLocation &CallSite, FunctionId ChildName, bool AllowCreate=true)
LLVM_ABI void removeChildContext (const LineLocation &CallSite, FunctionId ChildName)
LLVM_ABI std::map< uint64_t, ContextTrieNode > & getAllChildContext ()
LLVM_ABI FunctionId getFuncName () const
LLVM_ABI FunctionSamplesgetFunctionSamples () const
LLVM_ABI void setFunctionSamples (FunctionSamples *FSamples)
LLVM_ABI std::optional< uint32_tgetFunctionSize () const
LLVM_ABI void addFunctionSize (uint32_t FSize)
LLVM_ABI LineLocation getCallSiteLoc () const
LLVM_ABI ContextTrieNodegetParentContext () const
LLVM_ABI void setParentContext (ContextTrieNode *Parent)
LLVM_ABI void setCallSiteLoc (const LineLocation &Loc)
LLVM_ABI void dumpNode ()
LLVM_ABI void dumpTree ()

Detailed Description

Definition at line 35 of file SampleContextTracker.h.

Constructor & Destructor Documentation

◆ ContextTrieNode()

llvm::ContextTrieNode::ContextTrieNode ( ContextTrieNode * Parent = nullptr,
FunctionId FName = FunctionId(),
FunctionSamples * FSamples = nullptr,
LineLocation CallLoc = {0, 0} )
inline

Member Function Documentation

◆ addFunctionSize()

void llvm::ContextTrieNode::addFunctionSize ( uint32_t FSize)

Definition at line 130 of file SampleContextTracker.cpp.

◆ dumpNode()

void llvm::ContextTrieNode::dumpNode ( )

Definition at line 151 of file SampleContextTracker.cpp.

References llvm::dbgs().

◆ dumpTree()

void llvm::ContextTrieNode::dumpTree ( )

Definition at line 162 of file SampleContextTracker.cpp.

References ContextTrieNode(), and llvm::dbgs().

◆ getAllChildContext()

◆ getCallSiteLoc()

◆ getChildContext()

◆ getFuncName()

FunctionId llvm::ContextTrieNode::getFuncName ( ) const

Definition at line 116 of file SampleContextTracker.cpp.

◆ getFunctionSamples()

◆ getFunctionSize()

std::optional< uint32_t > llvm::ContextTrieNode::getFunctionSize ( ) const

Definition at line 126 of file SampleContextTracker.cpp.

◆ getHottestChildContext()

ContextTrieNode * llvm::ContextTrieNode::getHottestChildContext ( const LineLocation & CallSite)

◆ getOrCreateChildContext()

ContextTrieNode * llvm::ContextTrieNode::getOrCreateChildContext ( const LineLocation & CallSite,
FunctionId ChildName,
bool AllowCreate = true )

◆ getParentContext()

ContextTrieNode * llvm::ContextTrieNode::getParentContext ( ) const

◆ removeChildContext()

void llvm::ContextTrieNode::removeChildContext ( const LineLocation & CallSite,
FunctionId ChildName )

◆ setCallSiteLoc()

void llvm::ContextTrieNode::setCallSiteLoc ( const LineLocation & Loc)

Definition at line 147 of file SampleContextTracker.cpp.

◆ setFunctionSamples()

void llvm::ContextTrieNode::setFunctionSamples ( FunctionSamples * FSamples)

◆ setParentContext()

void llvm::ContextTrieNode::setParentContext ( ContextTrieNode * Parent)

Definition at line 143 of file SampleContextTracker.cpp.

References ContextTrieNode().


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