This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Remove the dead spill slots while spilling FP/BP to memory
ClosedPublic

Authored by RamNalamothu on Sep 2 2020, 8:23 AM.

Details

Summary

During the PEI pass, the dead TargetStackID::SGPRSpill spill slots
are not being removed while spilling the FP/BP to memory.

Fixes: SWDEV-250393

Diff Detail

Event Timeline

RamNalamothu created this revision.Sep 2 2020, 8:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2020, 8:23 AM
RamNalamothu requested review of this revision.Sep 2 2020, 8:23 AM

Update a relevant test in 'callee-frame-setup.ll' for validating the patch.

arsenm added inline comments.Sep 2 2020, 10:40 AM
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
126

Single quotes around \n

llvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
466

Why start hardcoding this?

Address review comments.

Ah, wrong changset was committed in the previous update.

RamNalamothu added inline comments.Sep 2 2020, 1:54 PM
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
126

Done.

llvm/test/CodeGen/AMDGPU/callee-frame-setup.ll
466

To ensure we are getting correct/expected stack offset here after the removal of dead spill slots.

arsenm accepted this revision.Sep 4 2020, 6:47 AM
This revision is now accepted and ready to land.Sep 4 2020, 6:47 AM
This revision was landed with ongoing or failed builds.Sep 5 2020, 6:35 PM
This revision was automatically updated to reflect the committed changes.