Skip to content

Commit 29fc49f

Browse files
authored
[HeterogeneousDWARF] Respect Has1024AddressableVGPRs in CFI (#4545)
Since #156765 ("[AMDGPU] Define 1024 VGPRs on gfx1250") we have been considering unaddressable VGPRs when determining which to mark as undefined in CFI. The net result was a combination of redundant and nonsense records being generated.
1 parent f1f7225 commit 29fc49f

15 files changed

+3
-69905
lines changed

llvm/lib/Target/AMDGPU/SIFrameLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,9 @@ void SIFrameLowering::emitPrologueEntryCFI(MachineBasicBlock &MBB,
11441144
};
11451145

11461146
// Emit CFI rules for caller saved Arch VGPRs which are clobbered
1147-
for_each(AMDGPU::VGPR_32RegClass.getRegisters(), ProcessReg);
1147+
unsigned NumArchVGPRs = ST.has1024AddressableVGPRs() ? 1024 : 256;
1148+
for_each(AMDGPU::VGPR_32RegClass.getRegisters().take_front(NumArchVGPRs),
1149+
ProcessReg);
11481150

11491151
// Emit CFI rules for caller saved Accum VGPRs which are clobbered
11501152
if (ST.hasMAIInsts()) {

llvm/test/CodeGen/AMDGPU/accvgpr-spill-scc-clobber.mir

Lines changed: 0 additions & 18432 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/av_spill_cross_bb_usage.mir

Lines changed: 0 additions & 768 deletions
Large diffs are not rendered by default.

llvm/test/CodeGen/AMDGPU/debug-frame.ll

Lines changed: 0 additions & 3072 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)