|
LLVM
4.0.0
|
#include <BranchFolding.h>
Classes | |
| class | MBFIWrapper |
| This class keeps track of branch frequencies of newly created blocks and tail-merged blocks. More... | |
Public Member Functions | |
| BranchFolder (bool defaultEnableTailMerge, bool CommonHoist, MBFIWrapper &MBFI, const MachineBranchProbabilityInfo &MBPI, unsigned MinCommonTailLength=0) | |
| bool | OptimizeFunction (MachineFunction &MF, const TargetInstrInfo *tii, const TargetRegisterInfo *tri, MachineModuleInfo *mmi, MachineLoopInfo *mli=nullptr, bool AfterPlacement=false) |
| OptimizeFunction - Perhaps branch folding, tail merging and other CFG optimizations on the given function. More... | |
Definition at line 28 of file BranchFolding.h.
|
explicit |
Definition at line 111 of file BranchFolding.cpp.
References llvm::cl::BOU_FALSE, llvm::cl::BOU_TRUE, llvm::cl::BOU_UNSET, FlagEnableTailMerge, and TailMergeSize.
| bool BranchFolder::OptimizeFunction | ( | MachineFunction & | MF, |
| const TargetInstrInfo * | tii, | ||
| const TargetRegisterInfo * | tri, | ||
| MachineModuleInfo * | mmi, | ||
| MachineLoopInfo * | mli = nullptr, |
||
| bool | AfterPlacement = false |
||
| ) |
OptimizeFunction - 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 150 of file BranchFolding.cpp.
References llvm::TargetInstrInfo::analyzeBranch(), llvm::MachineBasicBlock::CorrectExtraCFGEdges(), llvm::SmallVectorBase::empty(), llvm::getFuncletMembership(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineFunction::getRegInfo(), I, i, llvm::MachineRegisterInfo::invalidateLiveness(), MRI, llvm::MachineJumpTableInfo::RemoveJumpTable(), llvm::BitVector::set(), llvm::TargetRegisterInfo::trackLivenessAfterRegAlloc(), and llvm::MachineRegisterInfo::tracksLiveness().
Referenced by INITIALIZE_PASS().
1.8.6