Page MenuHomePhabricator

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

Authored by stuij on Jan 13 2022, 1:48 AM.

Details

Summary

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

For more information, see:

The following people contributed to this patch:

  • Simon Tatham
  • Ties Stuij

Diff Detail

Event Timeline

stuij created this revision.Jan 13 2022, 1:48 AM
stuij requested review of this revision.Jan 13 2022, 1:48 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 13 2022, 1:48 AM
dmgreen added inline comments.
llvm/include/llvm/Support/AArch64TargetParser.def
205

Should this have the same features as the cortex-x1? AEK_DOTPROD and AEK_FP16 and the rest?

llvm/lib/Target/AArch64/AArch64.td
719

This can be the same as TuneX1. It might be worth using the same TuneX1 in both the cortex-x1 and cortex-x1c.

983

Should this have dotprod and RCPC?

The TRM isn't super clear on what features are present. Is FP16FML present?

stuij marked 2 inline comments as done.Jan 20 2022, 2:15 AM
stuij added inline comments.
llvm/include/llvm/Support/AArch64TargetParser.def
205

Yes, you're right. I've added these.

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

Right, the addition of FP16FML must have been copied from the X1, which was later removed when upstreaming. I removed it here, and I added dotard and RCPC. The only relevant change from X1 to X1C is the addition of PAUTH, as per the TRM.

stuij updated this revision to Diff 401569.Jan 20 2022, 2:29 AM
stuij marked an inline comment as done.

addressed review comments

Thanks for the update. Same(ish) questions for the Arm side. Otherwise this LGTM

llvm/include/llvm/Support/ARMTargetParser.def
332

Should this match the ARM::AEK_FP16 | ARM::AEK_DOTPROD from cortex-x1 too?

llvm/lib/Target/ARM/ARM.td
1446

Should this have ProcX1C added?

Oh, also is there an ID for this CPU that is worth adding to getHostCPUNameForARM in Host.cpp?

stuij marked 2 inline comments as done.Jan 21 2022, 4:09 AM

Thanks for the update. Same(ish) questions for the Arm side. Otherwise this LGTM

Ai, thanks. Should have checked Arm as well.

Oh, also is there an ID for this CPU that is worth adding to getHostCPUNameForARM in Host.cpp?

Yup, thanks. Added.

llvm/lib/Target/ARM/ARM.td
1446

yes :)

stuij updated this revision to Diff 401936.Jan 21 2022, 4:09 AM
stuij marked an inline comment as done.

addressed review comments

dmgreen accepted this revision.Jan 21 2022, 9:41 AM

Thanks. LGTM

This revision is now accepted and ready to land.Jan 21 2022, 9:41 AM
This revision was automatically updated to reflect the committed changes.