[PATCH] D96336: [AMDGPU] Save VGPR of whole wave when spilling

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 09:05:36 PST 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:1433
+    // lanes of the chosen VGPR. Pick v0 because it doesn't make a difference.
+    Register TmpVGPR = AMDGPU::VGPR0;
     RS->setRegUsed(TmpVGPR);
----------------
sebastian-ne wrote:
> foad wrote:
> > If the scavenger finds a vgpr that it thinks is dead, would that mean we only have to save the inactive lanes?
> Yes, we can do that.
> 
> If you don’t mind, I’ll put that in a later patch. I’m currently preparing a patch on top of this one to get rid of the code duplication here.
> That should also allow to get rid of the temporary RegScavenger below.
> If you don’t mind, I’ll put that in a later patch.

Sure. I was just checking my understanding.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96336



More information about the llvm-commits mailing list