-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AArch64][TargetParser] move CPUInfo into tablegen [NFC] #92145
[AArch64][TargetParser] move CPUInfo into tablegen [NFC] #92145
Conversation
@llvm/pr-subscribers-backend-aarch64 Author: Tomas Matheson (tmatheson-arm) ChangesThis builds on top of #92037, which moves the architecture information. The new changes start at 52b8af6. The changes to
Patch is 62.32 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/92145.diff 4 Files Affected:
diff --git a/llvm/include/llvm/TargetParser/AArch64TargetParser.h b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
index 20c3f95173c28..2402f02ab99c1 100644
--- a/llvm/include/llvm/TargetParser/AArch64TargetParser.h
+++ b/llvm/include/llvm/TargetParser/AArch64TargetParser.h
@@ -238,8 +238,8 @@ enum ArchProfile { AProfile = 'A', RProfile = 'R', InvalidProfile = '?' };
struct ArchInfo {
VersionTuple Version; // Architecture version, major + minor.
ArchProfile Profile; // Architecuture profile
- StringRef Name; // Human readable name, e.g. "armv8.1-a"
- StringRef ArchFeature; // Command line feature flag, e.g. +v8a
+ StringRef Name; // Name as supplied to -march e.g. "armv8.1-a"
+ StringRef ArchFeature; // Name as supplied to -target-feature, e.g. "+v8a"
AArch64::ExtensionBitset
DefaultExts; // bitfield of default extensions ArchExtKind
@@ -288,48 +288,8 @@ struct ArchInfo {
static std::optional<ArchInfo> findBySubArch(StringRef SubArch);
};
-// clang-format off
-inline constexpr ArchInfo ARMV8A = { VersionTuple{8, 0}, AProfile, "armv8-a", "+v8a", (
- AArch64::ExtensionBitset({AArch64::AEK_FP, AArch64::AEK_SIMD})), };
-inline constexpr ArchInfo ARMV8_1A = { VersionTuple{8, 1}, AProfile, "armv8.1-a", "+v8.1a", (ARMV8A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_CRC, AArch64::AEK_LSE, AArch64::AEK_RDM}))};
-inline constexpr ArchInfo ARMV8_2A = { VersionTuple{8, 2}, AProfile, "armv8.2-a", "+v8.2a", (ARMV8_1A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_RAS}))};
-inline constexpr ArchInfo ARMV8_3A = { VersionTuple{8, 3}, AProfile, "armv8.3-a", "+v8.3a", (ARMV8_2A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_FCMA, AArch64::AEK_JSCVT, AArch64::AEK_PAUTH, AArch64::AEK_RCPC}))};
-inline constexpr ArchInfo ARMV8_4A = { VersionTuple{8, 4}, AProfile, "armv8.4-a", "+v8.4a", (ARMV8_3A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_DOTPROD}))};
-inline constexpr ArchInfo ARMV8_5A = { VersionTuple{8, 5}, AProfile, "armv8.5-a", "+v8.5a", (ARMV8_4A.DefaultExts)};
-inline constexpr ArchInfo ARMV8_6A = { VersionTuple{8, 6}, AProfile, "armv8.6-a", "+v8.6a", (ARMV8_5A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_BF16, AArch64::AEK_I8MM}))};
-inline constexpr ArchInfo ARMV8_7A = { VersionTuple{8, 7}, AProfile, "armv8.7-a", "+v8.7a", (ARMV8_6A.DefaultExts)};
-inline constexpr ArchInfo ARMV8_8A = { VersionTuple{8, 8}, AProfile, "armv8.8-a", "+v8.8a", (ARMV8_7A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_MOPS, AArch64::AEK_HBC}))};
-inline constexpr ArchInfo ARMV8_9A = { VersionTuple{8, 9}, AProfile, "armv8.9-a", "+v8.9a", (ARMV8_8A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_SPECRES2, AArch64::AEK_CSSC, AArch64::AEK_RASV2}))};
-inline constexpr ArchInfo ARMV9A = { VersionTuple{9, 0}, AProfile, "armv9-a", "+v9a", (ARMV8_5A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_FP16, AArch64::AEK_SVE, AArch64::AEK_SVE2}))};
-inline constexpr ArchInfo ARMV9_1A = { VersionTuple{9, 1}, AProfile, "armv9.1-a", "+v9.1a", (ARMV9A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_BF16, AArch64::AEK_I8MM}))};
-inline constexpr ArchInfo ARMV9_2A = { VersionTuple{9, 2}, AProfile, "armv9.2-a", "+v9.2a", (ARMV9_1A.DefaultExts)};
-inline constexpr ArchInfo ARMV9_3A = { VersionTuple{9, 3}, AProfile, "armv9.3-a", "+v9.3a", (ARMV9_2A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_MOPS, AArch64::AEK_HBC}))};
-inline constexpr ArchInfo ARMV9_4A = { VersionTuple{9, 4}, AProfile, "armv9.4-a", "+v9.4a", (ARMV9_3A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_SPECRES2, AArch64::AEK_CSSC, AArch64::AEK_RASV2}))};
-inline constexpr ArchInfo ARMV9_5A = { VersionTuple{9, 5}, AProfile, "armv9.5-a", "+v9.5a", (ARMV9_4A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_CPA}))};
-// For v8-R, we do not enable crypto and align with GCC that enables a more minimal set of optional architecture extensions.
-inline constexpr ArchInfo ARMV8R = { VersionTuple{8, 0}, RProfile, "armv8-r", "+v8r", (ARMV8_5A.DefaultExts |
- AArch64::ExtensionBitset({AArch64::AEK_SSBS,
- AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_SB}).flip(AArch64::AEK_LSE))};
-// clang-format on
-
-// The set of all architectures
-static constexpr std::array<const ArchInfo *, 17> ArchInfos = {
- &ARMV8A, &ARMV8_1A, &ARMV8_2A, &ARMV8_3A, &ARMV8_4A, &ARMV8_5A,
- &ARMV8_6A, &ARMV8_7A, &ARMV8_8A, &ARMV8_9A, &ARMV9A, &ARMV9_1A,
- &ARMV9_2A, &ARMV9_3A, &ARMV9_4A, &ARMV9_5A, &ARMV8R,
-};
+#define EMIT_ARCHITECTURES
+#include "llvm/TargetParser/AArch64TargetParserDef.inc"
// Details of a specific CPU.
struct CpuInfo {
@@ -347,323 +307,8 @@ struct CpuInfo {
}
};
-inline constexpr CpuInfo CpuInfos[] = {
- {"cortex-a34", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a35", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a53", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a55", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC})},
- {"cortex-a510", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_BF16, AArch64::AEK_I8MM, AArch64::AEK_SB,
- AArch64::AEK_PAUTH, AArch64::AEK_MTE, AArch64::AEK_SSBS,
- AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML})},
- {"cortex-a520", ARMV9_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
- AArch64::AEK_FP16FML, AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON, AArch64::AEK_PREDRES})},
- {"cortex-a520ae", ARMV9_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
- AArch64::AEK_FP16FML, AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON, AArch64::AEK_PREDRES})},
- {"cortex-a57", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a65", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS})},
- {"cortex-a65ae", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS})},
- {"cortex-a72", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a73", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"cortex-a75", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC})},
- {"cortex-a76", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS})},
- {"cortex-a76ae", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS})},
- {"cortex-a77", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_RCPC,
- AArch64::AEK_DOTPROD, AArch64::AEK_SSBS})},
- {"cortex-a78", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PROFILE})},
- {"cortex-a78ae", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PROFILE})},
- {"cortex-a78c", ARMV8_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
- AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PROFILE, AArch64::AEK_FLAGM, AArch64::AEK_PAUTH})},
- {"cortex-a710", ARMV9A,
- AArch64::ExtensionBitset({AArch64::AEK_MTE, AArch64::AEK_PAUTH,
- AArch64::AEK_FLAGM, AArch64::AEK_SB,
- AArch64::AEK_I8MM, AArch64::AEK_FP16FML,
- AArch64::AEK_SVE, AArch64::AEK_SVE2,
- AArch64::AEK_SVE2BITPERM, AArch64::AEK_BF16})},
- {"cortex-a715", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_MTE,
- AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_PAUTH,
- AArch64::AEK_I8MM, AArch64::AEK_PREDRES, AArch64::AEK_PERFMON,
- AArch64::AEK_PROFILE, AArch64::AEK_SVE, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_BF16, AArch64::AEK_FLAGM})},
- {"cortex-a720", ARMV9_2A,
- AArch64::ExtensionBitset({AArch64::AEK_SB, AArch64::AEK_SSBS,
- AArch64::AEK_MTE, AArch64::AEK_FP16FML,
- AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
- AArch64::AEK_PREDRES, AArch64::AEK_PROFILE})},
- {"cortex-a720ae", ARMV9_2A,
- AArch64::ExtensionBitset({AArch64::AEK_SB, AArch64::AEK_SSBS,
- AArch64::AEK_MTE, AArch64::AEK_FP16FML,
- AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
- AArch64::AEK_PREDRES, AArch64::AEK_PROFILE})},
- {"cortex-r82", ARMV8R,
- AArch64::ExtensionBitset({AArch64::AEK_LSE, AArch64::AEK_FLAGM,
- AArch64::AEK_PERFMON, AArch64::AEK_PREDRES})},
- {"cortex-r82ae", ARMV8R,
- AArch64::ExtensionBitset({AArch64::AEK_LSE, AArch64::AEK_FLAGM,
- AArch64::AEK_PERFMON, AArch64::AEK_PREDRES})},
- {"cortex-x1", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_FP16, AArch64::AEK_DOTPROD,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PROFILE})},
- {"cortex-x1c", ARMV8_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16,
- AArch64::AEK_DOTPROD, AArch64::AEK_RCPC, AArch64::AEK_SSBS,
- AArch64::AEK_PAUTH, AArch64::AEK_PROFILE, AArch64::AEK_FLAGM})},
- {"cortex-x2", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_MTE, AArch64::AEK_BF16, AArch64::AEK_I8MM,
- AArch64::AEK_PAUTH, AArch64::AEK_SSBS, AArch64::AEK_SB,
- AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML, AArch64::AEK_FLAGM})},
- {"cortex-x3", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_SVE, AArch64::AEK_PERFMON, AArch64::AEK_PROFILE,
- AArch64::AEK_BF16, AArch64::AEK_I8MM, AArch64::AEK_MTE,
- AArch64::AEK_SVE2BITPERM, AArch64::AEK_SB, AArch64::AEK_PAUTH,
- AArch64::AEK_FP16, AArch64::AEK_FP16FML, AArch64::AEK_PREDRES,
- AArch64::AEK_FLAGM, AArch64::AEK_SSBS})},
- {"cortex-x4", ARMV9_2A,
- AArch64::ExtensionBitset({AArch64::AEK_SB, AArch64::AEK_SSBS,
- AArch64::AEK_MTE, AArch64::AEK_FP16FML,
- AArch64::AEK_PAUTH, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
- AArch64::AEK_PREDRES, AArch64::AEK_PROFILE})},
- {"neoverse-e1", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
- AArch64::AEK_RCPC, AArch64::AEK_SSBS})},
- {"neoverse-n1", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
- AArch64::AEK_PROFILE, AArch64::AEK_RCPC,
- AArch64::AEK_SSBS})},
- {"neoverse-n2", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_BF16, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML, AArch64::AEK_I8MM, AArch64::AEK_MTE,
- AArch64::AEK_SB, AArch64::AEK_SSBS, AArch64::AEK_SVE,
- AArch64::AEK_SVE2, AArch64::AEK_SVE2BITPERM})},
- {"neoverse-n3", ARMV9_2A,
- AArch64::ExtensionBitset({AArch64::AEK_MTE, AArch64::AEK_SSBS,
- AArch64::AEK_SB, AArch64::AEK_PREDRES,
- AArch64::AEK_FP16FML, AArch64::AEK_PAUTH,
- AArch64::AEK_FLAGM, AArch64::AEK_PERFMON,
- AArch64::AEK_RAND, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_PROFILE, AArch64::AEK_PERFMON})},
- {"neoverse-512tvb", ARMV8_4A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
- AArch64::AEK_SM4, AArch64::AEK_SVE, AArch64::AEK_SSBS,
- AArch64::AEK_FP16, AArch64::AEK_BF16, AArch64::AEK_DOTPROD,
- AArch64::AEK_PROFILE, AArch64::AEK_RAND, AArch64::AEK_FP16FML,
- AArch64::AEK_I8MM})},
- {"neoverse-v1", ARMV8_4A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3,
- AArch64::AEK_SM4, AArch64::AEK_SVE, AArch64::AEK_SSBS,
- AArch64::AEK_FP16, AArch64::AEK_BF16, AArch64::AEK_DOTPROD,
- AArch64::AEK_PROFILE, AArch64::AEK_RAND, AArch64::AEK_FP16FML,
- AArch64::AEK_I8MM})},
- {"neoverse-v2", ARMV9A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_SVE, AArch64::AEK_SVE2, AArch64::AEK_SSBS,
- AArch64::AEK_FP16, AArch64::AEK_BF16, AArch64::AEK_RAND,
- AArch64::AEK_DOTPROD, AArch64::AEK_PROFILE, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML, AArch64::AEK_I8MM, AArch64::AEK_MTE})},
- {"neoverse-v3", ARMV9_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_PROFILE, AArch64::AEK_MTE, AArch64::AEK_SSBS,
- AArch64::AEK_SB, AArch64::AEK_PREDRES, AArch64::AEK_LS64,
- AArch64::AEK_BRBE, AArch64::AEK_PAUTH, AArch64::AEK_FLAGM,
- AArch64::AEK_PERFMON, AArch64::AEK_RAND, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML})},
- {"neoverse-v3ae", ARMV9_2A,
- (AArch64::ExtensionBitset(
- {AArch64::AEK_PROFILE, AArch64::AEK_MTE, AArch64::AEK_SSBS,
- AArch64::AEK_SB, AArch64::AEK_PREDRES, AArch64::AEK_LS64,
- AArch64::AEK_BRBE, AArch64::AEK_PAUTH, AArch64::AEK_FLAGM,
- AArch64::AEK_PERFMON, AArch64::AEK_RAND, AArch64::AEK_SVE2BITPERM,
- AArch64::AEK_FP16FML}))},
- {"cyclone", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_NONE})},
- {"apple-a7", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_NONE})},
- {"apple-a8", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_NONE})},
- {"apple-a9", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_NONE})},
- {"apple-a10", ARMV8A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_CRC, AArch64::AEK_RDM})},
- {"apple-a11", ARMV8_2A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16})},
- {"apple-a12", ARMV8_3A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16})},
- {"apple-a13", ARMV8_4A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-a14", ARMV8_5A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-a15", ARMV8_6A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-a16", ARMV8_6A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-a17", ARMV8_6A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
-
- {"apple-m1", ARMV8_5A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-m2", ARMV8_6A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
- {"apple-m3", ARMV8_6A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_SHA3, AArch64::AEK_FP16,
- AArch64::AEK_FP16FML})},
-
- {"apple-s4", ARMV8_3A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16})},
- {"apple-s5", ARMV8_3A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_FP16})},
- {"exynos-m3", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"exynos-m4", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16})},
- {"exynos-m5", ARMV8_2A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_DOTPROD, AArch64::AEK_FP16})},
- {"falkor", ARMV8A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2,
- AArch64::AEK_CRC, AArch64::AEK_RDM})},
- {"saphira", ARMV8_3A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_PROFILE})},
- {"kryo", ARMV8A,
- AArch64::ExtensionBitset(
- {AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_CRC})},
- {"thunderx2t99", ARMV8_1A,
- AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2})},
- {"thunderx3t110", ARMV8...
[truncated]
|
Making generic a AArch64Processor caused two test failures: - aarch64-targetattr.c (minor fix) - aarch64-fmv-dependencies.c (all dependencies completely wrong)
This avoids the need to change a lot of TargetParserTest cases
Fold CPU default extensions into the list of SubtargetFeatures TargetParserTest fixes because Implies and DefaultExts are combined Now that they are combined, more things are accounted for in the targetparser, i.e. more extensions are listed as being enabled for the given CPUs. clang test fixes because Implies and DefaultExts are combined
Summary of the PR after the recent changes:
The |
The only thing this added over ProcModel was the Architecture field. Instead, search the list of Features to find the architecture for each processor. Since the "generic" processor does not have an Architecture, it needs special treatment in the emitter.
✅ With the latest revision this PR passed the C/C++ code formatter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, assuming it causes no regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This builds on top of #92037, which moves the architecture information. The new changes start at 52b8af6.
The changes to
AArch64Processors.td
look like a lot, but actually all that is happening for each processor is:ProcessorModel
toAArch64Processor
Architecture64
e.g.HasV9_0aOps