This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Remove SGPRSpillVGPRDefinedSet hack
ClosedPublic

Authored by arsenm on Dec 16 2020, 8:42 AM.

Details

Summary

These VGPRs should be reserved and therefore do not need "correct"
liveness. They should not have undef uses, which can still cause
issues.

Diff Detail

Event Timeline

arsenm created this revision.Dec 16 2020, 8:42 AM
arsenm requested review of this revision.Dec 16 2020, 8:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2020, 8:42 AM
Herald added a subscriber: wdng. · View Herald Transcript
scott.linder added inline comments.Dec 16 2020, 9:48 AM
llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
391

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?

arsenm added inline comments.Dec 16 2020, 10:13 AM
llvm/lib/Target/AMDGPU/SILowerSGPRSpills.cpp
391

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)

rampitec accepted this revision.Dec 16 2020, 11:56 AM
This revision is now accepted and ready to land.Dec 16 2020, 11:56 AM