This is an archive of the discontinued LLVM Phabricator instance.

ARM-Darwin: keep the frame register reserved even if not updated.
Needs ReviewPublic

Authored by t.p.northover on Nov 13 2020, 6:10 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Darwin platforms need the frame register to always point at a valid record even if it's not updated in a leaf function. Backtraces are more important than one extra GPR.

The basic change is a patch from way back that caused assertion failures and was reverted. I think I've tracked all of those down to r7 being more available to allow stack realignment, which changes whether hasFP returns true at an unexpected point in a function. The shuffling in ARMFrameLowering is designed to counteract that and ensure a consistent frame-pointer in that case.

Diff Detail

Event Timeline

t.p.northover created this revision.Nov 13 2020, 6:10 AM
t.p.northover requested review of this revision.Nov 13 2020, 6:10 AM