[llvm] [AMDGPU] Add option to pre-allocate SGPR spill VGPRs (PR #70626)

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 01:12:03 PDT 2023


================
@@ -201,6 +205,10 @@ bool SIPreAllocateWWMRegs::runOnMachineFunction(MachineFunction &MF) {
 
   RegClassInfo.runOnMachineFunction(MF);
 
+  bool PreallocateSGPRSpillVGPRs =
+      EnablePreallocateSGPRSpillVGPRs ||
+      MF.getFunction().hasFnAttribute("amdgpu-prealloc-sgpr-spill-vgprs");
----------------
cdevadas wrote:

For shaders, I hope the SGPR spills are very limited and they won't require more VGPRs causing the 'ran out of allocatable registers' error.

https://github.com/llvm/llvm-project/pull/70626


More information about the llvm-commits mailing list