[llvm] r313200 - [ARM] Add more CPUs to host detection
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 13 14:48:00 PDT 2017
Author: efriedma
Date: Wed Sep 13 14:48:00 2017
New Revision: 313200
URL: http://llvm.org/viewvc/llvm-project?rev=313200&view=rev
Log:
[ARM] Add more CPUs to host detection
This returns "cortex-a73" for second-generation Kryo; not precisely
correct, but close enough.
Differential Revision: https://reviews.llvm.org/D37724
Modified:
llvm/trunk/lib/Support/Host.cpp
llvm/trunk/unittests/Support/Host.cpp
Modified: llvm/trunk/lib/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Host.cpp?rev=313200&r1=313199&r2=313200&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Host.cpp (original)
+++ llvm/trunk/lib/Support/Host.cpp Wed Sep 13 14:48:00 2017
@@ -208,6 +208,9 @@ StringRef sys::detail::getHostCPUNameFor
.Case("0x06f", "krait") // APQ8064
.Case("0x201", "kryo")
.Case("0x205", "kryo")
+ .Case("0x211", "kryo")
+ .Case("0x800", "cortex-a73")
+ .Case("0x801", "cortex-a73")
.Default("generic");
return "generic";
Modified: llvm/trunk/unittests/Support/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/Host.cpp?rev=313200&r1=313199&r2=313200&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/Host.cpp (original)
+++ llvm/trunk/unittests/Support/Host.cpp Wed Sep 13 14:48:00 2017
@@ -105,6 +105,12 @@ TEST(getLinuxHostCPUName, AArch64) {
EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x51\n"
"CPU part : 0x201"),
"kryo");
+ EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x51\n"
+ "CPU part : 0x800"),
+ "cortex-a73");
+ EXPECT_EQ(sys::detail::getHostCPUNameForARM("CPU implementer : 0x51\n"
+ "CPU part : 0x801"),
+ "cortex-a73");
// MSM8992/4 weirdness
StringRef MSM8992ProcCpuInfo = R"(
More information about the llvm-commits
mailing list