LLVM  10.0.0svn
Classes | Public Member Functions | List of all members
llvm::BranchFolder Class Reference

#include "CodeGen/BranchFolding.h"


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 &FreqInfo, const MachineBranchProbabilityInfo &ProbInfo, unsigned MinTailLength=0)
bool OptimizeFunction (MachineFunction &MF, const TargetInstrInfo *tii, const TargetRegisterInfo *tri, MachineModuleInfo *mmi, MachineLoopInfo *mli=nullptr, bool AfterPlacement=false)
 Perhaps branch folding, tail merging and other CFG optimizations on the given function. More...

Detailed Description

Definition at line 34 of file BranchFolding.h.

Constructor & Destructor Documentation

◆ BranchFolder()

BranchFolder::BranchFolder ( bool  defaultEnableTailMerge,
bool  CommonHoist,
MBFIWrapper FreqInfo,
const MachineBranchProbabilityInfo ProbInfo,
unsigned  MinTailLength = 0 

Member Function Documentation

◆ OptimizeFunction()

bool BranchFolder::OptimizeFunction ( MachineFunction MF,
const TargetInstrInfo tii,
const TargetRegisterInfo tri,
MachineModuleInfo mmi,
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 llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::invalidateLiveness(), llvm::TargetRegisterInfo::trackLivenessAfterRegAlloc(), and llvm::MachineRegisterInfo::tracksLiveness().

Referenced by INITIALIZE_PASS().

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