This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add Cortex-A77 Support for Clang and LLVM
ClosedPublic

Authored by LukeGeeson on Jun 30 2020, 9:23 AM.

Details

Summary

This patch upstreams support for the Arm-v8 Cortex-A77
processor for AArch64 and ARM.

In detail:

  • Adding cortex-a77 as a cpu option for aarch64 and arm targets in clang
  • Cortex-A77 CPU name and ProcessorModel in llvm

details of the CPU can be found here:
https://www.arm.com/products/silicon-ip-cpu/cortex-a/cortex-a77

and a similar submission to GCC can be found here:
https://github.com/gcc-mirror/gcc/commit/e0664b7a63ed8305e9f8539309df7fb3eb13babe

The following people contributed to this patch:

  • Luke Geeson
  • Mikhail Maltsev

Diff Detail

Event Timeline

LukeGeeson created this revision.Jun 30 2020, 9:23 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 30 2020, 9:23 AM
dmgreen added a subscriber: dmgreen.

Please make sure the switch in AArch64Subtarget::initializeProperties has an entry too.

Do you happen to know the cpu id for host.cpp?

clang/test/Driver/aarch64-cpus.c
732

Can you move this test up to next to the other cpus.

llvm/include/llvm/Support/AArch64TargetParser.def
128

Format this line - it's getting a bit long. It also would be good to make it consistent with the lines above.

llvm/include/llvm/Support/ARMTargetParser.def
296

Little bit of extra whitespace

llvm/lib/Target/AArch64/AArch64.td
983

Please add a ProcA77 and sort this next to the A76

llvm/lib/Target/ARM/ARM.td
1228

Whitespace here. And Adding a ProcA77 for consistency?

Please make sure the switch in AArch64Subtarget::initializeProperties has an entry too.

Do you happen to know the cpu id for host.cpp?

do you mean the CPU part number used in e.g Host.cpp? then chasing the GCC link above points to 0xd0d which is also what is also in the TRM
https://developer.arm.com/documentation/101111/0101

LukeGeeson updated this revision to Diff 274791.Jul 1 2020, 6:57 AM
LukeGeeson marked 5 inline comments as done.
  • Added A77 CPU Part Number to Host.cpp
  • added case to AArch64Subtarget::initializeProperties
  • moved a77 test up in AArch64-cpu
  • formatted line for AArch64 Target Parser
  • removed whitespace in ARM Target Parser
  • refactored ProcessorModel + sorted next to A76
  • Added ProcA77

This should address everything David, please let me know if there is anything else

dmgreen accepted this revision.Jul 1 2020, 7:07 AM

Thanks. LGTM.

This revision is now accepted and ready to land.Jul 1 2020, 7:07 AM
This revision was automatically updated to reflect the committed changes.