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
- public BreakFalseDeps()
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public llvm::MachineFunctionProperties getRequiredProperties() const
- private bool pickBestRegisterForUndef(llvm::MachineInstr * MI, unsigned int OpIdx, unsigned int Pref)
- private void processBasicBlock(llvm::MachineBasicBlock * MBB)
- private void processDefs(llvm::MachineInstr * MI)
- private void processUndefReads(llvm::MachineBasicBlock *)
- public bool runOnMachineFunction(llvm::MachineFunction & MF)
- private bool shouldBreakDependence(llvm::MachineInstr *, unsigned int OpIdx, unsigned int Pref)
Inherited from MachineFunctionPass:
- public doInitialization
- protected getAnalysisUsage
- protected getClearedProperties
- protected getRequiredProperties
- protected getSetProperties
- protected runOnMachineFunction
Inherited from FunctionPass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnFunction
- protected skipFunction
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶BreakFalseDeps()
BreakFalseDeps()
Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:53
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
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::MachineFunctionProperties
getRequiredProperties() const
llvm::MachineFunctionProperties
getRequiredProperties() const
Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:65
¶bool pickBestRegisterForUndef(
llvm::MachineInstr* MI,
unsigned int OpIdx,
unsigned int Pref)
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)
void processBasicBlock(
llvm::MachineBasicBlock* MBB)
Description
Process he given basic block.
Declared at: llvm/lib/CodeGen/BreakFalseDeps.cpp:72
Parameters
¶void processDefs(llvm::MachineInstr* MI)
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
¶void processUndefReads(llvm::MachineBasicBlock*)
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
¶bool runOnMachineFunction(
llvm::MachineFunction& MF)
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
¶bool shouldBreakDependence(llvm::MachineInstr*,
unsigned int OpIdx,
unsigned int Pref)
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