Lines Matching full:feature
1 //===--- AArch64.cpp - Implement AArch64 target feature support -----------===//
32 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
33 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
38 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
39 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
44 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
45 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
52 #define TARGET_BUILTIN(ID, TYPE, ATTRS, FEATURE) \
53 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::NO_HEADER, ALL_LANGUAGES},
54 #define TARGET_HEADER_BUILTIN(ID, TYPE, ATTRS, HEADER, LANGS, FEATURE) \
55 {#ID, TYPE, ATTRS, FEATURE, HeaderDesc::HEADER, LANGS},
505 // The __ARM_FEATURE_CRYPTO is deprecated in favor of finer grained feature
701 // Take the maximum priority as per feature cost, so more features win.
717 for (auto &Feature : Features)
718 if (!llvm::AArch64::parseFMVExtension(Feature.trim()).has_value())
723 bool AArch64TargetInfo::hasFeature(StringRef Feature) const {
724 return llvm::StringSwitch<bool>(Feature)
785 // If the feature is an architecture feature (like v8.2a), add all previous
793 // Disabling an architecture feature does not affect dependent features
805 assert(F[0] == '+' && "Expected + in target feature!");
813 for (const auto &Feature : Features) {
814 if (Feature == "-fp-armv8")
816 if (Feature == "-neon")
818 if (Feature == "-sve")
821 if (Feature == "+neon" || Feature == "+fp-armv8")
823 if (Feature == "+jscvt") {
827 if (Feature == "+fcma") {
832 if (Feature == "+sve") {
837 if (Feature == "+sve2") {
843 if (Feature == "+sve2p1") {
850 if (Feature == "+sve2-aes") {
857 if (Feature == "+sve2-sha3") {
864 if (Feature == "+sve2-sm4") {
871 if (Feature == "+sve-b16b16")
873 if (Feature == "+sve2-bitperm") {
880 if (Feature == "+f32mm") {
886 if (Feature == "+f64mm") {
892 if (Feature == "+sme") {
897 if (Feature == "+sme2") {
903 if (Feature == "+sme2p1") {
910 if (Feature == "+sme-f64f64") {
916 if (Feature == "+sme-i16i64") {
922 if (Feature == "+sme-fa64") {
929 if (Feature == "+sme-f16f16") {
936 if (Feature == "+sme-b16b16") {
944 if (Feature == "+sb")
946 if (Feature == "+predres")
948 if (Feature == "+ssbs")
950 if (Feature == "+bti")
952 if (Feature == "+wfxt")
954 if (Feature == "-fmv")
956 if (Feature == "+crc")
958 if (Feature == "+rcpc")
960 if (Feature == "+aes") {
964 if (Feature == "+sha2") {
968 if (Feature == "+sha3") {
973 if (Feature == "+rdm") {
977 if (Feature == "+dit")
979 if (Feature == "+cccp")
981 if (Feature == "+ccdp") {
985 if (Feature == "+fptoint")
987 if (Feature == "+sm4") {
991 if (Feature == "+strict-align")
995 if (Feature == "+v8a" && ArchInfo->Version < llvm::AArch64::ARMV8A.Version)
997 if (Feature == "+v8.1a" &&
1000 if (Feature == "+v8.2a" &&
1003 if (Feature == "+v8.3a" &&
1006 if (Feature == "+v8.4a" &&
1009 if (Feature == "+v8.5a" &&
1012 if (Feature == "+v8.6a" &&
1015 if (Feature == "+v8.7a" &&
1018 if (Feature == "+v8.8a" &&
1021 if (Feature == "+v8.9a" &&
1024 if (Feature == "+v9a" && ArchInfo->Version < llvm::AArch64::ARMV9A.Version)
1026 if (Feature == "+v9.1a" &&
1029 if (Feature == "+v9.2a" &&
1032 if (Feature == "+v9.3a" &&
1035 if (Feature == "+v9.4a" &&
1038 if (Feature == "+v9.5a" &&
1041 if (Feature == "+v8r")
1043 if (Feature == "+fullfp16") {
1047 if (Feature == "+dotprod") {
1051 if (Feature == "+fp16fml") {
1056 if (Feature == "+mte")
1058 if (Feature == "+tme")
1060 if (Feature == "+pauth")
1062 if (Feature == "+i8mm")
1064 if (Feature == "+bf16")
1066 if (Feature == "+lse")
1068 if (Feature == "+ls64")
1070 if (Feature == "+rand")
1072 if (Feature == "+flagm")
1074 if (Feature == "+altnzcv") {
1078 if (Feature == "+mops")
1080 if (Feature == "+d128")
1082 if (Feature == "+gcs")
1084 if (Feature == "+rcpc3")
1086 if (Feature == "+pauth-lr") {
1095 for (const auto &Feature : Features) {
1096 if (Feature == "-d128")
1122 // "feature", "no-feature" - Add (or remove) feature.
1123 // "+feature", "+nofeature" - Add (or remove) feature.
1125 // A feature may correspond to an Extension (anything with a corresponding
1127 // dependencies. If the feature does not yield a successful parse then it
1142 for (StringRef Feature : SplitFeatures) {
1143 if (FeatureBits.parseModifier(Feature))
1146 // diagnostics, as well as valid internal feature names.
1148 // FIXME: We should consider rejecting internal feature names like
1151 if (Feature.starts_with("no"))
1152 Features.push_back("-" + Feature.drop_front(2).str());
1154 Features.push_back("+" + Feature.str());
1163 for (auto &Feature : AttrFeatures) {
1164 Feature = Feature.trim();
1165 if (Feature.starts_with("fpmath="))
1168 if (Feature.starts_with("branch-protection=")) {
1169 Ret.BranchProtection = Feature.split('=').second.trim();
1173 if (Feature.starts_with("arch=")) {
1178 Feature.split("=").second.trim().split("+");
1188 } else if (Feature.starts_with("cpu=")) {
1195 Feature.split("=").second.trim().split("+");
1202 } else if (Feature.starts_with("tune=")) {
1206 Ret.Tune = Feature.split("=").second.trim();
1207 } else if (Feature.starts_with("+")) {
1208 SplitAndAddFeatures(Feature, Ret.Features, FeatureBits);
1210 if (FeatureBits.parseModifier(Feature, /* AllowNoDashForm = */ true))
1213 // diagnostics, as well as valid internal feature names.
1215 // FIXME: We should consider rejecting internal feature names like
1218 if (Feature.starts_with("no-"))
1219 Ret.Features.push_back("-" + Feature.drop_front(3).str());
1221 Ret.Features.push_back("+" + Feature.str());