[PATCH] D26005: AMDGPU: Don't use stack space for SGPR->VGPR spills

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 05:14:33 PST 2017


nhaehnle added inline comments.


================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:219-225
+      if (LaneVGPR == AMDGPU::NoRegister) {
+        // We have no VGPRs left for spilling SGPRs. Reset because we won't
+        // partially spill the SGPR to VGPRs.
+        SGPRToVGPRSpills.erase(FI);
+        NumVGPRSpillLanes -= I;
+        return false;
+      }
----------------
arsenm wrote:
> nhaehnle wrote:
> > Should we remember the failure somehow? Otherwise, we will retry the allocation later on for the same FI.
> Maybe? I'm not sure it's worth the effort. The benefit would be maybe slightly improved compile time in the exceptional case for more complexity
Fair enough. I think the patch is fine, just that one SGPR -> VGPR comment.


https://reviews.llvm.org/D26005





More information about the llvm-commits mailing list