LLVM
8.0.1
|
GCOVBlock - Collects block information. More...
#include "llvm/ProfileData/GCOV.h"
Public Types | |
using | EdgeIterator = SmallVectorImpl< GCOVEdge * >::const_iterator |
using | BlockVector = SmallVector< const GCOVBlock *, 4 > |
using | BlockVectorLists = SmallVector< BlockVector, 4 > |
using | Edges = SmallVector< GCOVEdge *, 4 > |
Public Member Functions | |
GCOVBlock (GCOVFunction &P, uint32_t N) | |
~GCOVBlock () | |
~GCOVBlock - Delete GCOVBlock and its content. More... | |
const GCOVFunction & | getParent () const |
void | addLine (uint32_t N) |
uint32_t | getLastLine () const |
void | addCount (size_t DstEdgeNo, uint64_t N) |
addCount - Add to block counter while storing the edge count. More... | |
uint64_t | getCount () const |
void | addSrcEdge (GCOVEdge *Edge) |
void | addDstEdge (GCOVEdge *Edge) |
size_t | getNumSrcEdges () const |
size_t | getNumDstEdges () const |
void | sortDstEdges () |
sortDstEdges - Sort destination edges by block number, nop if already sorted. More... | |
EdgeIterator | src_begin () const |
EdgeIterator | src_end () const |
iterator_range< EdgeIterator > | srcs () const |
EdgeIterator | dst_begin () const |
EdgeIterator | dst_end () const |
iterator_range< EdgeIterator > | dsts () const |
void | print (raw_ostream &OS) const |
void | dump () const |
dump - Dump GCOVBlock content to dbgs() for debugging purposes. More... | |
void | collectLineCounts (FileInfo &FI) |
collectLineCounts - Collect line counts. More... | |
Static Public Member Functions | |
static uint64_t | getCycleCount (const Edges &Path) |
Get the count for the detected cycle. More... | |
static void | unblock (const GCOVBlock *U, BlockVector &Blocked, BlockVectorLists &BlockLists) |
Unblock a vertex previously marked as blocked. More... | |
static bool | lookForCircuit (const GCOVBlock *V, const GCOVBlock *Start, Edges &Path, BlockVector &Blocked, BlockVectorLists &BlockLists, const BlockVector &Blocks, uint64_t &Count) |
static void | getCyclesCount (const BlockVector &Blocks, uint64_t &Count) |
Get the count for the list of blocks which lie on the same line. More... | |
static uint64_t | getLineCount (const BlockVector &Blocks) |
Get the count for the list of blocks which lie on the same line. More... | |
using llvm::GCOVBlock::BlockVector = SmallVector<const GCOVBlock *, 4> |
using llvm::GCOVBlock::BlockVectorLists = SmallVector<BlockVector, 4> |
using llvm::GCOVBlock::EdgeIterator = SmallVectorImpl<GCOVEdge *>::const_iterator |
using llvm::GCOVBlock::Edges = SmallVector<GCOVEdge *, 4> |
|
inline |
GCOVBlock::~GCOVBlock | ( | ) |
void GCOVBlock::addCount | ( | size_t | DstEdgeNo, |
uint64_t | N | ||
) |
|
inline |
Definition at line 346 of file GCOV.h.
References assert(), llvm::GCOVEdge::Dst, and llvm::GCOVEdge::Src.
|
inline |
Definition at line 336 of file GCOV.h.
Referenced by llvm::GCOVFunction::readGCNO().
|
inline |
Definition at line 341 of file GCOV.h.
References assert(), and llvm::GCOVEdge::Dst.
void GCOVBlock::collectLineCounts | ( | FileInfo & | FI | ) |
collectLineCounts - Collect line counts.
This must be used after reading .gcno and .gcda files.
Definition at line 407 of file GCOV.cpp.
References llvm::FileInfo::addBlockLine(), and N.
|
inline |
|
inline |
|
inline |
Definition at line 366 of file GCOV.h.
References llvm::dump(), llvm::make_range(), and print().
Referenced by llvm::FileInfo::printBranchInfo().
LLVM_DUMP_METHOD void GCOVBlock::dump | ( | ) | const |
dump - Dump GCOVBlock content to dbgs() for debugging purposes.
Definition at line 436 of file GCOV.cpp.
References llvm::dbgs(), and llvm::GCOVFile::print().
|
inline |
Definition at line 339 of file GCOV.h.
Referenced by llvm::FileInfo::printBlockInfo(), and llvm::FileInfo::printBranchInfo().
Get the count for the detected cycle.
Definition at line 447 of file GCOV.cpp.
References E, and llvm::max().
|
static |
Get the count for the list of blocks which lie on the same line.
Definition at line 525 of file GCOV.cpp.
References lookForCircuit().
Referenced by getLineCount().
|
inline |
|
static |
Get the count for the list of blocks which lie on the same line.
Definition at line 537 of file GCOV.cpp.
References E, llvm::find(), getCyclesCount(), and llvm::RISCVFenceField::W.
Referenced by llvm::FileInfo::print().
|
inline |
Definition at line 335 of file GCOV.h.
Referenced by llvm::FileInfo::printBranchInfo().
|
static |
Definition at line 476 of file GCOV.cpp.
Referenced by getCyclesCount().
void GCOVBlock::print | ( | raw_ostream & | OS | ) | const |
Definition at line 412 of file GCOV.cpp.
References N, and llvm::Number.
void GCOVBlock::sortDstEdges | ( | ) |
|
inline |
|
inline |
|
inline |
Definition at line 360 of file GCOV.h.
References llvm::make_range().
|
static |
Unblock a vertex previously marked as blocked.
Definition at line 459 of file GCOV.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), and llvm::find().