LLVM  14.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)
 
ContextTrieNodemoveToChildContext (const LineLocation &CallSite, ContextTrieNode &&NodeToMove, uint32_t ContextFramesToRemove, bool DeleteNode=true)
 
void removeChildContext (const LineLocation &CallSite, StringRef ChildName)
 
std::map< uint32_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 dumpNode ()
 
void dumpTree ()
 

Detailed Description

Definition at line 36 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 38 of file SampleContextTracker.h.

Member Function Documentation

◆ addFunctionSize()

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

Definition at line 132 of file SampleContextTracker.cpp.

◆ dumpNode()

void llvm::ContextTrieNode::dumpNode ( )

Definition at line 149 of file SampleContextTracker.cpp.

References llvm::dbgs().

◆ dumpTree()

void llvm::ContextTrieNode::dumpTree ( )

Definition at line 160 of file SampleContextTracker.cpp.

References llvm::dbgs().

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

◆ getAllChildContext()

std::map< uint32_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 120 of file SampleContextTracker.cpp.

◆ getFunctionSamples()

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

◆ getFunctionSize()

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

Definition at line 130 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 
)

Definition at line 188 of file SampleContextTracker.cpp.

References assert().

◆ getParentContext()

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

◆ moveToChildContext()

ContextTrieNode & llvm::ContextTrieNode::moveToChildContext ( const LineLocation CallSite,
ContextTrieNode &&  NodeToMove,
uint32_t  ContextFramesToRemove,
bool  DeleteNode = true 
)

Definition at line 65 of file SampleContextTracker.cpp.

References assert(), getParentContext(), and setParentContext().

◆ removeChildContext()

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

Definition at line 109 of file SampleContextTracker.cpp.

◆ setFunctionSamples()

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

◆ setParentContext()

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

Definition at line 145 of file SampleContextTracker.cpp.

Referenced by moveToChildContext().


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