[PATCH] D40876: AArch64: Fix emergency spillslot being out of reach for large callframes

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 12:24:27 PST 2018


efriedma added a comment.

Potential alternative approach: could we allocate the emergency spill slot in the red zone?



================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:213
+  // DefaultSafeSPDisplacement is fine as we only emergency spill GP regs.
+  if (!MFI.isMaxCallFrameSizeComputed() ||
+      MFI.getMaxCallFrameSize() > DefaultSafeSPDisplacement)
----------------
isMaxCallFrameSizeComputed() is false until after register allocation, right?  That means register allocation will never allocate a value into the frame pointer register.  This needs better comments, and I'm not sure we want to unconditionally reserve the frame pointer register just to fix an obscure bug with very large call frames.


https://reviews.llvm.org/D40876





More information about the llvm-commits mailing list