LLVM 24.0.0git
BasicBlockSections.cpp File Reference

Go to the source code of this file.

Functions

 INITIALIZE_PASS_BEGIN (BasicBlockSections, "bbsections-prepare", "Prepares for basic block sections, by splitting functions " "into clusters of basic blocks.", false, false) INITIALIZE_PASS_END(BasicBlockSections
bbsections Prepares for basic block by splitting functions into clusters of basic static false void updateBranches (MachineFunction &MF, const SmallVector< MachineBasicBlock * > &PreLayoutFallThroughs)
static SmallVector< BBClusterInfo > createBBClusterInfoForFunction (MachineFunction &MF, const BasicBlockMatchingAndInference &BMI)
static void assignSections (MachineFunction &MF, const DenseMap< UniqueBBID, BBClusterInfo > &FuncClusterInfo)
static void setDescendantEHBlocksCold (MachineFunction &MF)
 setDescendantEHBlocksCold - This splits all EH pads and blocks reachable only by EH pad as cold.
static bool isColdBlock (const MachineBasicBlock &MBB, const MachineBlockFrequencyInfo *MBFI, ProfileSummaryInfo *PSI)

Variables

static cl::opt< bool > BBSectionsDetectSourceDrift ("bbsections-detect-source-drift", cl::desc("This checks if there is a fdo instr. profile hash " "mismatch for this function"), cl::init(true), cl::Hidden)
static cl::opt< unsigned > PercentileCutoff ("mfs-psi-cutoff", cl::desc("Percentile profile summary cutoff used to " "determine cold blocks. Unused if set to zero."), cl::init(999950), cl::Hidden)
static cl::opt< unsigned > ColdCountThreshold ("mfs-count-threshold", cl::desc("Minimum number of times a block must be executed to be retained."), cl::init(1), cl::Hidden)
static cl::opt< bool > SplitAllEHCode ("mfs-split-ehcode", cl::desc("Splits all EH code and it's descendants by default."), cl::init(false), cl::Hidden)
bbsections prepare
bbsections Prepares for basic block sections
bbsections Prepares for basic block by splitting functions into clusters of basic blocks
bbsections Prepares for basic block by splitting functions into clusters of basic false

Function Documentation

◆ assignSections()

◆ createBBClusterInfoForFunction()

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( BasicBlockSections ,
"bbsections-prepare" ,
"Prepares for basic block sections,
by splitting functions " "into clusters of basic blocks." ,
false ,
false  )

◆ isColdBlock()

◆ setDescendantEHBlocksCold()

void setDescendantEHBlocksCold ( MachineFunction & MF)
static

setDescendantEHBlocksCold - This splits all EH pads and blocks reachable only by EH pad as cold.

This will help mark EH pads statically cold instead of relying on profile data.

Definition at line 437 of file BasicBlockSections.cpp.

References llvm::Block, llvm::MBBSectionID::ColdSectionID, and llvm::computeEHOnlyBlocks().

◆ updateBranches()

bbsections Prepares for basic block by splitting functions into clusters of basic static false void updateBranches ( MachineFunction & MF,
const SmallVector< MachineBasicBlock * > & PreLayoutFallThroughs )
static

Variable Documentation

◆ BBSectionsDetectSourceDrift

cl::opt< bool > BBSectionsDetectSourceDrift("bbsections-detect-source-drift", cl::desc("This checks if there is a fdo instr. profile hash " "mismatch for this function"), cl::init(true), cl::Hidden) ( "bbsections-detect-source-drift" ,
cl::desc("This checks if there is a fdo instr. profile hash " "mismatch for this function") ,
cl::init(true) ,
cl::Hidden  )
static

◆ blocks

◆ ColdCountThreshold

cl::opt< unsigned > ColdCountThreshold("mfs-count-threshold", cl::desc( "Minimum number of times a block must be executed to be retained."), cl::init(1), cl::Hidden) ( "mfs-count-threshold" ,
cl::desc( "Minimum number of times a block must be executed to be retained.") ,
cl::init(1) ,
cl::Hidden  )
static

◆ false

bbsections Prepares for basic block by splitting functions into clusters of basic false

Definition at line 198 of file BasicBlockSections.cpp.

◆ PercentileCutoff

cl::opt< unsigned > PercentileCutoff("mfs-psi-cutoff", cl::desc("Percentile profile summary cutoff used to " "determine cold blocks. Unused if set to zero."), cl::init(999950), cl::Hidden) ( "mfs-psi-cutoff" ,
cl::desc("Percentile profile summary cutoff used to " "determine cold blocks. Unused if set to zero.") ,
cl::init(999950) ,
cl::Hidden  )
static

◆ prepare

bbsections prepare

◆ sections

◆ SplitAllEHCode

cl::opt< bool > SplitAllEHCode("mfs-split-ehcode", cl::desc("Splits all EH code and it's descendants by default."), cl::init(false), cl::Hidden) ( "mfs-split-ehcode" ,
cl::desc("Splits all EH code and it's descendants by default.") ,
cl::init(false) ,
cl::Hidden  )
static