================
@@ -335,12 +400,41 @@ class GCNRPTracker {
LaneBitmask getLastUsedLanes(Register Reg, SlotIndex Pos) const;
+ // Check if a register unit is live at a given slot index per LIS.
+ bool isUnitLiveAt(MCRegUnit Unit, SlotIndex SI) const;
+
+ // Check if any register unit of Reg is not currently live in PhysLiveRegs.
+ bool isAnyRegUnitNotLive(MCRegister Reg) const;
+
+ // Reconstruct physical register pressure from PhysLiveRegs.Regs.
+ GCNRegPressure constructPhysRegPressure() const;
+
+ // Check if Reg has any killed units at the given slot index.
+ bool checkRegKilled(MCRegister Reg, SlotIndex SI) const;
+
+ // Check if Reg has any killed units and erase them from PhysLiveRegs.
+ bool eraseKilledUnits(MCRegister Reg, SlotIndex SI);
+
+ // Erase all live units of Reg from PhysLiveRegs.
+ // Returns true if any unit was live (and thus erased).
+ bool eraseAllLiveUnits(MCRegister Reg);
+
+ // Insert units of Reg into PhysLiveRegs if not already live.
+ // Returns true if any unit was newly inserted.
+ bool insertIfNotLive(MCRegister Reg);
+
public:
+ // Enable physical register tracking only if both GCNTrackers and
+ // TrackPhysRegInTrackers are true.
+ void setPhysRegTracking();
+
// reset tracker and set live register set to the specified value.
void reset(const MachineRegisterInfo &MRInfo,
const LiveRegSet &VirtLiveRegsSet);
+
// live regs for the current state
const decltype(VirtLiveRegs) &getLiveRegs() const { return VirtLiveRegs; }
+ const decltype(VirtLiveRegs) &getVirtLiveRegs() const { return VirtLiveRegs;
}
----------------
macurtis-amd wrote:
Unused / unneeded?
https://github.com/llvm/llvm-project/pull/184275
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits