LLVM
8.0.1
|
An union-find based Minimum Spanning Tree for CFG. More...
#include "Transforms/Instrumentation/CFGMST.h"
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 | |
Function & | F |
std::vector< std::unique_ptr< Edge > > | AllEdges |
DenseMap< const BasicBlock *, std::unique_ptr< BBInfo > > | BBInfos |
bool | ExitBlockFound = false |
BranchProbabilityInfo * | BPI |
BlockFrequencyInfo * | BFI |
An union-find based Minimum Spanning Tree for CFG.
Implements a Union-find algorithm to compute Minimum Spanning Tree for a given CFG.
|
inline |
Definition at line 277 of file CFGMST.h.
References llvm::CFGMST< Edge, BBInfo >::buildEdges(), llvm::CFGMST< Edge, BBInfo >::computeMinimumSpanningTree(), and llvm::CFGMST< Edge, BBInfo >::sortEdgesByWeight().
|
inline |
Definition at line 255 of file CFGMST.h.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), and llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size().
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().
|
inline |
Definition at line 99 of file CFGMST.h.
References llvm::CFGMST< Edge, BBInfo >::addEdge(), llvm::Function::begin(), llvm::CFGMST< Edge, BBInfo >::BFI, llvm::CFGMST< Edge, BBInfo >::BPI, llvm::dbgs(), E, llvm::Function::end(), llvm::BlockFrequencyInfo::getBlockFreq(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::Function::getEntryBlock(), llvm::BlockFrequencyInfo::getEntryFreq(), llvm::BlockFrequency::getFrequency(), llvm::Value::getName(), llvm::Instruction::getNumSuccessors(), llvm::Instruction::getSuccessor(), llvm::BasicBlock::getTerminator(), llvm::isCriticalEdge(), LLVM_DEBUG, llvm::BranchProbability::scale(), llvm::succ_empty(), llvm::successors(), and UINT64_MAX.
Referenced by llvm::CFGMST< Edge, BBInfo >::CFGMST().
|
inline |
Definition at line 208 of file CFGMST.h.
References llvm::CFGMST< Edge, BBInfo >::unionGroups().
Referenced by llvm::CFGMST< Edge, BBInfo >::CFGMST().
|
inline |
Definition at line 236 of file CFGMST.h.
References llvm::CFGMST< Edge, BBInfo >::getBBInfo(), llvm::Value::getName(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), and llvm::Twine::str().
Referenced by llvm::createPGOInstrumentationUseLegacyPass().
|
inline |
Definition at line 54 of file CFGMST.h.
Referenced by llvm::CFGMST< Edge, BBInfo >::unionGroups().
|
inline |
Definition at line 89 of file CFGMST.h.
References llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), and llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by llvm::createPGOInstrumentationUseLegacyPass().
|
inline |
Definition at line 82 of file CFGMST.h.
References assert(), and llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find().
Referenced by llvm::createPGOInstrumentationUseLegacyPass(), llvm::CFGMST< Edge, BBInfo >::dumpEdges(), and llvm::CFGMST< Edge, BBInfo >::unionGroups().
|
inline |
Definition at line 198 of file CFGMST.h.
Referenced by llvm::CFGMST< Edge, BBInfo >::CFGMST().
|
inline |
Definition at line 62 of file CFGMST.h.
References llvm::CFGMST< Edge, BBInfo >::findAndCompressGroup(), and llvm::CFGMST< Edge, BBInfo >::getBBInfo().
Referenced by llvm::CFGMST< Edge, BBInfo >::computeMinimumSpanningTree().
std::vector<std::unique_ptr<Edge> > llvm::CFGMST< Edge, BBInfo >::AllEdges |
Definition at line 44 of file CFGMST.h.
Referenced by llvm::createPGOInstrumentationUseLegacyPass().
DenseMap<const BasicBlock *, std::unique_ptr<BBInfo> > llvm::CFGMST< Edge, BBInfo >::BBInfos |
Definition at line 47 of file CFGMST.h.
Referenced by llvm::createPGOInstrumentationUseLegacyPass().
BlockFrequencyInfo* llvm::CFGMST< Edge, BBInfo >::BFI |
Definition at line 274 of file CFGMST.h.
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().
BranchProbabilityInfo* llvm::CFGMST< Edge, BBInfo >::BPI |
Definition at line 273 of file CFGMST.h.
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().
bool llvm::CFGMST< Edge, BBInfo >::ExitBlockFound = false |
Function& llvm::CFGMST< Edge, BBInfo >::F |