[PATCH] D71168: [AArch64] Save FP for leaf functions when disabling frame pointer elimination

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 11:46:50 PST 2019


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:247
   // Retain behavior of always omitting the FP for leaf functions when possible.
-  if (MFI.hasCalls() && MF.getTarget().Options.DisableFramePointerElim(MF))
     return true;
----------------
kamleshbhalui wrote:
> MFI.hasCalls() was returning here false, Even for function who has call inside. May be because it is called earlier,before generating Full frame Info .  It needs to be removed from here. I could that it is done.
Isn't TargetOptions::DisableFramePointerElim itself calling hasCalls()?  I guess we conservatively return true anyway if the frame info isn't computed yet, though, so probably doesn't matter.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71168/new/

https://reviews.llvm.org/D71168





More information about the llvm-commits mailing list