This is an archive of the discontinued LLVM Phabricator instance.

[PATCH] [ARM] Add Cortex-A78 and Cortex-X1 Support for Clang and LLVM
ClosedPublic

Authored by LukeGeeson on Jul 6 2020, 3:21 AM.

Details

Summary

This patch adds support for the Arm-v8 Cortex-A78 and Cortex-X1
processors for AArch64 and ARM.

In detail:

  • Adding cortex-a78 and cortex-x1 as cpu options for aarch64 and arm targets in clang
  • Adding Cortex-A78 and Cortex-X1 CPU names and ProcessorModels in llvm

details of the CPU can be found here:
https://www.arm.com/products/cortex-x

https://www.arm.com/products/silicon-ip-cpu/cortex-a/cortex-a78

The following people contributed to this patch:

  • Luke Geeson
  • Mikhail Maltsev

Diff Detail

Event Timeline

LukeGeeson created this revision.Jul 6 2020, 3:21 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 6 2020, 3:21 AM
miyuki added inline comments.Jul 6 2020, 3:50 AM
llvm/lib/Target/AArch64/AArch64Subtarget.h
74

I think the new CPUs should be grouped with other Cortex-A CPUs.

llvm/lib/Target/ARM/ARMSubtarget.h
80

Please keep the list sorted in alphabetical order.

LukeGeeson updated this revision to Diff 276383.Jul 8 2020, 5:05 AM
LukeGeeson marked 2 inline comments as done.

Addressed Mikhail's feedback: Sorted CPU lists accordingly

dmgreen added a subscriber: dmgreen.Jul 8 2020, 5:27 AM

I would expect this to be very similar to https://reviews.llvm.org/rG8bf99f1e6f0f9b426d6060361ea6d9d47c1868d1, but some parts seems to be missing. Can you make sure that everything is included and in a sensible order.

llvm/include/llvm/Support/AArch64TargetParser.def
131

This no longer has FP16?

AEK_RAS I believe should be included in ARMV8_2A,

llvm/include/llvm/Support/ARMTargetParser.def
305

All these can go in a better order, please. A78 can go next to A77. Same everywhere else.

llvm/lib/Target/AArch64/AArch64Subtarget.cpp
198

These can go with the other CortexAXX cpu's, which seem to set the same PrefFunctionLogAlignment. Same for the ARM equivalent.

LukeGeeson marked 3 inline comments as done.
  • Addresses dmgreens comments
    • reordered CPUs in the right places
    • added code/tests in all files that exist in the a77 patch

made minor adjustments including:

  • adding FeatureRCPC to the missing CPUs

Please let me know if there is anything else

  • Added FP16 to Cortex-X1 set of features
dmgreen added inline comments.Jul 10 2020, 6:48 AM
llvm/include/llvm/Support/AArch64TargetParser.def
135

AEK_RAS will be included in ARMV8_2A, I believe.

llvm/include/llvm/Support/ARMTargetParser.def
298

This one too I think.

  • removed RAS as it's in 8.2a
LukeGeeson marked an inline comment as done.
  • removed missed RAS
LukeGeeson marked an inline comment as done.Jul 10 2020, 7:23 AM
  • Added FP16 to ARM a78

removed FP16FML feature

dmgreen accepted this revision.Jul 10 2020, 9:29 AM

Thanks. LGTM

This revision is now accepted and ready to land.Jul 10 2020, 9:29 AM
This revision was automatically updated to reflect the committed changes.