[PATCH] D147158: [AMDGPU] Do not reserve 16-bit registers
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 06:56:52 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8bad806f298c: [AMDGPU] Do not reserve 16-bit registers (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147158/new/
https://reviews.llvm.org/D147158
Files:
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.td
Index: llvm/lib/Target/AMDGPU/SIRegisterInfo.td
===================================================================
--- llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+++ llvm/lib/Target/AMDGPU/SIRegisterInfo.td
@@ -774,7 +774,7 @@
SRC_PRIVATE_LIMIT_HI_LO16, SRC_POPS_EXITING_WAVE_ID_LO16, SRC_VCCZ_LO16,
SRC_EXECZ_LO16, SRC_SCC_LO16, EXEC_LO_LO16, EXEC_HI_LO16, M0_CLASS_LO16)> {
let Size = 16;
- let AllocationPriority = 0;
+ let isAllocatable = 0;
let BaseClassOrder = 16;
}
Index: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
@@ -607,14 +607,6 @@
reserveRegisterTuples(Reserved, Reg);
}
- for (auto Reg : AMDGPU::SReg_32RegClass) {
- Reserved.set(getSubReg(Reg, AMDGPU::hi16));
- Register Low = getSubReg(Reg, AMDGPU::lo16);
- // This is to prevent BB vcc liveness errors.
- if (!AMDGPU::SGPR_LO16RegClass.contains(Low))
- Reserved.set(Low);
- }
-
Register ScratchRSrcReg = MFI->getScratchRSrcReg();
if (ScratchRSrcReg != AMDGPU::NoRegister) {
// Reserve 4 SGPRs for the scratch buffer resource descriptor in case we
@@ -650,10 +642,6 @@
unsigned MaxNumAGPRs = MaxNumVGPRs;
unsigned TotalNumVGPRs = AMDGPU::VGPR_32RegClass.getNumRegs();
- for (auto Reg : AMDGPU::AGPR_32RegClass) {
- Reserved.set(getSubReg(Reg, AMDGPU::hi16));
- }
-
// On GFX90A, the number of VGPRs and AGPRs need not be equal. Theoretically,
// a wave may have up to 512 total vector registers combining together both
// VGPRs and AGPRs. Hence, in an entry function without calls and without
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147158.510020.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230331/3a8470db/attachment.bin>
More information about the llvm-commits
mailing list