This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Spill register and offset register cannot be same
AbandonedPublic

Authored by hsmhsm on Aug 11 2020, 12:01 PM.

Details

Summary

Mark spill register as used so we will not choose it as offset register,
Otherwise, spill register may possibly get killed even before spill

Diff Detail

Event Timeline

hsmhsm created this revision.Aug 11 2020, 12:01 PM
hsmhsm requested review of this revision.Aug 11 2020, 12:01 PM
foad edited reviewers, added: critson; removed: foad.Aug 11 2020, 12:26 PM
hsmhsm updated this revision to Diff 285306.Aug 13 2020, 3:17 AM

Added LLVM lit test

arsenm added inline comments.Aug 13 2020, 6:06 AM
llvm/test/CodeGen/AMDGPU/frame-pointer-spill.mir
5

Could use better name and comment what this is testing

7–46

You don't need most of these fields, probably just the stack related ones in machineFunctionInfo and tracksRegLiveness

47

Why do you need so many stack objects? Can you just add one artificial object that's big enough to force the huge frame?

hsmhsm updated this revision to Diff 285369.Aug 13 2020, 7:39 AM

Fixed further review comments by Matt

hsmhsm updated this revision to Diff 285370.Aug 13 2020, 7:46 AM

Add a comment

hsmhsm added a comment.EditedAug 13 2020, 9:47 AM

Looks like this patch and the patch https://reviews.llvm.org/D85772 fix the same issue. Me and Austin discussed about it, and decided to go ahead with https://reviews.llvm.org/D85772 instead of this patch. So, I will close this patch once https://reviews.llvm.org/D85772 is merged.

Can this be abandoned now?

hsmhsm abandoned this revision.Aug 18 2020, 9:48 PM

The fix is already taken care in the patch https://reviews.llvm.org/D85772, hence, I am closing this patch.