Tracker for register pressure at a position in the instruction stream.
Declared in <llvm/CodeGen/RegisterPressure.h>
class RegPressureTracker;
Remembers the high water mark within the region traversed. This does not automatically consider live-through ranges. The client may independently adjust for global liveness.
Each RegPressureTracker only works within a MachineBasicBlock. Pressure can be tracked across a larger region by storing a RegisterPressure result at each block boundary and explicitly adjusting pressure to account for block live-in and live-out register sets.
RegPressureTracker holds a reference to a RegisterPressure result that it computes incrementally. During downward tracking, P.BottomIdx or P.BottomPos is invalid until it reaches the end of the block or closeRegion() is explicitly called. Similarly, P.TopIdx is invalid during upward tracking. Changing direction has the side effect of closing region, and traversing past TopIdx or BottomIdx reopens it.
| Name | Description |
|---|---|
RegPressureTracker [constructor] | Constructors |
addLiveRegs | Force the given registers to be live at the current position. |
advance | advance overloads |
closeBottom | Set the bottom boundary of the region and record live-out registers. |
closeRegion | Finalize the region boundaries and recored live ins and live outs. |
closeTop | Set the top boundary of the region and record live-in registers. |
decreaseRegPressure | Decrease current pressure when lanes of VRegOrUnit become dead. |
dump | Dump current and max register pressure to the debug stream. |
getDownwardPressure | Get the pressure of each PSet after traversing this instruction top-down. |
getLiveThru | Return the live-through pressure set values. |
getMaxDownwardPressureDelta | Compute the max downward pressure delta for MI. |
getMaxPressureDelta | Compute the max pressure delta for MI in the open tracking direction. |
getMaxUpwardPressureDelta | Compute the max upward pressure delta for MI. |
getPos | Get the MI position corresponding to this register pressure. |
getPressure | getPressure overloads |
getPressureAfterInst | Get the pressure of each PSet after traversing this instruction. |
getRegSetPressureAtPos | Get the register set pressure at the current position, which may be less than the pressure across the traversed region. |
getUpwardPressure | Get the pressure of each PSet after traversing this instruction bottom-up. |
getUpwardPressureDelta | Compute the upward pressure delta for MI from a cached pressure diff. |
hasUntiedDef | Return true if VirtReg has an untied definition in the tracked region. |
increaseRegPressure | Increase current and max pressure when VRegOrUnit becomes live. |
init | Initialize pressure tracking at pos in mbb. |
initLiveThru | initLiveThru overloads |
isBottomClosed | Return true if the bottom of the region has a valid position and live-outs. |
isTopClosed | Return true if the top of the region has a valid position and live-ins. |
recede | recede overloads |
recedeSkipDebugValues | Recede until we find an instruction which is not a DebugValue. |
reset | Reset the tracker so it can be initialized for another region. |
setPos | Reset the MI position corresponding to the register pressure. |
| Name | Description |
|---|---|
bumpDeadDefs | Temporarily boost pressure for dead defs as a group, then drop it. |
bumpDownwardPressure | Speculatively apply MI's downward pressure without discovering live-outs. |
bumpUpwardPressure | Speculatively apply MI's upward pressure without discovering live-ins. |
discoverLiveIn | Add Reg to the live in set and increase max pressure. |
discoverLiveInOrOut | Add Pair to LiveInOrOut and increase max pressure for new lanes. |
discoverLiveOut | Add Reg to the live out set and increase max pressure. |
getCurrSlot | Get the SlotIndex for the first nondebug instruction including or after the current position. |
getLastUsedLanes | Return lanes of VRegOrUnit last used at Pos. |
getLiveLanesAt | Return lanes of VRegOrUnit that are live at Pos. |
getLiveThroughAt | Return lanes of VRegOrUnit that live through the instruction at Pos. |