[llvm-branch-commits] [llvm] [AMDGPU] Physical register tracking in GCN trackers. (PR #184275)

Dhruva Chakrabarti via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Mar 3 15:46:45 PST 2026


dhruvachak wrote:

> I really don't like how we're maintaining a parallel pressure tracking system. I also don't really understand how this is representing physical registers due to the lane masks

There are a couple of existing code segments that compute virtual RP by calling getRegPressure and compare against the stored virtual RP -- that's why I kept a separate GCNRegPressure for virtual and physical. Currently, physical RP is not factored into the above comparison.

The reason behind using llvm::LiveRegSet is staying close to RegPressureTracker in RegisterPressure.h which does use LaneMask for both virtual and physical registers. The goal was to stay close to the generic tracker and perhaps reuse existing APIs. But I see your point --- since I am using either all or none for physical register lane masks, there is really no benefit this way.

https://github.com/llvm/llvm-project/pull/184275


More information about the llvm-branch-commits mailing list