]> granicus.if.org Git - clang/commitdiff
Enable frame pointer elimination for OpenBSD on powerpc.
authorBrad Smith <brad@comstyle.com>
Fri, 19 Apr 2019 18:41:40 +0000 (18:41 +0000)
committerBrad Smith <brad@comstyle.com>
Fri, 19 Apr 2019 18:41:40 +0000 (18:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358775 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Clang.cpp
test/Driver/frame-pointer-elim.c

index a7055b437d89ba3916ef0b9d96077cb677f6a169..cbaf5cbf9261a9b3eb4a00059a527fbf2d6530c8 100644 (file)
@@ -538,6 +538,7 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args,
     switch (Triple.getArch()) {
     case llvm::Triple::mips64:
     case llvm::Triple::mips64el:
+    case llvm::Triple::ppc:
     case llvm::Triple::x86:
     case llvm::Triple::x86_64:
       return !areOptimizationsEnabled(Args);
index b050f71611e7923152e0249830762271761534ea..32935178e078ad08ae22a410bed7de0e86964bdb 100644 (file)
 // OpenBSD follows the same rules as Linux.
 // RUN: %clang -### -target x86_64-unknown-openbsd -S -O1 %s 2>&1 | \
 // RUN:   FileCheck --check-prefix=OPENBSD-OPT %s
+// RUN: %clang -### -target powerpc-unknown-openbsd -S -O1 %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=OPENBSD-OPT %s
 // OPENBSD-OPT: "-momit-leaf-frame-pointer"
 
 // RUN: %clang -### -target x86_64-unknown-openbsd -S %s 2>&1 | \
 // RUN:   FileCheck --check-prefix=OPENBSD %s
+// RUN: %clang -### -target powerpc-unknown-openbsd -S %s 2>&1 | \
+// RUN:   FileCheck --check-prefix=OPENBSD %s
 // OPENBSD-NOT: "-momit-leaf-frame-pointer"
 
 // Darwin disables omitting the leaf frame pointer even under optimization