LLVM API Documentation
#include <BranchFolding.h>
Classes | |
class | MBFIWrapper |
This class keeps track of branch frequencies of newly created blocks and tail-merged blocks. | |
class | MergePotentialsElt |
class | SameTailElt |
Public Member Functions | |
BranchFolder (bool defaultEnableTailMerge, bool CommonHoist, const MachineBlockFrequencyInfo &MBFI, const MachineBranchProbabilityInfo &MBPI) | |
bool | OptimizeFunction (MachineFunction &MF, const TargetInstrInfo *tii, const TargetRegisterInfo *tri, MachineModuleInfo *mmi) |
Definition at line 27 of file BranchFolding.h.
BranchFolder::BranchFolder | ( | bool | defaultEnableTailMerge, |
bool | CommonHoist, | ||
const MachineBlockFrequencyInfo & | MBFI, | ||
const MachineBranchProbabilityInfo & | MBPI | ||
) | [explicit] |
Definition at line 107 of file BranchFolding.cpp.
References llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, and FlagEnableTailMerge.
bool BranchFolder::OptimizeFunction | ( | MachineFunction & | MF, |
const TargetInstrInfo * | tii, | ||
const TargetRegisterInfo * | tri, | ||
MachineModuleInfo * | mmi | ||
) |
OptimizeFunction - Perhaps branch folding, tail merging and other CFG optimizations on the given function.
Definition at line 189 of file BranchFolding.cpp.
References llvm::TargetInstrInfo::AnalyzeBranch(), llvm::MachineFunction::begin(), llvm::SmallPtrSetImplBase::clear(), llvm::MachineBasicBlock::CorrectExtraCFGEdges(), llvm::SmallVectorBase::empty(), llvm::MachineFunction::end(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineRegisterInfo::invalidateLiveness(), llvm::MachineOperand::isJTI(), llvm::MachineJumpTableInfo::RemoveJumpTable(), llvm::TargetRegisterInfo::trackLivenessAfterRegAlloc(), and llvm::MachineRegisterInfo::tracksLiveness().
Referenced by INITIALIZE_PASS().