r358775 - Enable frame pointer elimination for OpenBSD on powerpc.
Brad Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 19 11:41:41 PDT 2019
Author: brad
Date: Fri Apr 19 11:41:40 2019
New Revision: 358775
URL: http://llvm.org/viewvc/llvm-project?rev=358775&view=rev
Log:
Enable frame pointer elimination for OpenBSD on powerpc.
Modified:
cfe/trunk/lib/Driver/ToolChains/Clang.cpp
cfe/trunk/test/Driver/frame-pointer-elim.c
Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=358775&r1=358774&r2=358775&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Fri Apr 19 11:41:40 2019
@@ -538,6 +538,7 @@ static bool useFramePointerForTargetByDe
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);
Modified: cfe/trunk/test/Driver/frame-pointer-elim.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/frame-pointer-elim.c?rev=358775&r1=358774&r2=358775&view=diff
==============================================================================
--- cfe/trunk/test/Driver/frame-pointer-elim.c (original)
+++ cfe/trunk/test/Driver/frame-pointer-elim.c Fri Apr 19 11:41:40 2019
@@ -29,10 +29,14 @@
// 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
More information about the cfe-commits
mailing list