Lines Matching +full:test +full:- +full:cpu
1 //===-- AArch64TargetParser - Parser for AArch64 features -------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 // such as FPU/CPU/ARCH and extension names.
12 //===----------------------------------------------------------------------===//
23 #define DEBUG_TYPE "target-parser"
32 return (Arch[1] - 48);
36 const AArch64::ArchInfo *AArch64::getArchForCpu(StringRef CPU) {
37 // Note: this now takes cpu aliases into account
38 std::optional<CpuInfo> Cpu = parseCpu(CPU);
39 if (!Cpu)
41 return &Cpu->Arch;
46 if (A->getSubArch() == SubArch)
55 FeaturesMask |= (1ULL << Ext->Bit);
65 if (InputExts.test(E.ID) && !E.PosTargetFeature.empty())
83 assert(!(AE.has_value() && AE->NegTargetFeature.empty()));
84 return IsNegated ? AE->NegTargetFeature : AE->PosTargetFeature;
95 // The apple-latest alias is backend only, do not expose it to clang's -mcpu.
96 if (Alias.AltName != "apple-latest")
115 if (A->Name.ends_with(Syn))
156 // Then find the CPU name.
165 outs() << "All available -march extensions for AArch64\n\n"
170 // Extensions without a feature cannot be used with -march.
173 << format(Ext.Description.empty() ? "%-20s%s\n" : "%-20s%-55s%s\n",
200 << format("%-55s%s\n",
215 if (Enabled.test(E))
233 // +fp16 implies +fp16fml for v8.4A+, but not v9.0-A+
234 if (E == AEK_FP16 && BaseArch->is_superset(ARMV8_4A) &&
235 !BaseArch->is_superset(ARMV9A))
239 if (E == AEK_CRYPTO && BaseArch->is_superset(ARMV8_4A)) {
247 // -crypto always disables aes, sha2, sha3 and sm4, even for architectures
256 if (!Enabled.test(E))
270 void AArch64::ExtensionSet::addCPUDefaults(const CpuInfo &CPU) {
271 LLVM_DEBUG(llvm::dbgs() << "addCPUDefaults(" << CPU.Name << ")\n");
272 BaseArch = &CPU.Arch;
274 AArch64::ExtensionBitset CPUExtensions = CPU.getImpliedExtensions();
276 if (CPUExtensions.test(E.ID))
285 if (Arch.DefaultExts.test(E.ID))
294 // The "no-feat" form is allowed in the target attribute but nowhere else.
295 if (AllowNoDashForm && Modifier.starts_with("no-"))
303 if (AE->PosTargetFeature.empty() || AE->NegTargetFeature.empty())
306 disable(AE->ID);
308 enable(AE->ID);
319 bool IsNegated = F[0] == '-';
321 Touched.set(AE->ID);
323 Enabled.reset(AE->ID);
325 Enabled.set(AE->ID);