[PATCH] D29318: [AMDGPU] Move register related queries to subtarget class
    Matt Arsenault via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb  7 11:31:34 PST 2017
    
    
  
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:510
   MaxSGPR += ExtraSGPRs;
-  MaxVGPR += RI->getNumDebuggerReservedVGPRs(STM);
+  MaxVGPR += STM.getReservedNumVGPRs(MF);
 
----------------
Assign to variable and add that here? Should probably reorder this with the STM.debuggerEmitPrologue() part to keep all the register computations together
================
Comment at: lib/Target/AMDGPU/AMDGPUSubtarget.cpp:472-474
+  if (debuggerReserveRegs())
+    return 4;
+  return 0;
----------------
If you aren't planning on adding more you can do a return ternary operator in the header
https://reviews.llvm.org/D29318
    
    
More information about the llvm-commits
mailing list