[PATCH] D72454: [AIX] Enable frame pointer for AIX and add related test suite

Xiangling Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 16:32:55 PST 2020


Xiangling_L marked 8 inline comments as done.
Xiangling_L added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/Frames-alloca.ll:3
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PPC64-LINUX
+; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -frame-pointer=all | FileCheck %s -check-prefix=PPC32-LINUX
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -frame-pointer=all | FileCheck %s -check-prefix=PPC64-LINUX
----------------
cebowleratibm wrote:
> Xiangling_L wrote:
> > cebowleratibm wrote:
> > > Why did you drop the -NOFP from the prefix?  Is the output expected to be the same between default and -frame-pointer=all?
> > 1. Because `-frame-pointer=all` means `disable frame pointer optimization elimination`.  I kinda feel `NOFP` here is misleading. And also it's not consistent with other LINUX frame pointer tests naming convention.
> > 
> > 2. And yes, the output is expected to be same.
> I'm confused.  Because the llc default is opt enabled, I would expect frame pointer elimination to be enabled.
Yes, the frame pointer elimination is enabled. But `frame pointer elimination` really means that only when frame pointer is not totally necessary, llc can do optimization and eliminate the frame pointer. In this testcase, because we have variable length argument `n` for `alloca` instruction, the frame pointer becomes necessary and also an efficient way to calculate the original `SP` value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72454





More information about the llvm-commits mailing list