class BranchFolder

Declaration

class BranchFolder { /* full declaration omitted */ };

Declared at: llvm/lib/CodeGen/BranchFolding.h:35

Method Overview

  • public BranchFolder(bool defaultEnableTailMerge, bool CommonHoist, llvm::BranchFolder::MBFIWrapper & FreqInfo, const llvm::MachineBranchProbabilityInfo & ProbInfo, llvm::ProfileSummaryInfo * PSI, unsigned int MinTailLength = 0)
  • public bool OptimizeFunction(llvm::MachineFunction & MF, const llvm::TargetInstrInfo * tii, const llvm::TargetRegisterInfo * tri, llvm::MachineModuleInfo * mmi, llvm::MachineLoopInfo * mli = nullptr, bool AfterPlacement = false)

Methods

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

Declared at: llvm/lib/CodeGen/BranchFolding.h:39

Parameters

bool defaultEnableTailMerge
bool CommonHoist
llvm::BranchFolder::MBFIWrapper& FreqInfo
const llvm::MachineBranchProbabilityInfo& ProbInfo
llvm::ProfileSummaryInfo* PSI
unsigned int MinTailLength = 0

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

Description

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.

Declared at: llvm/lib/CodeGen/BranchFolding.h:51

Parameters

llvm::MachineFunction& MF
const llvm::TargetInstrInfo* tii
const llvm::TargetRegisterInfo* tri
llvm::MachineModuleInfo* mmi
llvm::MachineLoopInfo* mli = nullptr
bool AfterPlacement = false