LLVM 20.0.0git
Public Member Functions | List of all members
llvm::CFGMST< Edge, BBInfo > Class Template Reference

An union-find based Minimum Spanning Tree for CFG. More...

#include "llvm/Transforms/Instrumentation/CFGMST.h"

Public Member Functions

void dumpEdges (raw_ostream &OS, const Twine &Message) const
 
Edge & addEdge (BasicBlock *Src, BasicBlock *Dest, uint64_t W)
 
 CFGMST (Function &Func, bool InstrumentFuncEntry, bool InstrumentLoopEntries, BranchProbabilityInfo *BPI=nullptr, BlockFrequencyInfo *BFI=nullptr, LoopInfo *LI=nullptr)
 
const std::vector< std::unique_ptr< Edge > > & allEdges () const
 
std::vector< std::unique_ptr< Edge > > & allEdges ()
 
size_t numEdges () const
 
size_t bbInfoSize () const
 
BBInfo & getBBInfo (const BasicBlock *BB) const
 
BBInfo * findBBInfo (const BasicBlock *BB) const
 

Detailed Description

template<class Edge, class BBInfo>
class llvm::CFGMST< Edge, BBInfo >

An union-find based Minimum Spanning Tree for CFG.

Implements a Union-find algorithm to compute Minimum Spanning Tree for a given CFG.

Definition at line 40 of file CFGMST.h.

Constructor & Destructor Documentation

◆ CFGMST()

template<class Edge , class BBInfo >
llvm::CFGMST< Edge, BBInfo >::CFGMST ( Function Func,
bool  InstrumentFuncEntry,
bool  InstrumentLoopEntries,
BranchProbabilityInfo BPI = nullptr,
BlockFrequencyInfo BFI = nullptr,
LoopInfo LI = nullptr 
)
inline

Definition at line 322 of file CFGMST.h.

References assert(), and F.

Member Function Documentation

◆ addEdge()

template<class Edge , class BBInfo >
Edge & llvm::CFGMST< Edge, BBInfo >::addEdge ( BasicBlock Src,
BasicBlock Dest,
uint64_t  W 
)
inline

◆ allEdges() [1/2]

template<class Edge , class BBInfo >
std::vector< std::unique_ptr< Edge > > & llvm::CFGMST< Edge, BBInfo >::allEdges ( )
inline

Definition at line 345 of file CFGMST.h.

◆ allEdges() [2/2]

template<class Edge , class BBInfo >
const std::vector< std::unique_ptr< Edge > > & llvm::CFGMST< Edge, BBInfo >::allEdges ( ) const
inline

Definition at line 341 of file CFGMST.h.

Referenced by dumpEdges().

◆ bbInfoSize()

template<class Edge , class BBInfo >
size_t llvm::CFGMST< Edge, BBInfo >::bbInfoSize ( ) const
inline

◆ dumpEdges()

template<class Edge , class BBInfo >
void llvm::CFGMST< Edge, BBInfo >::dumpEdges ( raw_ostream OS,
const Twine Message 
) const
inline

◆ findBBInfo()

template<class Edge , class BBInfo >
BBInfo * llvm::CFGMST< Edge, BBInfo >::findBBInfo ( const BasicBlock BB) const
inline

◆ getBBInfo()

template<class Edge , class BBInfo >
BBInfo & llvm::CFGMST< Edge, BBInfo >::getBBInfo ( const BasicBlock BB) const
inline

◆ numEdges()

template<class Edge , class BBInfo >
size_t llvm::CFGMST< Edge, BBInfo >::numEdges ( ) const
inline

Definition at line 347 of file CFGMST.h.


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