LLVM 20.0.0git
|
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/EHUtils.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/CodeGen/BasicBlockSectionUtils.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include <optional>
Go to the source code of this file.
Functions | |
static void | setDescendantEHBlocksCold (MachineFunction &MF) |
setDescendantEHBlocksCold - This splits all EH pads and blocks reachable only by EH pad as cold. | |
static void | finishAdjustingBasicBlocksAndLandingPads (MachineFunction &MF) |
static bool | isColdBlock (const MachineBasicBlock &MBB, const MachineBlockFrequencyInfo *MBFI, ProfileSummaryInfo *PSI) |
INITIALIZE_PASS (MachineFunctionSplitter, "machine-function-splitter", "Split machine functions using profile information", false, false) MachineFunctionPass *llvm | |
Variables | |
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) |
|
static |
Definition at line 100 of file MachineFunctionSplitter.cpp.
References llvm::avoidZeroOffsetLandingPad(), llvm::sortBasicBlocksAndUpdateBranches(), X, and Y.
INITIALIZE_PASS | ( | MachineFunctionSplitter | , |
"machine-function-splitter" | , | ||
"Split machine functions using profile information" | , | ||
false | , | ||
false | |||
) |
Definition at line 208 of file MachineFunctionSplitter.cpp.
|
static |
Definition at line 108 of file MachineFunctionSplitter.cpp.
References ColdCountThreshold, llvm::MachineBlockFrequencyInfo::getBlockProfileCount(), llvm::ProfileSummaryInfo::hasCSInstrumentationProfile(), llvm::ProfileSummaryInfo::hasInstrumentationProfile(), llvm::ProfileSummaryInfo::hasSampleProfile(), llvm::ProfileSummaryInfo::isColdCountNthPercentile(), MBB, and PercentileCutoff.
|
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 92 of file MachineFunctionSplitter.cpp.
References llvm::Block, llvm::MBBSectionID::ColdSectionID, and llvm::computeEHOnlyBlocks().
|
static |
|
static |
Referenced by isColdBlock(), llvm::ProfileSummaryInfo::isColdBlockNthPercentile(), llvm::ProfileSummaryInfo::isColdCountNthPercentile(), llvm::ProfileSummaryInfo::isFunctionColdInCallGraphNthPercentile(), llvm::ProfileSummaryInfo::isFunctionHotInCallGraphNthPercentile(), llvm::ProfileSummaryInfo::isHotBlockNthPercentile(), and llvm::ProfileSummaryInfo::isHotCountNthPercentile().