class BreakFalseDeps

Declaration

class BreakFalseDeps : public MachineFunctionPass { /* full declaration omitted */ };

Description

MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. Instead of overriding runOnFunction, subclasses override runOnMachineFunction.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:35

Inherits from: MachineFunctionPass

Member Variables

private llvm::MachineFunction* MF
private const llvm::TargetInstrInfo* TII
private const llvm::TargetRegisterInfo* TRI
private llvm::RegisterClassInfo RegClassInfo
private std::vector< std::pair<MachineInstr*, unsigned int>> UndefReads
List of undefined register reads in this block in forward order.
private llvm::LivePhysRegs LiveRegSet
Storage for register unit liveness.
private llvm::ReachingDefAnalysis* RDA
public static char ID

Method Overview

Inherited from MachineFunctionPass:

Inherited from FunctionPass:

Inherited from Pass:

Methods

BreakFalseDeps()

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:53

void getAnalysisUsage(
    llvm::AnalysisUsage& AU) const

Description

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:57

Parameters

llvm::AnalysisUsage& AU

llvm::MachineFunctionProperties
getRequiredProperties() const

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:65

bool pickBestRegisterForUndef(
    llvm::MachineInstr* MI,
    unsigned int OpIdx,
    unsigned int Pref)

Description

Helps avoid false dependencies on undef registers by updating the machine instructions' undef operand to use a register that the instruction is truly dependent on, or use a register with clearance higher than Pref. Returns true if it was able to find a true dependency, thus not requiring a dependency breaking instruction regardless of clearance.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:83

Parameters

llvm::MachineInstr* MI
unsigned int OpIdx
unsigned int Pref

void processBasicBlock(
    llvm::MachineBasicBlock* MBB)

Description

Process he given basic block.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:72

Parameters

llvm::MachineBasicBlock* MBB

void processDefs(llvm::MachineInstr* MI)

Description

Update def-ages for registers defined by MI. Also break dependencies on partial defs and undef uses.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:76

Parameters

llvm::MachineInstr* MI

void processUndefReads(llvm::MachineBasicBlock*)

Description

Break false dependencies on undefined register reads. Walk the block backward computing precise liveness. This is expensive, so we only do it on demand. Note that the occurrence of undefined register reads that should be broken is very rare, but when they occur we may have many in a single block.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:95

Parameters

llvm::MachineBasicBlock*

bool runOnMachineFunction(
    llvm::MachineFunction& MF)

Description

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:63

Parameters

llvm::MachineFunction& MF

bool shouldBreakDependence(llvm::MachineInstr*,
                           unsigned int OpIdx,
                           unsigned int Pref)

Description

Return true to if it makes sense to break dependence on a partial def or undef use.

Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:88

Parameters

llvm::MachineInstr*
unsigned int OpIdx
unsigned int Pref