[PATCH] D115551: [AMDGPU] Do not reserve any VGPR for SGPR spills

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 30 00:21:28 PST 2021


kerbowa added a reviewer: ruiling.
kerbowa added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1321-1323
-  const bool WillHaveFP =
-      FrameInfo.hasCalls() && (HaveAnyCSRVGPR || MFI->VGPRReservedForSGPRSpill);
 
----------------
arsenm wrote:
> kerbowa wrote:
> > arsenm wrote:
> > > I don't see why you're changing this, this is still an issue?
> > With the change, we are being more conservative.
> But why, I don't see the connection to eliminating the reserved register
We would usually reserve a register so this check was essentially always true if the function had calls. I've updated the condition since we will have a FP if there are any CSR SGPR spills too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115551/new/

https://reviews.llvm.org/D115551



More information about the llvm-commits mailing list