[PATCH] D91419: ARM-Darwin: keep the frame register reserved even if not updated.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 06:10:18 PST 2020


t.p.northover created this revision.
Herald added subscribers: hiraditya, kristof.beyls, mcrosier.
Herald added a project: LLVM.
t.p.northover requested review of this revision.

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.


https://reviews.llvm.org/D91419

Files:
  llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
  llvm/lib/Target/ARM/ARMFrameLowering.cpp
  llvm/test/CodeGen/ARM/machine-outliner-thunk.ll
  llvm/test/CodeGen/ARM/r7-fixed-darwin.ll
  llvm/test/CodeGen/ARM/realign-adds-fp.ll
  llvm/test/CodeGen/Thumb/long.ll
  llvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91419.305114.patch
Type: text/x-patch
Size: 4867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201113/1abb3676/attachment.bin>


More information about the llvm-commits mailing list