[PATCH] D138532: [SPARC][clang] Enable frame pointer optimization by default
Brad Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 28 15:23:41 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG17d0a15478e9: [SPARC][clang] Enable frame pointer optimization by default (authored by koakuma, committed by brad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138532/new/
https://reviews.llvm.org/D138532
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/frame-pointer-elim.c
Index: clang/test/Driver/frame-pointer-elim.c
===================================================================
--- clang/test/Driver/frame-pointer-elim.c
+++ clang/test/Driver/frame-pointer-elim.c
@@ -112,6 +112,20 @@
// RUN: %clang -### -target powerpc64 -S -O1 %s 2>&1 | \
// RUN: FileCheck --check-prefix=KEEP-NONE %s
+// SPARC targets omit the frame pointer when optimizations are enabled.
+// RUN: %clang -### -target sparc -S %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-ALL %s
+// RUN: %clang -### -target sparc -S -O1 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-NONE %s
+// RUN: %clang -### -target sparcel -S %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-ALL %s
+// RUN: %clang -### -target sparcel -S -O1 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-NONE %s
+// RUN: %clang -### -target sparc64 -S %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-ALL %s
+// RUN: %clang -### -target sparc64 -S -O1 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-NONE %s
+
// For AAarch32 (A32, T32) linux targets, default omit frame pointer when
// optimizations are enabled.
// RUN: %clang -### -target arm-linux-gnueabihf- -marm -S %s 2>&1 | \
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -538,6 +538,9 @@
case llvm::Triple::ppc64le:
case llvm::Triple::riscv32:
case llvm::Triple::riscv64:
+ case llvm::Triple::sparc:
+ case llvm::Triple::sparcel:
+ case llvm::Triple::sparcv9:
case llvm::Triple::amdgcn:
case llvm::Triple::r600:
case llvm::Triple::csky:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138532.478398.patch
Type: text/x-patch
Size: 1680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221128/15ecedfa/attachment.bin>
More information about the cfe-commits
mailing list