[clang] 17f3a92 - [PS5] Default to omit leaf frame pointer
Paul Robinson via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 10:35:22 PDT 2022
Author: Paul Robinson
Date: 2022-04-28T10:35:14-07:00
New Revision: 17f3a92ee5d5490e84cc81481b0947f6a9be3106
URL: https://github.com/llvm/llvm-project/commit/17f3a92ee5d5490e84cc81481b0947f6a9be3106
DIFF: https://github.com/llvm/llvm-project/commit/17f3a92ee5d5490e84cc81481b0947f6a9be3106.diff
LOG: [PS5] Default to omit leaf frame pointer
Added:
Modified:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/frame-pointer-elim.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 8c68473e56a7..05034ab15f40 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -634,7 +634,7 @@ getFramePointerKind(const ArgList &Args, const llvm::Triple &Triple) {
bool OmitLeafFP =
Args.hasFlag(options::OPT_momit_leaf_frame_pointer,
options::OPT_mno_omit_leaf_frame_pointer,
- Triple.isAArch64() || Triple.isPS4() || Triple.isVE());
+ Triple.isAArch64() || Triple.isPS() || Triple.isVE());
if (NoOmitFP || mustUseNonLeafFramePointerForTarget(Triple) ||
(!OmitFP && useFramePointerForTargetByDefault(Args, Triple))) {
if (OmitLeafFP)
diff --git a/clang/test/Driver/frame-pointer-elim.c b/clang/test/Driver/frame-pointer-elim.c
index beb14a9a671a..79cc0ee1b18b 100644
--- a/clang/test/Driver/frame-pointer-elim.c
+++ b/clang/test/Driver/frame-pointer-elim.c
@@ -90,7 +90,7 @@
// WARN-OMIT-LEAF-7S-NOT: warning: optimization flag '-momit-leaf-frame-pointer' is not supported for target 'armv7s'
// WARN-OMIT-LEAF-7S: "-mframe-pointer=non-leaf"
-// On AArch64, PS4, and VE, default to omitting the frame pointer on leaf
+// On AArch64, PS4, PS5, and VE, default to omitting the frame pointer on leaf
// functions
// RUN: %clang -### -target aarch64 -S %s 2>&1 | \
// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
@@ -98,6 +98,10 @@
// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
// RUN: %clang -### -target x86_64-scei-ps4 -S -O2 %s 2>&1 | \
// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
+// RUN: %clang -### -target x86_64-sie-ps5 -S %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
+// RUN: %clang -### -target x86_64-sie-ps5 -S -O2 %s 2>&1 | \
+// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
// RUN: %clang -### -target aarch64-apple-darwin -arch arm64_32 -S %s 2>&1 | \
// RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s
// RUN: %clang -### -target ve-unknown-linux-gnu -S %s 2>&1 | \
More information about the cfe-commits
mailing list