================
@@ -176,12 +176,24 @@ AMDGPUResourceUsageAnalysisImpl::analyzeResourceUsage(
     Info.NumAGPR = TRI.getNumUsedPhysRegs(MRI, AMDGPU::AGPR_32RegClass,
                                           /*IncludeCalls=*/false);
 
+  // Reserved "VGPR as memory" file registers aren't "used" but must still be
+  // allocated, so the VGPR count has to cover the highest one.
----------------
rovka wrote:

Do we really need to? If they're used anywhere in the callgraph the usage will 
be propagated, and if they're not really used, why allocate them? (Does TRI 
exclude reserved registers or something?)

https://github.com/llvm/llvm-project/pull/205435
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to