Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::memprof::CallStack< NodeT, IteratorT > Class Template Reference

Helper class to iterate through stack ids in both metadata (memprof MIB and callsite) and the corresponding ThinLTO summary data structures (CallsiteInfo and MIBInfo). More...

#include "llvm/Analysis/MemoryProfileInfo.h"

Classes

struct  CallStackIterator

Public Member Functions

 CallStack (const NodeT *N=nullptr)
bool empty () const
CallStackIterator begin () const
CallStackIterator end () const
CallStackIterator beginAfterSharedPrefix (const CallStack &Other)
uint64_t back () const
LLVM_ABI uint64_t back () const

Detailed Description

template<class NodeT, class IteratorT>
class llvm::memprof::CallStack< NodeT, IteratorT >

Helper class to iterate through stack ids in both metadata (memprof MIB and callsite) and the corresponding ThinLTO summary data structures (CallsiteInfo and MIBInfo).

This simplifies implementation of client code which doesn't need to worry about whether we are operating with IR (Regular LTO), or summary (ThinLTO).

Definition at line 186 of file MemoryProfileInfo.h.

Constructor & Destructor Documentation

◆ CallStack()

template<class NodeT, class IteratorT>
llvm::memprof::CallStack< NodeT, IteratorT >::CallStack ( const NodeT * N = nullptr)
inline

Definition at line 188 of file MemoryProfileInfo.h.

Referenced by beginAfterSharedPrefix().

Member Function Documentation

◆ back() [1/2]

template<class NodeT, class IteratorT>
uint64_t llvm::memprof::CallStack< NodeT, IteratorT >::back ( ) const

Definition at line 233 of file MemoryProfileInfo.h.

References assert().

◆ back() [2/2]

◆ begin()

template<class NodeT, class IteratorT>
CallStack< NodeT, IteratorT >::CallStackIterator llvm::memprof::CallStack< NodeT, IteratorT >::begin ( ) const

Definition at line 240 of file MemoryProfileInfo.h.

Referenced by beginAfterSharedPrefix().

◆ beginAfterSharedPrefix()

template<class NodeT, class IteratorT>
CallStack< NodeT, IteratorT >::CallStackIterator llvm::memprof::CallStack< NodeT, IteratorT >::beginAfterSharedPrefix ( const CallStack< NodeT, IteratorT > & Other)

Definition at line 246 of file MemoryProfileInfo.h.

References assert(), begin(), CallStack(), end(), and llvm::Other.

Referenced by checkAllocContextIds(), and computeFunctionSummary().

◆ empty()

template<class NodeT, class IteratorT>
bool llvm::memprof::CallStack< NodeT, IteratorT >::empty ( ) const
inline

Definition at line 204 of file MemoryProfileInfo.h.

Referenced by computeFunctionSummary().

◆ end()

template<class NodeT, class IteratorT>
CallStackIterator llvm::memprof::CallStack< NodeT, IteratorT >::end ( ) const
inline

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