chandlerc requested changes to this revision. chandlerc added inline comments. This revision now requires changes to proceed.
================ Comment at: lib/CodeGen/CGCall.cpp:1739 FuncAttrs.addAttribute("no-frame-pointer-elim", "true"); - FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf"); } ---------------- This seems like an unrelated change? ================ Comment at: lib/Driver/ToolChains/Clang.cpp:592-595 + if (Arg *A = Args.getLastArg(options::OPT_fno_omit_frame_pointer, + options::OPT_fomit_frame_pointer)) + return A->getOption().matches(options::OPT_fno_omit_frame_pointer) || + mustUseFramePointerForTarget(Triple); ---------------- This doesn't correctly handle "last-flag-wins". Consider the case of `-mno-omit-leaf-frame-pointer -fomit-frame-pointer`. That should omit the leaf frame pointer, but if I read this correctly the logic here will use a leaf frame pointer. ================ Comment at: test/Driver/frame-pointer-elim.c:92 + +// RUN: %clang -### -S -Os -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer %s 2>&1 | \ +// RUN: FileCheck --check-prefix=NO-OMIT-ALL2 %s ---------------- As indicated above, you need a test of the reverse order as well. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55915/new/ https://reviews.llvm.org/D55915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits