This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Remove unused feature flags from AArch64TargetInfo
ClosedPublic

Authored by tyb0807 on Feb 2 2022, 12:33 AM.

Details

Summary

This removes two feature flags from AArch64TargetInfo class:

  • HasHBC: this feature does not involve generating any IR intrinsics,

so clang does not need to know about whether it is set

  • HasCrypto: this feature is deprecated in favor of finer grained

features such as AES, SHA2, SHA3 and SM4

Diff Detail

Event Timeline

tyb0807 created this revision.Feb 2 2022, 12:33 AM
tyb0807 requested review of this revision.Feb 2 2022, 12:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2022, 12:33 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Just passing by, but I was wondering when I saw this patch.
Why you did not remove this also from lib/Driver/ToolChains/Arch/AArch64.cpp?
And the ones in llvm (AArch64.td, AArch64InstrInfo.td)?

TL;DR, I think these Has* flags have different meaning in different places of the code base.

IIUC, these Has* flags from clang/lib/Basic/Targets/AArch64.cpp are used to correctly set various macros from the processed command line options, notable ones from ACLE, whereas the Has* flags from lib/Driver/ToolChains/Arch/AArch64.cpp are used to set the target features CL options.

As for the ones in llvm, the original flags are from AArch64Subtarget flag, and they are used to describe the architecture features, used in various places in the back-end itself.

tyb0807 updated this revision to Diff 409796.Feb 17 2022, 2:31 PM

Remove reference to unused ACLE macro __ARM_FEATURE_CRYPTO

tyb0807 updated this revision to Diff 410418.EditedFeb 21 2022, 5:13 PM

Revert latest change, as it is likely that people still rely on __ARM_FEATURE_CRYPTO

This revision is now accepted and ready to land.Feb 22 2022, 2:20 AM
This revision was landed with ongoing or failed builds.Feb 22 2022, 8:14 AM
This revision was automatically updated to reflect the committed changes.