This is an archive of the discontinued LLVM Phabricator instance.

[NFC][AArch64] Document and improve FMV code.
ClosedPublic

Authored by ilinpv on Mar 7 2023, 6:59 PM.

Diff Detail

Event Timeline

ilinpv created this revision.Mar 7 2023, 6:59 PM
Herald added a project: Restricted Project. · View Herald Transcript
ilinpv requested review of this revision.Mar 7 2023, 6:59 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 7 2023, 6:59 PM

Generally seems reasonable to me, but I'll give others a chance to comment.

clang/lib/AST/ASTContext.cpp
13459
13529
clang/lib/Basic/Targets/AArch64.cpp
610–612

Good place for llvm::find_if rather than a manual loop?

617

Good place for llvm::find_if rather than a manual loop?

tmatheson accepted this revision.Mar 8 2023, 5:32 AM

LGTM, thanks for making these changes.

llvm/include/llvm/TargetParser/AArch64TargetParser.h
570–571

CPUFeatures has 60 entries, which means the return value here will overflow if we add a few more entries. We should probably have a static_assert(FEAT_MAX <= 64) in the implementation. Or should the CPUFeatures values actually be bitmasks, like ArchExtKind?

This revision is now accepted and ready to land.Mar 8 2023, 5:32 AM
ilinpv updated this revision to Diff 503446.Mar 8 2023, 11:01 AM

Rebasing and addressing comments.

ilinpv marked 5 inline comments as done.Mar 8 2023, 11:11 AM
ilinpv added inline comments.
llvm/include/llvm/TargetParser/AArch64TargetParser.h
570–571

static_assert added. I think changing values to masks could be done separately, it would be good to have if we eventually come to CPUFeatures and ArchExtKind unification.

This revision was automatically updated to reflect the committed changes.