21 std::vector<StringRef> &Features) {
28 Features.push_back(
"+fpuv2_sf");
29 Features.push_back(
"+fpuv2_df");
30 Features.push_back(
"+fdivdu");
33 Features.push_back(
"+fpuv2_sf");
34 Features.push_back(
"+fpuv2_df");
37 Features.push_back(
"+fpuv2_sf");
38 Features.push_back(
"+fpuv2_df");
39 Features.push_back(
"+fdivdu");
42 Features.push_back(
"+fpuv2_sf");
45 Features.push_back(
"+fpuv3_hf");
46 Features.push_back(
"+fpuv3_hi");
47 Features.push_back(
"+fpuv3_sf");
48 Features.push_back(
"+fpuv3_df");
51 Features.push_back(
"+fpuv3_hf");
52 Features.push_back(
"+fpuv3_hi");
55 Features.push_back(
"+fpuv3_hf");
56 Features.push_back(
"+fpuv3_hi");
57 Features.push_back(
"+fpuv3_sf");
60 Features.push_back(
"+fpuv3_sf");
61 Features.push_back(
"+fpuv3_df");
82 if (AK == CSKY::ArchKind::INVALID)
93 if (
A.getName() == Arch)
97 return CSKY::ArchKind::INVALID;
101 for (
const auto C : CPUNames) {
102 if (CPU ==
C.getName())
106 return CSKY::ArchKind::INVALID;
111 if (ArchExt ==
A.getName())
119 if (Arch.ArchID != CSKY::ArchKind::INVALID)
125 if (FPUKind >= FK_LAST)
127 return FPUNames[FPUKind].getName();
131 if (FPUKind >= FK_LAST)
132 return FPUVersion::NONE;
133 return FPUNames[FPUKind].FPUVer;
138#define CSKY_CPU_NAME(NAME, ID, DEFAULT_EXT) \
139 .Case(NAME, ARCHNames[static_cast<unsigned>(ArchKind::ID)].archBaseExt | \
141#include "llvm/TargetParser/CSKYTargetParser.def"
153 if (
Name.starts_with(
"no")) {
163 if (AE.Feature && ArchExt == AE.getName())
164 return StringRef(Negated ? AE.NegFeature : AE.Feature);
171 std::vector<StringRef> &Features) {
176 if ((
Extensions & AE.ID) == AE.ID && AE.Feature)
177 Features.push_back(AE.Feature);
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static bool stripNegationPrefix(StringRef &Name)
static StringRef getName(Value *V)
static cl::opt< std::set< SPIRV::Extension::Extension >, false, SPIRVExtensionsParser > Extensions("spirv-ext", cl::desc("Specify list of enabled SPIR-V extensions"))
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
static Triple::ArchType parseArch(StringRef ArchName)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef getFPUName(unsigned FPUKind)
StringRef getArchExtFeature(StringRef ArchExt)
bool getExtensionFeatures(uint64_t Extensions, std::vector< StringRef > &Features)
void fillValidCPUArchList(SmallVectorImpl< StringRef > &Values)
const ArchNames< CSKY::ArchKind > ARCHNames[]
bool getFPUFeatures(CSKYFPUKind Kind, std::vector< StringRef > &Features)
uint64_t parseArchExt(StringRef ArchExt)
FPUVersion getFPUVersion(unsigned FPUKind)
ArchKind parseCPUArch(StringRef CPU)
ArchKind parseArch(StringRef Arch)
StringRef getDefaultCPU(StringRef Arch)
const CSKY::ExtName CSKYARCHExtNames[]
StringRef getArchExtName(uint64_t ArchExtKind)
StringRef getArchName(ArchKind AK)
uint64_t getDefaultExtensions(StringRef CPU)
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.