[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
Fri Feb 10 09:25:25 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;
+      }
----------------
Should we remember the failure somehow? Otherwise, we will retry the allocation later on for the same FI.


================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.h:200
+private:
+  // VGPR->SGPR spilling support.
+
----------------
Should be SGPR->VGPR.


https://reviews.llvm.org/D26005





More information about the llvm-commits mailing list