class LiveRegMatrix
Declaration
class LiveRegMatrix : 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/include/llvm/CodeGen/LiveRegMatrix.h:40
Inherits from: MachineFunctionPass
Member Variables
- public static char ID
Method Overview
- public LiveRegMatrix()
- public void assign(llvm::LiveInterval & VirtReg, unsigned int PhysReg)
- public llvm::LiveRegMatrix::InterferenceKind checkInterference(llvm::LiveInterval & VirtReg, unsigned int PhysReg)
- public bool checkInterference(llvm::SlotIndex Start, llvm::SlotIndex End, unsigned int PhysReg)
- public bool checkRegMaskInterference(llvm::LiveInterval & VirtReg, unsigned int PhysReg = 0)
- public bool checkRegUnitInterference(llvm::LiveInterval & VirtReg, unsigned int PhysReg)
- public llvm::LiveIntervalUnion * getLiveUnions()
- public void invalidateVirtRegs()
- public bool isPhysRegUsed(unsigned int PhysReg) const
- public LiveIntervalUnion::Query & query(const llvm::LiveRange & LR, unsigned int RegUnit)
- public void unassign(llvm::LiveInterval & VirtReg)
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
¶LiveRegMatrix()
LiveRegMatrix()
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:68
¶void assign(llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
void assign(llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
Description
Assign VirtReg to PhysReg. This will mark VirtReg's live range as occupied in the LiveRegMatrix and update VirtRegMap. The live range is expected to be available in PhysReg.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:119
Parameters
- llvm::LiveInterval& VirtReg
- unsigned int PhysReg
¶llvm::LiveRegMatrix::InterferenceKind
checkInterference(llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
llvm::LiveRegMatrix::InterferenceKind
checkInterference(llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
Description
Check for interference before assigning VirtReg to PhysReg. If this function returns IK_Free, it is legal to assign(VirtReg, PhysReg). When there is more than one kind of interference, the InterferenceKind with the highest enum value is returned.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:107
Parameters
- llvm::LiveInterval& VirtReg
- unsigned int PhysReg
¶bool checkInterference(llvm::SlotIndex Start,
llvm::SlotIndex End,
unsigned int PhysReg)
bool checkInterference(llvm::SlotIndex Start,
llvm::SlotIndex End,
unsigned int PhysReg)
Description
Check for interference in the segment [Start, End) that may prevent assignment to PhysReg. If this function returns true, there is interference in the segment [Start, End) of some other interval already assigned to PhysReg. If this function returns false, PhysReg is free at the segment [Start, End).
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:114
Parameters
- llvm::SlotIndex Start
- llvm::SlotIndex End
- unsigned int PhysReg
¶bool checkRegMaskInterference(
llvm::LiveInterval& VirtReg,
unsigned int PhysReg = 0)
bool checkRegMaskInterference(
llvm::LiveInterval& VirtReg,
unsigned int PhysReg = 0)
Description
Check for regmask interference only. Return true if VirtReg crosses a regmask operand that clobbers PhysReg. If PhysReg is null, check if VirtReg crosses any regmask operands.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:139
Parameters
- llvm::LiveInterval& VirtReg
- unsigned int PhysReg = 0
¶bool checkRegUnitInterference(
llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
bool checkRegUnitInterference(
llvm::LiveInterval& VirtReg,
unsigned int PhysReg)
Description
Check for regunit interference only. Return true if VirtReg overlaps a fixed assignment of one of PhysRegs's register units.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:144
Parameters
- llvm::LiveInterval& VirtReg
- unsigned int PhysReg
¶llvm::LiveIntervalUnion* getLiveUnions()
llvm::LiveIntervalUnion* getLiveUnions()
Description
Directly access the live interval unions per regunit. This returns an array indexed by the regunit number.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:154
¶void invalidateVirtRegs()
void invalidateVirtRegs()
Description
Invalidate cached interference queries after modifying virtual register live ranges. Interference checks may return stale information unless caches are invalidated.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:81
¶bool isPhysRegUsed(unsigned int PhysReg) const
bool isPhysRegUsed(unsigned int PhysReg) const
Description
Returns true if the given \p PhysReg has any live intervals assigned.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:127
Parameters
- unsigned int PhysReg
¶LiveIntervalUnion::Query& query(
const llvm::LiveRange& LR,
unsigned int RegUnit)
LiveIntervalUnion::Query& query(
const llvm::LiveRange& LR,
unsigned int RegUnit)
Description
Query a line of the assigned virtual register matrix directly. Use MCRegUnitIterator to enumerate all regunits in the desired PhysReg. This returns a reference to an internal Query data structure that is only valid until the next query() call.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:150
Parameters
- const llvm::LiveRange& LR
- unsigned int RegUnit
¶void unassign(llvm::LiveInterval& VirtReg)
void unassign(llvm::LiveInterval& VirtReg)
Description
Unassign VirtReg from its PhysReg. Assuming that VirtReg was previously assigned to a PhysReg, this undoes the assignment and updates VirtRegMap accordingly.
Declared at: llvm/include/llvm/CodeGen/LiveRegMatrix.h:124
Parameters
- llvm::LiveInterval& VirtReg