[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

llvm-svn: 313200
This commit is contained in:
Eli Friedman 2017-09-13 21:48:00 +00:00
parent a2a135a01c
commit bde9fc76dd
2 changed files with 9 additions and 0 deletions

View File

@ -208,6 +208,9 @@ StringRef sys::detail::getHostCPUNameForARM(
.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";

View File

@ -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"(