This is an archive of the discontinued LLVM Phabricator instance.

[Clang][AArch64] Add TargetParser support for defining CPU aliases
ClosedPublic

Authored by SjoerdMeijer on Oct 24 2022, 8:41 AM.

Details

Summary

This adds AArch64 TargetParser support to define CPU aliases, and ports the definition of Grace over to that. This is following up on D136425.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Oct 24 2022, 8:41 AM
SjoerdMeijer requested review of this revision.Oct 24 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 24 2022, 8:41 AM
lenary added a subscriber: tmatheson.

Broadly good! Adding @tmatheson who is also looking at the targetparser code right now.

llvm/lib/Support/AArch64TargetParser.cpp
213

Why not resolve the alias before the loop on line 208? And then you won't need to have two copies of the loop of CPUNames.

SjoerdMeijer added inline comments.Oct 24 2022, 8:55 AM
llvm/lib/Support/AArch64TargetParser.cpp
213

Ah yeah, of course, much better and good suggestion. Will fix.

Addressed comments.

This revision is now accepted and ready to land.Oct 25 2022, 1:47 AM
This revision was landed with ongoing or failed builds.Oct 25 2022, 3:14 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2022, 3:14 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript