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

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 14:58:20 PST 2017

MatzeB added a comment.

In https://reviews.llvm.org/D40876#958683, @gberry wrote:

> One thing I noticed when looking at this: it seems fragile to me to have MachineFrameInfo::computeMaxCallFrameSize() and PEI::calculateFrameInfo() doing essentially the same calculation with duplicated code.
>  Would it make sense to add an assert to PEI::calculateFrameInfo that checks that the previously calculated MaxCallFrameSize isn't smaller than the one calculated later?

Indeed, that's why I added this to `calculateCallFrameInfo()` a while back:

  assert(!MFI.isMaxCallFrameSizeComputed() ||
         (MFI.getMaxCallFrameSize() == MaxCallFrameSize &&
          MFI.adjustsStack() == AdjustsStack));



More information about the llvm-commits mailing list