[PATCH] D93403: AMDGPU: Remove SGPRSpillVGPRDefinedSet hack

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 10:13:08 PST 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp:391
+  // Updated the reserved registers with any VGPRs added for SGPR spills.
+  if (NewReservedRegs)
+    MRI.freezeReservedRegs(MF);
----------------
scott.linder wrote:
> Why is this `bool` needed? It seems like freezing the reserved regs is idempotent anyway. If anything I'd expect to just see `assert(MRI.reservedRegsFrozen())` to ensure you aren't running before regalloc, but maybe that's redundant?
reservedRegsFrozen is too stupid, it just checks if there are any reserved regs. I actually think that it's a fairly broken concept we should remove, or at least make an explicit property.

This is also one of those cases that's actually fairly expensive given the number of register tuples we have (I would like to reframe this in terms of frozen reg units, but haven't gotten around do fixing that)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93403/new/

https://reviews.llvm.org/D93403



More information about the llvm-commits mailing list