This is an archive of the discontinued LLVM Phabricator instance.

[ARM][AArch64] De-template TargetParser types
ClosedPublic

Authored by tmatheson on Nov 15 2022, 2:29 AM.

Diff Detail

Event Timeline

tmatheson created this revision.Nov 15 2022, 2:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2022, 2:29 AM
tmatheson requested review of this revision.Nov 15 2022, 2:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2022, 2:29 AM
pratlucas added inline comments.Nov 15 2022, 2:34 AM
llvm/lib/Support/ARMTargetParser.cpp
486

Nit: use const auto & here instead.

Some comments. The namespace one is more important than the plural-ness comments.

llvm/include/llvm/Support/AArch64TargetParser.h
86

is this in a different namespace to the arm version of this struct?

also, why does this class have a plural name? It doesn't represent a list, it represents an entry in a list? is this something we can fix now?

135

I think this also needs to be in a namespace so it doesn't collide with the ARM variant?

I have similar issues with the pluralness of this class name.

tschuett added inline comments.
llvm/include/llvm/Support/AArch64TargetParser.h
25

There is an AArch64 and an ARM namespace.

lenary added a comment.EditedNov 15 2022, 10:04 AM

Well, usually I can read, but not today.

tmatheson marked an inline comment as done.Nov 15 2022, 10:14 AM
tmatheson added inline comments.
llvm/include/llvm/Support/AArch64TargetParser.h
25

Assuming this is in reply to @lenary, let me know if not.

86

Yes it's llvm::AArch64::ArchNames.

I didn't name it so I don't know, it was copied verbatim from ARMTargetParser. Outside the scope of this patch...

135

It's llvm::AArch64::CpuNames.

tmatheson marked an inline comment as done.

Use auto for loop

tmatheson marked an inline comment as done.Nov 16 2022, 10:57 AM
lenary accepted this revision.Nov 16 2022, 12:01 PM
This revision is now accepted and ready to land.Nov 16 2022, 12:01 PM
This revision was automatically updated to reflect the committed changes.