This is an archive of the discontinued LLVM Phabricator instance.

Implement host CPU detection for AArch64
ClosedPublic

Authored by kongyi on Apr 4 2017, 11:41 AM.

Details

Summary

This shares detection logic with ARM(32), since AArch64 capable CPUs may
also run in 32-bit system mode.

We observe weird /proc/cpuinfo output for MSM8992 and MSM8994, where
they report all CPU cores as one single model, depending on which CPU
core the kernel is running on. As a workaround, we hardcode the known
CPU part name for these SoCs.

For big.LITTLE systems, this patch would only return the part name of
the first core (usually the little core). Proper support will be added
in a follow-up change.

Diff Detail

Repository
rL LLVM

Event Timeline

kongyi created this revision.Apr 4 2017, 11:41 AM
t.p.northover accepted this revision.Apr 4 2017, 11:53 AM
t.p.northover added a subscriber: t.p.northover.

Looks reasonable to me, with one issue. Feel free to commit after fixing it.

lib/Support/Host.cpp
219–220 ↗(On Diff #94097)

I believe the Qualcomm CPU is "kryo".

This revision is now accepted and ready to land.Apr 4 2017, 11:53 AM
kongyi updated this revision to Diff 94099.Apr 4 2017, 12:03 PM
This revision was automatically updated to reflect the committed changes.