[PATCH] D42448: [AMDGPU] Make sure all super regs of reserved regs are marked reserved.

Geoff Berry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 15:12:49 PST 2018


gberry created this revision.
gberry added reviewers: arsenm, tstellar, MatzeB, qcolombet.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

Move reserveRegisterTuples into AMDGPURegisterInfo and use it in
R600RegisterInfo::getReservedRegs and
R600InstrInfo::reserveIndirectRegisters to ensure that all super
registers of reserved registers are also marked as reserved.

Before this change, under certain circumstances, the registers %t1_x and
%t1_xyzw would be marked as reserved, but %t1_xy and %t1_xyz would not
be, leading to the register allocator sometimes assigning a register to
%t1_xy, which is invalid since %t1_x is reserved.


Repository:
  rL LLVM

https://reviews.llvm.org/D42448

Files:
  lib/Target/AMDGPU/AMDGPURegisterInfo.cpp
  lib/Target/AMDGPU/AMDGPURegisterInfo.h
  lib/Target/AMDGPU/R600InstrInfo.cpp
  lib/Target/AMDGPU/R600InstrInfo.h
  lib/Target/AMDGPU/R600RegisterInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42448.131157.patch
Type: text/x-patch
Size: 5695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180123/b445aa9d/attachment.bin>


More information about the llvm-commits mailing list