LLVM  14.0.0git
Public Member Functions | List of all members
llvm::BranchProbabilityInfo::SccInfo Class Reference

#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. More...
 
bool isSCCHeader (const BasicBlock *BB, int SccNum) const
 Returns true if BB is a 'header' block in SCC with SccNum ID, false otherwise. More...
 
bool isSCCExitingBlock (const BasicBlock *BB, int SccNum) const
 Returns true if BB is an 'exiting' block in SCC with SccNum ID, false otherwise. More...
 
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. More...
 
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. More...
 

Detailed Description

Definition at line 207 of file BranchProbabilityInfo.h.

Constructor & Destructor Documentation

◆ SccInfo()

BranchProbabilityInfo::SccInfo::SccInfo ( const Function F)
explicit

Definition at line 144 of file BranchProbabilityInfo.cpp.

References BB, llvm::dbgs(), F, LLVM_DEBUG, and llvm::scc_begin().

Member Function Documentation

◆ getSccEnterBlocks()

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 174 of file BranchProbabilityInfo.cpp.

References BB, and llvm::predecessors().

◆ getSccExitBlocks()

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 186 of file BranchProbabilityInfo.cpp.

References BB, and llvm::successors().

◆ getSCCNum()

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 167 of file BranchProbabilityInfo.cpp.

References BB.

◆ isSCCExitingBlock()

bool llvm::BranchProbabilityInfo::SccInfo::isSCCExitingBlock ( const BasicBlock BB,
int  SccNum 
) const
inline

Returns true if BB is an 'exiting' block in SCC with SccNum ID, false otherwise.

Definition at line 246 of file BranchProbabilityInfo.h.

References BB.

◆ isSCCHeader()

bool llvm::BranchProbabilityInfo::SccInfo::isSCCHeader ( const BasicBlock BB,
int  SccNum 
) const
inline

Returns true if BB is a 'header' block in SCC with SccNum ID, false otherwise.

Definition at line 241 of file BranchProbabilityInfo.h.

References BB.


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