LLVM 20.0.0git
Public Member Functions | List of all members
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})
 
ContextTrieNodegetChildContext (const LineLocation &CallSite, FunctionId ChildName)
 
ContextTrieNodegetHottestChildContext (const LineLocation &CallSite)
 
ContextTrieNodegetOrCreateChildContext (const LineLocation &CallSite, FunctionId ChildName, bool AllowCreate=true)
 
void removeChildContext (const LineLocation &CallSite, FunctionId ChildName)
 
std::map< uint64_t, ContextTrieNode > & getAllChildContext ()
 
FunctionId getFuncName () const
 
FunctionSamplesgetFunctionSamples () const
 
void setFunctionSamples (FunctionSamples *FSamples)
 
std::optional< uint32_tgetFunctionSize () const
 
void addFunctionSize (uint32_t FSize)
 
LineLocation getCallSiteLoc () const
 
ContextTrieNodegetParentContext () const
 
void setParentContext (ContextTrieNode *Parent)
 
void setCallSiteLoc (const LineLocation &Loc)
 
void dumpNode ()
 
void dumpTree ()
 

Detailed Description

Definition at line 34 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

Definition at line 36 of file SampleContextTracker.h.

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 llvm::dbgs().

Referenced by llvm::SampleContextTracker::dump().

◆ getAllChildContext()

std::map< uint64_t, ContextTrieNode > & llvm::ContextTrieNode::getAllChildContext ( )

◆ getCallSiteLoc()

LineLocation llvm::ContextTrieNode::getCallSiteLoc ( ) const

◆ getChildContext()

ContextTrieNode * llvm::ContextTrieNode::getChildContext ( const LineLocation CallSite,
FunctionId  ChildName 
)

◆ getFuncName()

FunctionId llvm::ContextTrieNode::getFuncName ( ) const

Definition at line 116 of file SampleContextTracker.cpp.

◆ getFunctionSamples()

FunctionSamples * llvm::ContextTrieNode::getFunctionSamples ( ) const

◆ 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.


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