This is an archive of the discontinued LLVM Phabricator instance.

[TargetParser] Split AArch64TargetParser from ARMTargetParser
ClosedPublic

Authored by tmatheson on Nov 13 2022, 11:11 PM.

Details

Summary

AArch64TargetParser reuses data structures and some data from ARMTargetParser,
which causes more problems than it solves. This change separates them.

Code which is common to ARM and AArch64 is moved to ARMTargetParserCommon
which both ARMTargetParser and AArch64TargetParser use.

Some of the information in AArch64TargetParser.def was unused or nonsensical
(CPU_ATTR, ARCH_ATTR, ARCH_FPU) because it reused data strutures from
ARMTargetParser where some of these make sense. These are removed.

Diff Detail

Event Timeline

tmatheson created this revision.Nov 13 2022, 11:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2022, 11:11 PM
tmatheson requested review of this revision.Nov 13 2022, 11:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 13 2022, 11:11 PM
lenary added inline comments.Nov 14 2022, 2:50 AM
llvm/include/llvm/Support/AArch64TargetParser.h
86–110

Does this still need to be templated, if the implementation is not shared between aarch64 and arm?

tmatheson marked an inline comment as done.Nov 14 2022, 3:26 AM
tmatheson added inline comments.
llvm/include/llvm/Support/AArch64TargetParser.h
86–110

It doesn't. I have some follow up patches to address stuff like this, but trying to keep this patch to just moving code around unchanged, as far as possible.

tmatheson marked an inline comment as done.Nov 14 2022, 6:54 AM
pratlucas accepted this revision.Nov 14 2022, 7:28 AM

LGTM, assuming the unnecessary templates are going to be removed on a follow up patch.

This revision is now accepted and ready to land.Nov 14 2022, 7:28 AM
lenary accepted this revision.Nov 14 2022, 8:46 AM