|
LLVM 24.0.0git
|
#include "CodeGen/BranchFolding.h"
Public Member Functions | |
| BranchFolder (bool DefaultEnableTailMerge, bool CommonHoist, MBFIWrapper &FreqInfo, const MachineBranchProbabilityInfo &ProbInfo, ProfileSummaryInfo *PSI, unsigned MinTailLength=0) | |
| bool | OptimizeFunction (MachineFunction &MF, const TargetInstrInfo *tii, const TargetRegisterInfo *tri, MachineLoopInfo *mli=nullptr, bool AfterPlacement=false) |
| Perhaps branch folding, tail merging and other CFG optimizations on the given function. | |
| void | setBasicBlockReordering (bool Enable) |
| Enable or disable the basic-block reordering sub-phase of branch optimization. | |
Definition at line 32 of file BranchFolding.h.
|
explicit |
Definition at line 163 of file BranchFolding.cpp.
| bool BranchFolder::OptimizeFunction | ( | MachineFunction & | MF, |
| const TargetInstrInfo * | tii, | ||
| const TargetRegisterInfo * | tri, | ||
| MachineLoopInfo * | mli = nullptr, | ||
| bool | AfterPlacement = false ) |
Perhaps branch folding, tail merging and other CFG optimizations on the given function.
Block placement changes the layout and may create new tail merging opportunities.
Definition at line 196 of file BranchFolding.cpp.
References llvm::getCodeGenOptions(), llvm::getEHScopeMembership(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineJumpTableInfo::RemoveJumpTable(), llvm::BitVector::set(), llvm::BitVector::size(), llvm::BitVector::test(), and llvm::valueOr().
Referenced by INITIALIZE_PASS_BEGIN().
|
inline |
Enable or disable the basic-block reordering sub-phase of branch optimization.
Enabled by default; targets sensitive to block layout (e.g. those with structured-CFG register allocation) can disable it.
Definition at line 53 of file BranchFolding.h.
References llvm::Enable.