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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 09:33:47 PST 2017


arsenm 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;
+      }
----------------
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


https://reviews.llvm.org/D26005





More information about the llvm-commits mailing list