[AArch64] Replace AEK_CRYPTO with relevant features in cpu definitions
authorDavid Green <david.green@arm.com>
Mon, 30 Jan 2023 16:05:25 +0000 (16:05 +0000)
committerDavid Green <david.green@arm.com>
Mon, 30 Jan 2023 16:05:25 +0000 (16:05 +0000)
commit8f6c623e874624c1f247f93bf457d5196a84cec6
tree7653a552b41f7031c2921f0524784b4710b6f0eb
parent1562e5149174b86c8f9d0b4d2ec0101fe67dddcb
[AArch64] Replace AEK_CRYPTO with relevant features in cpu definitions

This replaces AEK_CRYPTO in the AArch64TargetParser definitions,
replacing the composite Crypto features with the constituent parts.
AEK_CRYPTO is replaced with either AEK_AES | AEK_SHA2 or AEK_AES |
AEK_SHA2 | AEK_SHA3 | AEK_SHA4 depending on if the cpu is Arm-v8.4+.
This helps get the features correct in some more places like
target(cpu=..) attributes.

Otherwise this is hopefully an NFC for -mcpu options but seems like a
cleaner design.

Differential Revision: https://reviews.llvm.org/D142548
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/test/CodeGen/aarch64-targetattr.c
clang/test/Preprocessor/aarch64-target-features.c
llvm/include/llvm/TargetParser/AArch64TargetParser.h
llvm/unittests/TargetParser/TargetParserTest.cpp