LLVM 23.0.0git
llvm::BranchFolder Class Reference

#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.

Detailed Description

Definition at line 31 of file BranchFolding.h.

Constructor & Destructor Documentation

◆ BranchFolder()

BranchFolder::BranchFolder ( bool DefaultEnableTailMerge,
bool CommonHoist,
MBFIWrapper & FreqInfo,
const MachineBranchProbabilityInfo & ProbInfo,
ProfileSummaryInfo * PSI,
unsigned MinTailLength = 0 )
explicit

Member Function Documentation

◆ OptimizeFunction()

bool BranchFolder::OptimizeFunction ( MachineFunction & MF,
const TargetInstrInfo * tii,
const TargetRegisterInfo * tri,
MachineLoopInfo * mli = nullptr,
bool AfterPlacement = false )

◆ setBasicBlockReordering()

void llvm::BranchFolder::setBasicBlockReordering ( bool Enable)
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 52 of file BranchFolding.h.

References llvm::Enable.


The documentation for this class was generated from the following files: