#ifndef LLVM_SUPPORT_X86TARGETPARSER_H
#define LLVM_SUPPORT_X86TARGETPARSER_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringMap.h"
namespace llvm {
template <typename T> class SmallVectorImpl;
class StringRef;
namespace X86 {
enum ProcessorVendors : unsigned {
VENDOR_DUMMY,
#define X86_VENDOR(ENUM, STRING) \
ENUM,
#include "llvm/Support/X86TargetParser.def"
VENDOR_OTHER
};
enum ProcessorTypes : unsigned {
CPU_TYPE_DUMMY,
#define X86_CPU_TYPE(ENUM, STRING) \
ENUM,
#include "llvm/Support/X86TargetParser.def"
CPU_TYPE_MAX
};
enum ProcessorSubtypes : unsigned {
CPU_SUBTYPE_DUMMY,
#define X86_CPU_SUBTYPE(ENUM, STRING) \
ENUM,
#include "llvm/Support/X86TargetParser.def"
CPU_SUBTYPE_MAX
};
enum ProcessorFeatures {
#define X86_FEATURE(ENUM, STRING) FEATURE_##ENUM,
#include "llvm/Support/X86TargetParser.def"
CPU_FEATURE_MAX
};
enum CPUKind {
CK_None,
CK_i386,
CK_i486,
CK_WinChipC6,
CK_WinChip2,
CK_C3,
CK_i586,
CK_Pentium,
CK_PentiumMMX,
CK_PentiumPro,
CK_i686,
CK_Pentium2,
CK_Pentium3,
CK_PentiumM,
CK_C3_2,
CK_Yonah,
CK_Pentium4,
CK_Prescott,
CK_Nocona,
CK_Core2,
CK_Penryn,
CK_Bonnell,
CK_Silvermont,
CK_Goldmont,
CK_GoldmontPlus,
CK_Tremont,
CK_Nehalem,
CK_Westmere,
CK_SandyBridge,
CK_IvyBridge,
CK_Haswell,
CK_Broadwell,
CK_SkylakeClient,
CK_SkylakeServer,
CK_Cascadelake,
CK_Cooperlake,
CK_Cannonlake,
CK_IcelakeClient,
CK_Rocketlake,
CK_IcelakeServer,
CK_Tigerlake,
CK_SapphireRapids,
CK_Alderlake,
CK_KNL,
CK_KNM,
CK_Lakemont,
CK_K6,
CK_K6_2,
CK_K6_3,
CK_Athlon,
CK_AthlonXP,
CK_K8,
CK_K8SSE3,
CK_AMDFAM10,
CK_BTVER1,
CK_BTVER2,
CK_BDVER1,
CK_BDVER2,
CK_BDVER3,
CK_BDVER4,
CK_ZNVER1,
CK_ZNVER2,
CK_ZNVER3,
CK_x86_64,
CK_x86_64_v2,
CK_x86_64_v3,
CK_x86_64_v4,
CK_Geode,
};
CPUKind parseArchX86(StringRef CPU, bool Only64Bit = false);
CPUKind parseTuneCPU(StringRef CPU, bool Only64Bit = false);
void fillValidCPUArchList(SmallVectorImpl<StringRef> &Values,
bool Only64Bit = false);
void fillValidTuneCPUList(SmallVectorImpl<StringRef> &Values,
bool Only64Bit = false);
ProcessorFeatures getKeyFeature(CPUKind Kind);
void getFeaturesForCPU(StringRef CPU, SmallVectorImpl<StringRef> &Features);
void updateImpliedFeatures(StringRef Feature, bool Enabled,
StringMap<bool> &Features);
uint64_t getCpuSupportsMask(ArrayRef<StringRef> FeatureStrs);
unsigned getFeaturePriority(ProcessorFeatures Feat);
} }
#endif