LLVM 20.0.0git
|
#include "llvm/Analysis/BranchProbabilityInfo.h"
Public Member Functions | |
SccInfo (const Function &F) | |
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. | |
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. | |
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 214 of file BranchProbabilityInfo.h.
Definition at line 216 of file BranchProbabilityInfo.cpp.
References llvm::dbgs(), F, 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 246 of file BranchProbabilityInfo.cpp.
References 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 258 of file BranchProbabilityInfo.cpp.
References 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 239 of file BranchProbabilityInfo.cpp.
|
inline |
Returns true if BB
is an 'exiting' block in SCC with SccNum
ID, false otherwise.
Definition at line 253 of file BranchProbabilityInfo.h.
|
inline |
Returns true if BB
is a 'header' block in SCC with SccNum
ID, false otherwise.
Definition at line 248 of file BranchProbabilityInfo.h.