LLVM: llvm::LiveRegMatrix Class Reference (original) (raw)
#include "[llvm/CodeGen/LiveRegMatrix.h](LiveRegMatrix%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | InterferenceKind { IK_Free = 0 , IK_VirtReg, IK_RegUnit, IK_RegMask } |
| Public Member Functions | |
|---|---|
| LiveRegMatrix (LiveRegMatrix &&Other)=default | |
| void | init (MachineFunction &MF, LiveIntervals &LIS, VirtRegMap &VRM) |
| void | invalidateVirtRegs () |
| Invalidate cached interference queries after modifying virtual register live ranges. | |
| InterferenceKind | checkInterference (const LiveInterval &VirtReg, MCRegister PhysReg) |
| Check for interference before assigning VirtReg to PhysReg. | |
| bool | checkInterference (SlotIndex Start, SlotIndex End, MCRegister PhysReg) |
| Check for interference in the segment [Start, End) that may prevent assignment to PhysReg. | |
| LaneBitmask | checkInterferenceLanes (SlotIndex Start, SlotIndex End, MCRegister PhysReg) |
| Check for interference in the segment [Start, End) that may prevent assignment to PhysReg, like checkInterference. | |
| void | assign (const LiveInterval &VirtReg, MCRegister PhysReg) |
| Assign VirtReg to PhysReg. | |
| void | unassign (const LiveInterval &VirtReg) |
| Unassign VirtReg from its PhysReg. | |
| bool | isPhysRegUsed (MCRegister PhysReg) const |
| Returns true if the given PhysReg has any live intervals assigned. | |
| bool | checkRegMaskInterference (const LiveInterval &VirtReg, MCRegister PhysReg=MCRegister::NoRegister) |
| Check for regmask interference only. | |
| bool | checkRegUnitInterference (const LiveInterval &VirtReg, MCRegister PhysReg) |
| Check for regunit interference only. | |
| LiveIntervalUnion::Query & | query (const LiveRange &LR, MCRegUnit RegUnit) |
| Query a line of the assigned virtual register matrix directly. | |
| LiveIntervalUnion * | getLiveUnions () |
| Directly access the live interval unions per regunit. | |
| Register | getOneVReg (unsigned PhysReg) const |
Definition at line 40 of file LiveRegMatrix.h.
◆ InterferenceKind
| Enumerator | |
|---|---|
| IK_Free | No interference, go ahead and assign. |
| IK_VirtReg | Virtual register interference. There are interfering virtual registers assigned to PhysReg or its aliases. This interference could be resolved by unassigning those other virtual registers. |
| IK_RegUnit | Register unit interference. A fixed live range is in the way, typically argument registers for a call. This can't be resolved by unassigning other virtual registers. |
| IK_RegMask | RegMask interference. The live range is crossing an instruction with a regmask operand that doesn't preserve PhysReg. This typically means VirtReg is live across a call, and PhysReg isn't call-preserved. |
Definition at line 84 of file LiveRegMatrix.h.
| llvm::LiveRegMatrix::LiveRegMatrix ( LiveRegMatrix && Other) | default |
|---|
◆ assign()
◆ checkInterference() [1/2]
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.
Definition at line 194 of file LiveRegMatrix.cpp.
References llvm::LiveIntervalUnion::Query::checkInterference(), checkRegMaskInterference(), checkRegUnitInterference(), llvm::LiveRange::empty(), foreachUnit(), IK_Free, IK_RegMask, IK_RegUnit, IK_VirtReg, and query().
◆ checkInterference() [2/2]
◆ checkInterferenceLanes()
◆ checkRegMaskInterference()
◆ checkRegUnitInterference()
◆ getLiveUnions()
Directly access the live interval unions per regunit.
This returns an array indexed by the regunit number.
Definition at line 168 of file LiveRegMatrix.h.
◆ getOneVReg()
◆ init()
◆ invalidateVirtRegs()
| void llvm::LiveRegMatrix::invalidateVirtRegs ( ) | inline |
|---|
Invalidate cached interference queries after modifying virtual register live ranges.
Interference checks may return stale information unless caches are invalidated.
Definition at line 82 of file LiveRegMatrix.h.
Referenced by init().
◆ isPhysRegUsed()
Returns true if the given PhysReg has any live intervals assigned.
Definition at line 145 of file LiveRegMatrix.cpp.
◆ query()
◆ unassign()
◆ LiveRegMatrixAnalysis
◆ LiveRegMatrixWrapperLegacy
The documentation for this class was generated from the following files:
- include/llvm/CodeGen/LiveRegMatrix.h
- lib/CodeGen/LiveRegMatrix.cpp