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

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

#include "Transforms/Instrumentation/CFGMST.h"

Collaboration diagram for llvm::CFGMST< Edge, BBInfo >:
Collaboration graph
[legend]

Public Member Functions

BBInfo * findAndCompressGroup (BBInfo *G)
 
bool unionGroups (const BasicBlock *BB1, const BasicBlock *BB2)
 
BBInfo & getBBInfo (const BasicBlock *BB) const
 
BBInfo * findBBInfo (const BasicBlock *BB) const
 
void buildEdges ()
 
void sortEdgesByWeight ()
 
void computeMinimumSpanningTree ()
 
void dumpEdges (raw_ostream &OS, const Twine &Message) const
 
Edge & addEdge (const BasicBlock *Src, const BasicBlock *Dest, uint64_t W)
 
 CFGMST (Function &Func, BranchProbabilityInfo *BPI_=nullptr, BlockFrequencyInfo *BFI_=nullptr)
 

Public Attributes

FunctionF
 
std::vector< std::unique_ptr< Edge > > AllEdges
 
DenseMap< const BasicBlock *, std::unique_ptr< BBInfo > > BBInfos
 
BranchProbabilityInfoBPI
 
BlockFrequencyInfoBFI
 

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 38 of file CFGMST.h.

Constructor & Destructor Documentation

◆ CFGMST()

template<class Edge, class BBInfo>
llvm::CFGMST< Edge, BBInfo >::CFGMST ( Function Func,
BranchProbabilityInfo BPI_ = nullptr,
BlockFrequencyInfo BFI_ = nullptr 
)
inline

Member Function Documentation

◆ addEdge()

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

◆ buildEdges()

template<class Edge, class BBInfo>
void llvm::CFGMST< Edge, BBInfo >::buildEdges ( )
inline

◆ computeMinimumSpanningTree()

template<class Edge, class BBInfo>
void llvm::CFGMST< Edge, BBInfo >::computeMinimumSpanningTree ( )
inline

◆ dumpEdges()

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

◆ findAndCompressGroup()

template<class Edge, class BBInfo>
BBInfo* llvm::CFGMST< Edge, BBInfo >::findAndCompressGroup ( BBInfo *  G)
inline

Definition at line 50 of file CFGMST.h.

Referenced by llvm::CFGMST< Edge, BBInfo >::unionGroups().

◆ 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

◆ sortEdgesByWeight()

template<class Edge, class BBInfo>
void llvm::CFGMST< Edge, BBInfo >::sortEdgesByWeight ( )
inline

Definition at line 142 of file CFGMST.h.

Referenced by llvm::CFGMST< Edge, BBInfo >::CFGMST().

◆ unionGroups()

template<class Edge, class BBInfo>
bool llvm::CFGMST< Edge, BBInfo >::unionGroups ( const BasicBlock BB1,
const BasicBlock BB2 
)
inline

Member Data Documentation

◆ AllEdges

template<class Edge, class BBInfo>
std::vector<std::unique_ptr<Edge> > llvm::CFGMST< Edge, BBInfo >::AllEdges

Definition at line 44 of file CFGMST.h.

Referenced by llvm::createPGOInstrumentationUseLegacyPass().

◆ BBInfos

template<class Edge, class BBInfo>
DenseMap<const BasicBlock *, std::unique_ptr<BBInfo> > llvm::CFGMST< Edge, BBInfo >::BBInfos

Definition at line 47 of file CFGMST.h.

Referenced by llvm::createPGOInstrumentationUseLegacyPass().

◆ BFI

template<class Edge, class BBInfo>
BlockFrequencyInfo* llvm::CFGMST< Edge, BBInfo >::BFI

Definition at line 214 of file CFGMST.h.

Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().

◆ BPI

template<class Edge, class BBInfo>
BranchProbabilityInfo* llvm::CFGMST< Edge, BBInfo >::BPI

Definition at line 213 of file CFGMST.h.

Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().

◆ F

template<class Edge, class BBInfo>
Function& llvm::CFGMST< Edge, BBInfo >::F

Definition at line 40 of file CFGMST.h.


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