[PATCH] D123525: [AMDGPU] On gfx908, reserve VGPR for AGPR copy based on register budget.

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 09:55:06 PDT 2022


hsmhsm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1279
+      FuncInfo->setVGPRForAGPRCopy(UnusedLowVGPR);
+      MRI.freezeReservedRegs(MF);
+    }
----------------
rampitec wrote:
> Do we have to freeze it here?
Actually, here we need to update the set of reserved registers so that it will unreserve the earlier reserved register, and reserve new one. The only way to achieve it is by calling  freezeReservedRegs(). We already do it in SILowerSGPRSpills.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123525



More information about the llvm-commits mailing list