LLVM
15.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. More... | |
Definition at line 31 of file BranchFolding.h.
|
explicit |
Definition at line 136 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, | ||
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 177 of file BranchFolding.cpp.
References BB, llvm::numbers::e, llvm::getEHScopeMembership(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineFunction::getRegInfo(), i, I, llvm::MachineRegisterInfo::invalidateLiveness(), MRI, llvm::MachineJumpTableInfo::RemoveJumpTable(), llvm::BitVector::set(), llvm::BitVector::size(), llvm::BitVector::test(), llvm::TargetRegisterInfo::trackLivenessAfterRegAlloc(), and llvm::MachineRegisterInfo::tracksLiveness().
Referenced by INITIALIZE_PASS().