[PATCH] D86965: Do not emit "-tune-cpu generic" for PS4 platform
Douglas Yung via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 12:38:20 PDT 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb1f394862053: Do not emit "-tune-cpu generic" for PS4 platform (authored by dyung).
Changed prior to commit:
https://reviews.llvm.org/D86965?vs=289239&id=289253#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86965/new/
https://reviews.llvm.org/D86965
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/ps4-cpu-defaults.cpp
Index: clang/test/Driver/ps4-cpu-defaults.cpp
===================================================================
--- clang/test/Driver/ps4-cpu-defaults.cpp
+++ clang/test/Driver/ps4-cpu-defaults.cpp
@@ -1,6 +1,7 @@
// Check that on the PS4 we default to:
-// -target-cpu btver2 and no exceptions
+// -target-cpu btver2, no exceptions and not -tune-cpu generic
// RUN: %clang -target x86_64-scei-ps4 -c %s -### 2>&1 | FileCheck %s
// CHECK: "-target-cpu" "btver2"
// CHECK-NOT: exceptions
+// CHECK-NOT: "-tune-cpu"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2075,9 +2075,10 @@
// Handle -mtune.
- // Default to "generic" unless -march is present.
+ // Default to "generic" unless -march is present or targetting the PS4.
std::string TuneCPU;
- if (!Args.hasArg(clang::driver::options::OPT_march_EQ))
+ if (!Args.hasArg(clang::driver::options::OPT_march_EQ) &&
+ !getToolChain().getTriple().isPS4CPU())
TuneCPU = "generic";
// Override based on -mtune.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86965.289253.patch
Type: text/x-patch
Size: 1146 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200901/7db2ae56/attachment-0001.bin>
More information about the cfe-commits
mailing list