LLVM  16.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, StringRef FName=StringRef(), FunctionSamples *FSamples=nullptr, LineLocation CallLoc={0, 0})
 
ContextTrieNodegetChildContext (const LineLocation &CallSite, StringRef ChildName)
 
ContextTrieNodegetHottestChildContext (const LineLocation &CallSite)
 
ContextTrieNodegetOrCreateChildContext (const LineLocation &CallSite, StringRef ChildName, bool AllowCreate=true)
 
void removeChildContext (const LineLocation &CallSite, StringRef ChildName)
 
std::map< uint64_t, ContextTrieNode > & getAllChildContext ()
 
StringRef getFuncName () const
 
FunctionSamplesgetFunctionSamples () const
 
void setFunctionSamples (FunctionSamples *FSamples)
 
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 35 of file SampleContextTracker.h.

Constructor & Destructor Documentation

◆ ContextTrieNode()

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

Definition at line 37 of file SampleContextTracker.h.

Member Function Documentation

◆ addFunctionSize()

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

Definition at line 129 of file SampleContextTracker.cpp.

◆ dumpNode()

void llvm::ContextTrieNode::dumpNode ( )

Definition at line 150 of file SampleContextTracker.cpp.

References llvm::dbgs().

◆ dumpTree()

void llvm::ContextTrieNode::dumpTree ( )

Definition at line 161 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,
StringRef  ChildName 
)

◆ getFuncName()

StringRef llvm::ContextTrieNode::getFuncName ( ) const

Definition at line 117 of file SampleContextTracker.cpp.

◆ getFunctionSamples()

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

◆ getFunctionSize()

Optional< uint32_t > llvm::ContextTrieNode::getFunctionSize ( ) const

Definition at line 127 of file SampleContextTracker.cpp.

◆ getHottestChildContext()

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

◆ getOrCreateChildContext()

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

◆ getParentContext()

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

◆ removeChildContext()

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

◆ setCallSiteLoc()

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

Definition at line 146 of file SampleContextTracker.cpp.

◆ setFunctionSamples()

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

◆ setParentContext()

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

Definition at line 142 of file SampleContextTracker.cpp.


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