diff options
author | mortimer <mortimer@cvs.openbsd.org> | 2019-04-02 13:01:53 +0000 |
---|---|---|
committer | mortimer <mortimer@cvs.openbsd.org> | 2019-04-02 13:01:53 +0000 |
commit | f1f0006eafdf168b9788f6fc013baa076ec7e639 (patch) | |
tree | d974005a5143aa3b7f6def673ec9df0dd7b25866 /gnu | |
parent | 4ffddf460b7f59300e2724d2d85d1c8a9c1a234a (diff) |
Enable frame pointer elimination on i386, amd64 and mips64 when given
optimization flags.
ok kettenis@ visa@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp index 199b3dadfd7..d5495d63511 100644 --- a/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp +++ b/gnu/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp @@ -528,6 +528,18 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args, return !areOptimizationsEnabled(Args); } + if (Triple.getOS() == llvm::Triple::OpenBSD) { + switch (Triple.getArch()) { + case llvm::Triple::mips64: + case llvm::Triple::mips64el: + case llvm::Triple::x86: + case llvm::Triple::x86_64: + return !areOptimizationsEnabled(Args); + default: + return true; + } + } + if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI) { switch (Triple.getArch()) { // Don't use a frame pointer on linux if optimizing for certain targets. |