86 lines · plain
1//=------ AArch64FMV.td - Describe AArch64 FMV Features ------*- tablegen -*-=//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// Function MultiVersioning (FMV) properties. FMV features are accepted by the10// attributes target_version and target_clones, and they correspond to a mapping11// from the FMV feature name to:12// - A bit in the FMV ABI, as defined by the ACLE.13// - The FMV priority, as defined by the ACLE.14// - A list of backend features.15// 16// The list of backend features is not a set of dependencies; it is specific to17// LLVM and indicates how to do codegen when the FMV feature is present.18// 19// Therefore FMVExtensions are separated from regular AArch64 Extensions, which20// encode dependencies between themselves and other SubtargetFeatures.21//===----------------------------------------------------------------------===//22 23 24// Something you can add to target_version or target_clones.25class FMVExtension<string name, string enumeration> {26 // Name, as spelled in target_version or target_clones. e.g. "memtag".27 string Name = name;28 29 // A C++ expression giving the number of the bit in the FMV ABI.30 // Currently this is given as a value from the enum "CPUFeatures".31 string FeatureBit = "FEAT_" # enumeration;32 33 // SubtargetFeature enabled for codegen when this FMV feature is present.34 string BackendFeature = name;35 36 // A C++ expression giving the number of the priority bit.37 // Currently this is given as a value from the enum "FeatPriorities".38 string PriorityBit = "PRIOR_" # enumeration;39}40 41def : FMVExtension<"aes", "PMULL">;42def : FMVExtension<"bf16", "BF16">;43def : FMVExtension<"bti", "BTI">;44def : FMVExtension<"crc", "CRC">;45def : FMVExtension<"dit", "DIT">;46def : FMVExtension<"dotprod", "DOTPROD">;47let BackendFeature = "ccpp" in def : FMVExtension<"dpb", "DPB">;48let BackendFeature = "ccdp" in def : FMVExtension<"dpb2", "DPB2">;49def : FMVExtension<"f32mm", "SVE_F32MM">;50def : FMVExtension<"f64mm", "SVE_F64MM">;51def : FMVExtension<"fcma", "FCMA">;52def : FMVExtension<"flagm", "FLAGM">;53let BackendFeature = "altnzcv" in def : FMVExtension<"flagm2", "FLAGM2">;54def : FMVExtension<"fp", "FP">;55def : FMVExtension<"fp16", "FP16">;56def : FMVExtension<"fp16fml", "FP16FML">;57let BackendFeature = "fptoint" in def : FMVExtension<"frintts", "FRINTTS">;58def : FMVExtension<"i8mm", "I8MM">;59def : FMVExtension<"jscvt", "JSCVT">;60def : FMVExtension<"lse", "LSE">;61def : FMVExtension<"memtag", "MEMTAG2">;62def : FMVExtension<"mops", "MOPS">;63def : FMVExtension<"rcpc", "RCPC">;64let BackendFeature = "rcpc-immo" in def : FMVExtension<"rcpc2", "RCPC2">;65def : FMVExtension<"rcpc3", "RCPC3">;66def : FMVExtension<"rdm", "RDM">;67def : FMVExtension<"rng", "RNG">;68def : FMVExtension<"sb", "SB">;69def : FMVExtension<"sha2", "SHA2">;70def : FMVExtension<"sha3", "SHA3">;71def : FMVExtension<"simd", "SIMD">;72def : FMVExtension<"sm4", "SM4">;73def : FMVExtension<"sme", "SME">;74def : FMVExtension<"sme-f64f64", "SME_F64">;75def : FMVExtension<"sme-i16i64", "SME_I64">;76def : FMVExtension<"sme2", "SME2">;77def : FMVExtension<"ssbs", "SSBS2">;78def : FMVExtension<"sve", "SVE">;79def : FMVExtension<"sve2", "SVE2">;80def : FMVExtension<"sve2-aes", "SVE_PMULL128">;81def : FMVExtension<"sve2-bitperm", "SVE_BITPERM">;82def : FMVExtension<"sve2-sha3", "SVE_SHA3">;83def : FMVExtension<"sve2-sm4", "SVE_SM4">;84def : FMVExtension<"wfxt", "WFXT">;85def : FMVExtension<"cssc", "CSSC">;86