22 "machine-branch-prob",
23 "Machine Branch Probability Analysis",
false,
true)
31 cl::desc(
"branch probability threshold in percentage"
32 "to be considered very likely"),
36 "profile-likely-prob",
37 cl::desc(
"branch probability threshold in percentage to be considered"
38 " very likely when profile is available"),
51 OS <<
"Printing analysis 'Machine Branch Probability Analysis' for machine "
57 MBPI.printEdgeProbability(OS <<
" ", &
MBB, Succ);
71void MachineBranchProbabilityInfoWrapperPass::anchor() {}
79 return !PAC.preservedWhenStateless();
85 return Src->getSuccProbability(Dst);
107 <<
" probability is " << Prob
108 << (
isEdgeHot(Src, Dst) ?
" [HOT edge]\n" :
"\n");
COFF::MachineTypes Machine
machine branch Machine Branch Probability Analysis
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
ImmutablePass class - This class is used to provide information that does not need to be run.
SmallVectorImpl< MachineBasicBlock * >::const_iterator const_succ_iterator
iterator_range< succ_iterator > successors()
Result run(MachineFunction &, MachineFunctionAnalysisManager &)
MachineBranchProbabilityInfoWrapperPass()
raw_ostream & printEdgeProbability(raw_ostream &OS, const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const
bool invalidate(MachineFunction &, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &)
bool isEdgeHot(const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const
BranchProbability getEdgeProbability(const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
A global registry used in conjunction with static constructors to make pluggable components (like tar...
This class implements an extremely fast bulk output stream that can only output to a stream.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
cl::opt< unsigned > ProfileLikelyProb
cl::opt< unsigned > StaticLikelyProb
void initializeMachineBranchProbabilityInfoWrapperPassPass(PassRegistry &)
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
A special type used by analysis passes to provide an address that identifies that particular analysis...