[PATCH] D56353: Replace cc1 options '-mdisable-fp-elim' and '-momit-leaf-frame-pointer' with '-mframe-pointer'
Yuanfang Chen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 15:24:16 PDT 2019
ychen marked an inline comment as done and an inline comment as not done.
ychen added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:845
+ if (Args.hasArg(OPT_pg))
+ Opts.setFramePointer(CodeGenOptions::FP_All);
+
----------------
MaskRay wrote:
> I guess this can be deleted now.
>
> `-pg` + FramePointerKind::None is rejected by the driver.
>
> ```
> if (Arg *A = Args.getLastArg(options::OPT_pg))
> if (FPKeepKind == FramePointerKind::None)
> D.Diag(diag::err_drv_argument_not_allowed_with) << "-fomit-frame-pointer"
> << A->getAsString(Args);
> ```
This is still needed for `clang/test/CodeGen/x86_64-profiling-keep-fp.c` to pass.
We could have another patch to address this and update the test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56353/new/
https://reviews.llvm.org/D56353
More information about the cfe-commits
mailing list