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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 00:08:47 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");
----------------
arsenm wrote:

Don't see why we would want this controllable by an attribute for migration purposes a flag is sufficient.

@cdevadas is also working on getting the proper allocator to handle the allocation of WWM registers 

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


More information about the llvm-commits mailing list