LLVM 22.0.0git
|
#include "llvm/Analysis/BranchProbabilityInfo.h"
Public Member Functions | |
LLVM_ABI | SccInfo (const Function &F) |
LLVM_ABI int | getSCCNum (const BasicBlock *BB) const |
If BB belongs to some SCC then ID of that SCC is returned, otherwise -1 is returned. | |
bool | isSCCHeader (const BasicBlock *BB, int SccNum) const |
Returns true if BB is a 'header' block in SCC with SccNum ID, false otherwise. | |
bool | isSCCExitingBlock (const BasicBlock *BB, int SccNum) const |
Returns true if BB is an 'exiting' block in SCC with SccNum ID, false otherwise. | |
LLVM_ABI void | getSccEnterBlocks (int SccNum, SmallVectorImpl< BasicBlock * > &Enters) const |
Fills in Enters vector with all such blocks that don't belong to SCC with SccNum ID but there is an edge to a block belonging to the SCC. | |
LLVM_ABI void | getSccExitBlocks (int SccNum, SmallVectorImpl< BasicBlock * > &Exits) const |
Fills in Exits vector with all such blocks that don't belong to SCC with SccNum ID but there is an edge from a block belonging to the SCC. |
Definition at line 217 of file BranchProbabilityInfo.h.
Definition at line 213 of file BranchProbabilityInfo.cpp.
References llvm::dbgs(), F, llvm::scc_iterator< GraphT, GT >::isAtEnd(), LLVM_DEBUG, and llvm::scc_begin().
void BranchProbabilityInfo::SccInfo::getSccEnterBlocks | ( | int | SccNum, |
SmallVectorImpl< BasicBlock * > & | Enters ) const |
Fills in Enters
vector with all such blocks that don't belong to SCC with SccNum
ID but there is an edge to a block belonging to the SCC.
Definition at line 243 of file BranchProbabilityInfo.cpp.
References getSCCNum(), isSCCHeader(), llvm::predecessors(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
void BranchProbabilityInfo::SccInfo::getSccExitBlocks | ( | int | SccNum, |
SmallVectorImpl< BasicBlock * > & | Exits ) const |
Fills in Exits
vector with all such blocks that don't belong to SCC with SccNum
ID but there is an edge from a block belonging to the SCC.
Definition at line 255 of file BranchProbabilityInfo.cpp.
References getSCCNum(), isSCCExitingBlock(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::successors().
int BranchProbabilityInfo::SccInfo::getSCCNum | ( | const BasicBlock * | BB | ) | const |
If BB
belongs to some SCC then ID of that SCC is returned, otherwise -1 is returned.
If BB
belongs to more than one SCC at the same time result is undefined.
Definition at line 236 of file BranchProbabilityInfo.cpp.
Referenced by getSccEnterBlocks(), and getSccExitBlocks().
|
inline |
Returns true if BB
is an 'exiting' block in SCC with SccNum
ID, false otherwise.
Definition at line 256 of file BranchProbabilityInfo.h.
Referenced by getSccExitBlocks().
|
inline |
Returns true if BB
is a 'header' block in SCC with SccNum
ID, false otherwise.
Definition at line 251 of file BranchProbabilityInfo.h.
Referenced by getSccEnterBlocks().