[PATCH] D80828: [Clang][A32/T32][Linux] -O2 implies -fomit-frame-pointer

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 16:57:33 PDT 2020


nickdesaulniers added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:560
     // Don't use a frame pointer on linux if optimizing for certain targets.
+    case llvm::Triple::arm:
+    case llvm::Triple::armeb:
----------------
srhines wrote:
> For the new targets, we should only be changing the default for non-Android cases. Android targets should still default to `-fno-omit-frame-pointer`. This makes the logic here quite a bit more complex.
It shouldn't be too bad, just need these four cases to check `Triple.getEnvironment() != llvm::Triple::Android` before calling `areOptimizationsEnabled`. Will double up the unit tests though, which is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80828





More information about the llvm-commits mailing list