aarch64: remove CPU features that are actually just CPUs

This commit is contained in:
Andrew Kelley 2020-01-20 22:49:26 -05:00
parent 6e88883edf
commit 6dd514ac8a
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -2,14 +2,6 @@ const std = @import("../std.zig");
const Cpu = std.Target.Cpu;
pub const Feature = enum {
a35,
a53,
a55,
a57,
a72,
a73,
a75,
a76,
aes,
aggressive_fma,
alternate_sextload_cvt_f32_pattern,
@ -35,16 +27,10 @@ pub const Feature = enum {
crc,
crypto,
custom_cheap_as_move,
cyclone,
disable_latency_sched_heuristic,
dit,
dotprod,
exynos_cheap_as_move,
exynosm1,
exynosm2,
exynosm3,
exynosm4,
falkor,
fmi,
force_32bit_jump_tables,
fp_armv8,
@ -58,7 +44,6 @@ pub const Feature = enum {
fuse_csel,
fuse_literals,
jsconv,
kryo,
lor,
lse,
lsl_fast,
@ -103,7 +88,6 @@ pub const Feature = enum {
reserve_x6,
reserve_x7,
reserve_x9,
saphira,
sb,
sel2,
sha2,
@ -122,17 +106,11 @@ pub const Feature = enum {
sve2_bitperm,
sve2_sha3,
sve2_sm4,
thunderx,
thunderx2t99,
thunderxt81,
thunderxt83,
thunderxt88,
tlb_rmi,
tpidr_el1,
tpidr_el2,
tpidr_el3,
tracev8_4,
tsv110,
uaops,
use_aa,
use_postra_scheduler,
@ -156,134 +134,6 @@ pub const all_features = blk: {
const len = @typeInfo(Feature).Enum.fields.len;
std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits);
var result: [len]Cpu.Feature = undefined;
result[@enumToInt(Feature.a35)] = .{
.index = @enumToInt(Feature.a35),
.name = @tagName(Feature.a35),
.llvm_name = "a35",
.description = "Cortex-A35 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
}),
};
result[@enumToInt(Feature.a53)] = .{
.index = @enumToInt(Feature.a53),
.name = @tagName(Feature.a53),
.llvm_name = "a53",
.description = "Cortex-A53 ARM processors",
.dependencies = featureSet(&[_]Feature{
.balance_fp_ops,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
.use_aa,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.a55)] = .{
.index = @enumToInt(Feature.a55),
.name = @tagName(Feature.a55),
.llvm_name = "a55",
.description = "Cortex-A55 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.rcpc,
.v8_2a,
}),
};
result[@enumToInt(Feature.a57)] = .{
.index = @enumToInt(Feature.a57),
.name = @tagName(Feature.a57),
.llvm_name = "a57",
.description = "Cortex-A57 ARM processors",
.dependencies = featureSet(&[_]Feature{
.balance_fp_ops,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.fuse_aes,
.fuse_literals,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.a72)] = .{
.index = @enumToInt(Feature.a72),
.name = @tagName(Feature.a72),
.llvm_name = "a72",
.description = "Cortex-A72 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
}),
};
result[@enumToInt(Feature.a73)] = .{
.index = @enumToInt(Feature.a73),
.name = @tagName(Feature.a73),
.llvm_name = "a73",
.description = "Cortex-A73 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
}),
};
result[@enumToInt(Feature.a75)] = .{
.index = @enumToInt(Feature.a75),
.name = @tagName(Feature.a75),
.llvm_name = "a75",
.description = "Cortex-A75 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.rcpc,
.v8_2a,
}),
};
result[@enumToInt(Feature.a76)] = .{
.index = @enumToInt(Feature.a76),
.name = @tagName(Feature.a76),
.llvm_name = "a76",
.description = "Cortex-A76 ARM processors",
.dependencies = featureSet(&[_]Feature{
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.neon,
.rcpc,
.ssbs,
.v8_2a,
}),
};
result[@enumToInt(Feature.aes)] = .{
.index = @enumToInt(Feature.aes),
.name = @tagName(Feature.aes),
@ -467,27 +317,6 @@ pub const all_features = blk: {
.description = "Use custom handling of cheap instructions",
.dependencies = 0,
};
result[@enumToInt(Feature.cyclone)] = .{
.index = @enumToInt(Feature.cyclone),
.name = @tagName(Feature.cyclone),
.llvm_name = "cyclone",
.description = "Cyclone",
.dependencies = featureSet(&[_]Feature{
.alternate_sextload_cvt_f32_pattern,
.arith_bcc_fusion,
.arith_cbz_fusion,
.crypto,
.disable_latency_sched_heuristic,
.fp_armv8,
.fuse_aes,
.fuse_crypto_eor,
.neon,
.perfmon,
.zcm,
.zcz,
.zcz_fp_workaround,
}),
};
result[@enumToInt(Feature.disable_latency_sched_heuristic)] = .{
.index = @enumToInt(Feature.disable_latency_sched_heuristic),
.name = @tagName(Feature.disable_latency_sched_heuristic),
@ -518,109 +347,6 @@ pub const all_features = blk: {
.custom_cheap_as_move,
}),
};
result[@enumToInt(Feature.exynosm1)] = .{
.index = @enumToInt(Feature.exynosm1),
.name = @tagName(Feature.exynosm1),
.llvm_name = "exynosm1",
.description = "Samsung Exynos-M1 processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_aes,
.perfmon,
.slow_misaligned_128store,
.slow_paired_128,
.use_postra_scheduler,
.use_reciprocal_square_root,
.zcz_fp,
}),
};
result[@enumToInt(Feature.exynosm2)] = .{
.index = @enumToInt(Feature.exynosm2),
.name = @tagName(Feature.exynosm2),
.llvm_name = "exynosm2",
.description = "Samsung Exynos-M2 processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_aes,
.perfmon,
.slow_misaligned_128store,
.slow_paired_128,
.use_postra_scheduler,
.zcz_fp,
}),
};
result[@enumToInt(Feature.exynosm3)] = .{
.index = @enumToInt(Feature.exynosm3),
.name = @tagName(Feature.exynosm3),
.llvm_name = "exynosm3",
.description = "Samsung Exynos-M3 processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_address,
.fuse_aes,
.fuse_csel,
.fuse_literals,
.lsl_fast,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
.zcz_fp,
}),
};
result[@enumToInt(Feature.exynosm4)] = .{
.index = @enumToInt(Feature.exynosm4),
.name = @tagName(Feature.exynosm4),
.llvm_name = "exynosm4",
.description = "Samsung Exynos-M4 processors",
.dependencies = featureSet(&[_]Feature{
.arith_bcc_fusion,
.arith_cbz_fusion,
.crypto,
.dotprod,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fullfp16,
.fuse_address,
.fuse_aes,
.fuse_arith_logic,
.fuse_csel,
.fuse_literals,
.lsl_fast,
.perfmon,
.use_postra_scheduler,
.v8_2a,
.zcz,
}),
};
result[@enumToInt(Feature.falkor)] = .{
.index = @enumToInt(Feature.falkor),
.name = @tagName(Feature.falkor),
.llvm_name = "falkor",
.description = "Qualcomm Falkor processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.rdm,
.slow_strqro_store,
.use_postra_scheduler,
.zcz,
}),
};
result[@enumToInt(Feature.fmi)] = .{
.index = @enumToInt(Feature.fmi),
.name = @tagName(Feature.fmi),
@ -718,24 +444,6 @@ pub const all_features = blk: {
.fp_armv8,
}),
};
result[@enumToInt(Feature.kryo)] = .{
.index = @enumToInt(Feature.kryo),
.name = @tagName(Feature.kryo),
.llvm_name = "kryo",
.description = "Qualcomm Kryo processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
.zcz,
}),
};
result[@enumToInt(Feature.lor)] = .{
.index = @enumToInt(Feature.lor),
.name = @tagName(Feature.lor),
@ -1052,25 +760,6 @@ pub const all_features = blk: {
.description = "Reserve X9, making it unavailable as a GPR",
.dependencies = 0,
};
result[@enumToInt(Feature.saphira)] = .{
.index = @enumToInt(Feature.saphira),
.name = @tagName(Feature.saphira),
.llvm_name = "saphira",
.description = "Qualcomm Saphira processors",
.dependencies = featureSet(&[_]Feature{
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.spe,
.use_postra_scheduler,
.v8_4a,
.zcz,
}),
};
result[@enumToInt(Feature.sb)] = .{
.index = @enumToInt(Feature.sb),
.name = @tagName(Feature.sb),
@ -1217,84 +906,6 @@ pub const all_features = blk: {
.sve2,
}),
};
result[@enumToInt(Feature.thunderx)] = .{
.index = @enumToInt(Feature.thunderx),
.name = @tagName(Feature.thunderx),
.llvm_name = "thunderx",
.description = "Cavium ThunderX processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.thunderx2t99)] = .{
.index = @enumToInt(Feature.thunderx2t99),
.name = @tagName(Feature.thunderx2t99),
.llvm_name = "thunderx2t99",
.description = "Cavium ThunderX2 processors",
.dependencies = featureSet(&[_]Feature{
.aggressive_fma,
.arith_bcc_fusion,
.crc,
.crypto,
.fp_armv8,
.lse,
.neon,
.predictable_select_expensive,
.use_postra_scheduler,
.v8_1a,
}),
};
result[@enumToInt(Feature.thunderxt81)] = .{
.index = @enumToInt(Feature.thunderxt81),
.name = @tagName(Feature.thunderxt81),
.llvm_name = "thunderxt81",
.description = "Cavium ThunderX processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.thunderxt83)] = .{
.index = @enumToInt(Feature.thunderxt83),
.name = @tagName(Feature.thunderxt83),
.llvm_name = "thunderxt83",
.description = "Cavium ThunderX processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.thunderxt88)] = .{
.index = @enumToInt(Feature.thunderxt88),
.name = @tagName(Feature.thunderxt88),
.llvm_name = "thunderxt88",
.description = "Cavium ThunderX processors",
.dependencies = featureSet(&[_]Feature{
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
result[@enumToInt(Feature.tlb_rmi)] = .{
.index = @enumToInt(Feature.tlb_rmi),
.name = @tagName(Feature.tlb_rmi),
@ -1330,26 +941,6 @@ pub const all_features = blk: {
.description = "Enable v8.4-A Trace extension",
.dependencies = 0,
};
result[@enumToInt(Feature.tsv110)] = .{
.index = @enumToInt(Feature.tsv110),
.name = @tagName(Feature.tsv110),
.llvm_name = "tsv110",
.description = "HiSilicon TS-V110 processors",
.dependencies = featureSet(&[_]Feature{
.crypto,
.custom_cheap_as_move,
.dotprod,
.fp_armv8,
.fp16fml,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.spe,
.use_postra_scheduler,
.v8_2a,
}),
};
result[@enumToInt(Feature.uaops)] = .{
.index = @enumToInt(Feature.uaops),
.name = @tagName(Feature.uaops),
@ -1505,123 +1096,265 @@ pub const all_features = blk: {
};
pub const cpu = struct {
pub const apple_latest = Cpu{
.name = "apple_latest",
.llvm_name = "apple-latest",
.features = featureSet(&[_]Feature{
.cyclone,
}),
};
pub const cortex_a35 = Cpu{
.name = "cortex_a35",
.llvm_name = "cortex-a35",
.features = featureSet(&[_]Feature{
.a35,
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
}),
};
pub const cortex_a53 = Cpu{
.name = "cortex_a53",
.llvm_name = "cortex-a53",
.features = featureSet(&[_]Feature{
.a53,
.balance_fp_ops,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
.use_aa,
.use_postra_scheduler,
}),
};
pub const cortex_a55 = Cpu{
.name = "cortex_a55",
.llvm_name = "cortex-a55",
.features = featureSet(&[_]Feature{
.a55,
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.rcpc,
.v8_2a,
}),
};
pub const cortex_a57 = Cpu{
.name = "cortex_a57",
.llvm_name = "cortex-a57",
.features = featureSet(&[_]Feature{
.a57,
.balance_fp_ops,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.fuse_aes,
.fuse_literals,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
pub const cortex_a72 = Cpu{
.name = "cortex_a72",
.llvm_name = "cortex-a72",
.features = featureSet(&[_]Feature{
.a72,
.crc,
.crypto,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
}),
};
pub const cortex_a73 = Cpu{
.name = "cortex_a73",
.llvm_name = "cortex-a73",
.features = featureSet(&[_]Feature{
.a73,
.crc,
.crypto,
.fp_armv8,
.fuse_aes,
.neon,
.perfmon,
}),
};
pub const cortex_a75 = Cpu{
.name = "cortex_a75",
.llvm_name = "cortex-a75",
.features = featureSet(&[_]Feature{
.a75,
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.rcpc,
.v8_2a,
}),
};
pub const cortex_a76 = Cpu{
.name = "cortex_a76",
.llvm_name = "cortex-a76",
.features = featureSet(&[_]Feature{
.a76,
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.neon,
.rcpc,
.ssbs,
.v8_2a,
}),
};
pub const cortex_a76ae = Cpu{
.name = "cortex_a76ae",
.llvm_name = "cortex-a76ae",
.features = featureSet(&[_]Feature{
.a76,
.crypto,
.dotprod,
.fp_armv8,
.fullfp16,
.neon,
.rcpc,
.ssbs,
.v8_2a,
}),
};
pub const cyclone = Cpu{
.name = "cyclone",
.llvm_name = "cyclone",
.features = featureSet(&[_]Feature{
.cyclone,
.alternate_sextload_cvt_f32_pattern,
.arith_bcc_fusion,
.arith_cbz_fusion,
.crypto,
.disable_latency_sched_heuristic,
.fp_armv8,
.fuse_aes,
.fuse_crypto_eor,
.neon,
.perfmon,
.zcm,
.zcz,
.zcz_fp_workaround,
}),
};
pub const exynos_m1 = Cpu{
.name = "exynos_m1",
.llvm_name = "exynos-m1",
.features = featureSet(&[_]Feature{
.exynosm1,
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_aes,
.perfmon,
.slow_misaligned_128store,
.slow_paired_128,
.use_postra_scheduler,
.use_reciprocal_square_root,
.zcz_fp,
}),
};
pub const exynos_m2 = Cpu{
.name = "exynos_m2",
.llvm_name = "exynos-m2",
.features = featureSet(&[_]Feature{
.exynosm2,
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_aes,
.perfmon,
.slow_misaligned_128store,
.slow_paired_128,
.use_postra_scheduler,
.zcz_fp,
}),
};
pub const exynos_m3 = Cpu{
.name = "exynos_m3",
.llvm_name = "exynos-m3",
.features = featureSet(&[_]Feature{
.exynosm3,
.crc,
.crypto,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fuse_address,
.fuse_aes,
.fuse_csel,
.fuse_literals,
.lsl_fast,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
.zcz_fp,
}),
};
pub const exynos_m4 = Cpu{
.name = "exynos_m4",
.llvm_name = "exynos-m4",
.features = featureSet(&[_]Feature{
.exynosm4,
.arith_bcc_fusion,
.arith_cbz_fusion,
.crypto,
.dotprod,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fullfp16,
.fuse_address,
.fuse_aes,
.fuse_arith_logic,
.fuse_csel,
.fuse_literals,
.lsl_fast,
.perfmon,
.use_postra_scheduler,
.v8_2a,
.zcz,
}),
};
pub const exynos_m5 = Cpu{
.name = "exynos_m5",
.llvm_name = "exynos-m5",
.features = featureSet(&[_]Feature{
.exynosm4,
.arith_bcc_fusion,
.arith_cbz_fusion,
.crypto,
.dotprod,
.exynos_cheap_as_move,
.force_32bit_jump_tables,
.fullfp16,
.fuse_address,
.fuse_aes,
.fuse_arith_logic,
.fuse_csel,
.fuse_literals,
.lsl_fast,
.perfmon,
.use_postra_scheduler,
.v8_2a,
.zcz,
}),
};
pub const falkor = Cpu{
.name = "falkor",
.llvm_name = "falkor",
.features = featureSet(&[_]Feature{
.falkor,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.rdm,
.slow_strqro_store,
.use_postra_scheduler,
.zcz,
}),
};
pub const generic = Cpu{
@ -1639,56 +1372,119 @@ pub const cpu = struct {
.name = "kryo",
.llvm_name = "kryo",
.features = featureSet(&[_]Feature{
.kryo,
.crc,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
.zcz,
}),
};
pub const saphira = Cpu{
.name = "saphira",
.llvm_name = "saphira",
.features = featureSet(&[_]Feature{
.saphira,
.crypto,
.custom_cheap_as_move,
.fp_armv8,
.lsl_fast,
.neon,
.perfmon,
.predictable_select_expensive,
.spe,
.use_postra_scheduler,
.v8_4a,
.zcz,
}),
};
pub const thunderx = Cpu{
.name = "thunderx",
.llvm_name = "thunderx",
.features = featureSet(&[_]Feature{
.thunderx,
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
pub const thunderx2t99 = Cpu{
.name = "thunderx2t99",
.llvm_name = "thunderx2t99",
.features = featureSet(&[_]Feature{
.thunderx2t99,
.aggressive_fma,
.arith_bcc_fusion,
.crc,
.crypto,
.fp_armv8,
.lse,
.neon,
.predictable_select_expensive,
.use_postra_scheduler,
.v8_1a,
}),
};
pub const thunderxt81 = Cpu{
.name = "thunderxt81",
.llvm_name = "thunderxt81",
.features = featureSet(&[_]Feature{
.thunderxt81,
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
pub const thunderxt83 = Cpu{
.name = "thunderxt83",
.llvm_name = "thunderxt83",
.features = featureSet(&[_]Feature{
.thunderxt83,
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
pub const thunderxt88 = Cpu{
.name = "thunderxt88",
.llvm_name = "thunderxt88",
.features = featureSet(&[_]Feature{
.thunderxt88,
.crc,
.crypto,
.fp_armv8,
.neon,
.perfmon,
.predictable_select_expensive,
.use_postra_scheduler,
}),
};
pub const tsv110 = Cpu{
.name = "tsv110",
.llvm_name = "tsv110",
.features = featureSet(&[_]Feature{
.tsv110,
.crypto,
.custom_cheap_as_move,
.dotprod,
.fp_armv8,
.fp16fml,
.fullfp16,
.fuse_aes,
.neon,
.perfmon,
.spe,
.use_postra_scheduler,
.v8_2a,
}),
};
};
@ -1697,7 +1493,6 @@ pub const cpu = struct {
/// TODO: Replace this with usage of `std.meta.declList`. It does work, but stage1
/// compiler has inefficient memory and CPU usage, affecting build times.
pub const all_cpus = &[_]*const Cpu{
&cpu.apple_latest,
&cpu.cortex_a35,
&cpu.cortex_a53,
&cpu.cortex_a55,
@ -1718,7 +1513,6 @@ pub const all_cpus = &[_]*const Cpu{
&cpu.kryo,
&cpu.saphira,
&cpu.thunderx,
&cpu.thunderx2t99,
&cpu.thunderxt81,
&cpu.thunderxt83,
&cpu.thunderxt88,