This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add pass to lower SGPR spills
ClosedPublic

Authored by arsenm on Jun 26 2019, 8:14 AM.

Details

Reviewers
rampitec
nhaehnle
Summary

This is split out from my patches to split register allocation into a
separate SGPR and VGPR phase, and has some parts that aren't yet used
(like maintaining LiveIntervals).

This simplifies making the frame pointer register callee saved. As it
is now, the code to determine callee saves needs to predict all the
possible SGPR spills and how many callee saved VGPRs are needed. By
handling this before PrologEpilogInserter, it's possible to just check
the spill objects that already exist.

Diff Detail

Event Timeline

arsenm created this revision.Jun 26 2019, 8:14 AM
nhaehnle accepted this revision.Jul 1 2019, 3:02 AM

One nit, apart from that LGTM.

lib/Target/AMDGPU/SILowerSGPRSpills.cpp
231

This appears to be unused.

This revision is now accepted and ready to land.Jul 1 2019, 3:02 AM
rampitec accepted this revision.Jul 3 2019, 2:42 PM

LGTM

arsenm closed this revision.Jul 3 2019, 4:33 PM
arsenm marked an inline comment as done.

r365095