#include "llvm/TargetParser/X86TargetParser.h"
#include "llvm/ADT/Bitset.h"
#include "llvm/ADT/StringSwitch.h"
#include <numeric>
usingnamespacellvm;
usingnamespacellvm::X86;
namespace {
FeatureBitset;
struct ProcInfo { … };
struct FeatureInfo { … };
}
#define X86_FEATURE …
#include "llvm/TargetParser/X86TargetParser.def"
constexpr FeatureBitset FeaturesPentiumMMX = …;
constexpr FeatureBitset FeaturesPentium2 = …;
constexpr FeatureBitset FeaturesPentium3 = …;
constexpr FeatureBitset FeaturesPentium4 = …;
constexpr FeatureBitset FeaturesPrescott = …;
constexpr FeatureBitset FeaturesNocona = …;
constexpr FeatureBitset FeaturesX86_64 = …;
constexpr FeatureBitset FeaturesX86_64_V2 = …;
constexpr FeatureBitset FeaturesX86_64_V3 = …;
constexpr FeatureBitset FeaturesX86_64_V4 = …;
constexpr FeatureBitset FeaturesCore2 = …;
constexpr FeatureBitset FeaturesPenryn = …;
constexpr FeatureBitset FeaturesNehalem = …;
constexpr FeatureBitset FeaturesWestmere = …;
constexpr FeatureBitset FeaturesSandyBridge = …;
constexpr FeatureBitset FeaturesIvyBridge = …;
constexpr FeatureBitset FeaturesHaswell = …;
constexpr FeatureBitset FeaturesBroadwell = …;
constexpr FeatureBitset FeaturesKNL = …;
constexpr FeatureBitset FeaturesKNM = …;
constexpr FeatureBitset FeaturesSkylakeClient = …;
constexpr FeatureBitset FeaturesSkylakeServer = …;
constexpr FeatureBitset FeaturesCascadeLake = …;
constexpr FeatureBitset FeaturesCooperLake = …;
constexpr FeatureBitset FeaturesCannonlake = …;
constexpr FeatureBitset FeaturesICLClient = …;
constexpr FeatureBitset FeaturesRocketlake = …;
constexpr FeatureBitset FeaturesICLServer = …;
constexpr FeatureBitset FeaturesTigerlake = …;
constexpr FeatureBitset FeaturesSapphireRapids = …;
constexpr FeatureBitset FeaturesGraniteRapids = …;
constexpr FeatureBitset FeaturesBonnell = …;
constexpr FeatureBitset FeaturesSilvermont = …;
constexpr FeatureBitset FeaturesGoldmont = …;
constexpr FeatureBitset FeaturesGoldmontPlus = …;
constexpr FeatureBitset FeaturesTremont = …;
constexpr FeatureBitset FeaturesAlderlake = …;
constexpr FeatureBitset FeaturesSierraforest = …;
constexpr FeatureBitset FeaturesArrowlakeS = …;
constexpr FeatureBitset FeaturesPantherlake = …;
constexpr FeatureBitset FeaturesClearwaterforest = …;
constexpr FeatureBitset FeaturesGeode = …;
constexpr FeatureBitset FeaturesK6 = …;
constexpr FeatureBitset FeaturesAthlon = …;
constexpr FeatureBitset FeaturesAthlonXP = …;
constexpr FeatureBitset FeaturesK8 = …;
constexpr FeatureBitset FeaturesK8SSE3 = …;
constexpr FeatureBitset FeaturesAMDFAM10 = …;
constexpr FeatureBitset FeaturesBTVER1 = …;
constexpr FeatureBitset FeaturesBTVER2 = …;
constexpr FeatureBitset FeaturesBDVER1 = …;
constexpr FeatureBitset FeaturesBDVER2 = …;
constexpr FeatureBitset FeaturesBDVER3 = …;
constexpr FeatureBitset FeaturesBDVER4 = …;
constexpr FeatureBitset FeaturesZNVER1 = …;
constexpr FeatureBitset FeaturesZNVER2 = …;
static constexpr FeatureBitset FeaturesZNVER3 = …;
static constexpr FeatureBitset FeaturesZNVER4 = …;
static constexpr FeatureBitset FeaturesZNVER5 = …;
constexpr ProcInfo Processors[] = …;
constexpr const char *NoTuneList[] = …;
X86::CPUKind llvm::X86::parseArchX86(StringRef CPU, bool Only64Bit) { … }
X86::CPUKind llvm::X86::parseTuneCPU(StringRef CPU, bool Only64Bit) { … }
void llvm::X86::fillValidCPUArchList(SmallVectorImpl<StringRef> &Values,
bool Only64Bit) { … }
void llvm::X86::fillValidTuneCPUList(SmallVectorImpl<StringRef> &Values,
bool Only64Bit) { … }
ProcessorFeatures llvm::X86::getKeyFeature(X86::CPUKind Kind) { … }
constexpr FeatureBitset ImpliedFeatures64BIT = …;
constexpr FeatureBitset ImpliedFeaturesADX = …;
constexpr FeatureBitset ImpliedFeaturesBMI = …;
constexpr FeatureBitset ImpliedFeaturesBMI2 = …;
constexpr FeatureBitset ImpliedFeaturesCLDEMOTE = …;
constexpr FeatureBitset ImpliedFeaturesCLFLUSHOPT = …;
constexpr FeatureBitset ImpliedFeaturesCLWB = …;
constexpr FeatureBitset ImpliedFeaturesCLZERO = …;
constexpr FeatureBitset ImpliedFeaturesCMOV = …;
constexpr FeatureBitset ImpliedFeaturesCMPXCHG16B = …;
constexpr FeatureBitset ImpliedFeaturesCMPXCHG8B = …;
constexpr FeatureBitset ImpliedFeaturesCRC32 = …;
constexpr FeatureBitset ImpliedFeaturesENQCMD = …;
constexpr FeatureBitset ImpliedFeaturesFSGSBASE = …;
constexpr FeatureBitset ImpliedFeaturesFXSR = …;
constexpr FeatureBitset ImpliedFeaturesINVPCID = …;
constexpr FeatureBitset ImpliedFeaturesLWP = …;
constexpr FeatureBitset ImpliedFeaturesLZCNT = …;
constexpr FeatureBitset ImpliedFeaturesMMX = …;
constexpr FeatureBitset ImpliedFeaturesMWAITX = …;
constexpr FeatureBitset ImpliedFeaturesMOVBE = …;
constexpr FeatureBitset ImpliedFeaturesMOVDIR64B = …;
constexpr FeatureBitset ImpliedFeaturesMOVDIRI = …;
constexpr FeatureBitset ImpliedFeaturesPCONFIG = …;
constexpr FeatureBitset ImpliedFeaturesPOPCNT = …;
constexpr FeatureBitset ImpliedFeaturesPKU = …;
constexpr FeatureBitset ImpliedFeaturesPRFCHW = …;
constexpr FeatureBitset ImpliedFeaturesPTWRITE = …;
constexpr FeatureBitset ImpliedFeaturesRDPID = …;
constexpr FeatureBitset ImpliedFeaturesRDPRU = …;
constexpr FeatureBitset ImpliedFeaturesRDRND = …;
constexpr FeatureBitset ImpliedFeaturesRDSEED = …;
constexpr FeatureBitset ImpliedFeaturesRTM = …;
constexpr FeatureBitset ImpliedFeaturesSAHF = …;
constexpr FeatureBitset ImpliedFeaturesSERIALIZE = …;
constexpr FeatureBitset ImpliedFeaturesSGX = …;
constexpr FeatureBitset ImpliedFeaturesSHSTK = …;
constexpr FeatureBitset ImpliedFeaturesTBM = …;
constexpr FeatureBitset ImpliedFeaturesTSXLDTRK = …;
constexpr FeatureBitset ImpliedFeaturesUINTR = …;
constexpr FeatureBitset ImpliedFeaturesUSERMSR = …;
constexpr FeatureBitset ImpliedFeaturesWAITPKG = …;
constexpr FeatureBitset ImpliedFeaturesWBNOINVD = …;
constexpr FeatureBitset ImpliedFeaturesVZEROUPPER = …;
constexpr FeatureBitset ImpliedFeaturesX87 = …;
constexpr FeatureBitset ImpliedFeaturesXSAVE = …;
constexpr FeatureBitset ImpliedFeaturesDUMMYFEATURE1 = …;
constexpr FeatureBitset ImpliedFeaturesDUMMYFEATURE2 = …;
constexpr FeatureBitset ImpliedFeaturesRETPOLINE_EXTERNAL_THUNK = …;
constexpr FeatureBitset ImpliedFeaturesRETPOLINE_INDIRECT_BRANCHES = …;
constexpr FeatureBitset ImpliedFeaturesRETPOLINE_INDIRECT_CALLS = …;
constexpr FeatureBitset ImpliedFeaturesLVI_CFI = …;
constexpr FeatureBitset ImpliedFeaturesLVI_LOAD_HARDENING = …;
constexpr FeatureBitset ImpliedFeaturesXSAVEC = …;
constexpr FeatureBitset ImpliedFeaturesXSAVEOPT = …;
constexpr FeatureBitset ImpliedFeaturesXSAVES = …;
constexpr FeatureBitset ImpliedFeaturesSSE = …;
constexpr FeatureBitset ImpliedFeaturesSSE2 = …;
constexpr FeatureBitset ImpliedFeaturesSSE3 = …;
constexpr FeatureBitset ImpliedFeaturesSSSE3 = …;
constexpr FeatureBitset ImpliedFeaturesSSE4_1 = …;
constexpr FeatureBitset ImpliedFeaturesSSE4_2 = …;
constexpr FeatureBitset ImpliedFeaturesAVX = …;
constexpr FeatureBitset ImpliedFeaturesAVX2 = …;
constexpr FeatureBitset ImpliedFeaturesEVEX512 = …;
constexpr FeatureBitset ImpliedFeaturesAVX512F = …;
constexpr FeatureBitset ImpliedFeaturesAES = …;
constexpr FeatureBitset ImpliedFeaturesF16C = …;
constexpr FeatureBitset ImpliedFeaturesFMA = …;
constexpr FeatureBitset ImpliedFeaturesGFNI = …;
constexpr FeatureBitset ImpliedFeaturesPCLMUL = …;
constexpr FeatureBitset ImpliedFeaturesSHA = …;
constexpr FeatureBitset ImpliedFeaturesVAES = …;
constexpr FeatureBitset ImpliedFeaturesVPCLMULQDQ = …;
constexpr FeatureBitset ImpliedFeaturesSM3 = …;
constexpr FeatureBitset ImpliedFeaturesSM4 = …;
constexpr FeatureBitset ImpliedFeaturesAVX512CD = …;
constexpr FeatureBitset ImpliedFeaturesAVX512BW = …;
constexpr FeatureBitset ImpliedFeaturesAVX512DQ = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VL = …;
constexpr FeatureBitset ImpliedFeaturesAVX512BF16 = …;
constexpr FeatureBitset ImpliedFeaturesAVX512BITALG = …;
constexpr FeatureBitset ImpliedFeaturesAVX512IFMA = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VNNI = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VPOPCNTDQ = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VBMI = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VBMI2 = …;
constexpr FeatureBitset ImpliedFeaturesAVX512VP2INTERSECT = …;
constexpr FeatureBitset ImpliedFeaturesAVX5124FMAPS = …;
constexpr FeatureBitset ImpliedFeaturesAVX5124VNNIW = …;
constexpr FeatureBitset ImpliedFeaturesSSE4_A = …;
constexpr FeatureBitset ImpliedFeaturesFMA4 = …;
constexpr FeatureBitset ImpliedFeaturesXOP = …;
constexpr FeatureBitset ImpliedFeaturesAMX_TILE = …;
constexpr FeatureBitset ImpliedFeaturesAMX_BF16 = …;
constexpr FeatureBitset ImpliedFeaturesAMX_FP16 = …;
constexpr FeatureBitset ImpliedFeaturesAMX_INT8 = …;
constexpr FeatureBitset ImpliedFeaturesAMX_COMPLEX = …;
constexpr FeatureBitset ImpliedFeaturesHRESET = …;
constexpr FeatureBitset ImpliedFeaturesPREFETCHI = …;
constexpr FeatureBitset ImpliedFeaturesCMPCCXADD = …;
constexpr FeatureBitset ImpliedFeaturesRAOINT = …;
constexpr FeatureBitset ImpliedFeaturesAVXVNNIINT16 = …;
constexpr FeatureBitset ImpliedFeaturesAVXVNNIINT8 = …;
constexpr FeatureBitset ImpliedFeaturesAVXIFMA = …;
constexpr FeatureBitset ImpliedFeaturesAVXNECONVERT = …;
constexpr FeatureBitset ImpliedFeaturesSHA512 = …;
constexpr FeatureBitset ImpliedFeaturesAVX512FP16 = …;
constexpr FeatureBitset ImpliedFeaturesKL = …;
constexpr FeatureBitset ImpliedFeaturesWIDEKL = …;
constexpr FeatureBitset ImpliedFeaturesAVXVNNI = …;
constexpr FeatureBitset ImpliedFeaturesAVX10_1 = …;
constexpr FeatureBitset ImpliedFeaturesAVX10_1_512 = …;
constexpr FeatureBitset ImpliedFeaturesAVX10_2 = …;
constexpr FeatureBitset ImpliedFeaturesAVX10_2_512 = …;
constexpr FeatureBitset ImpliedFeaturesEGPR = …;
constexpr FeatureBitset ImpliedFeaturesPush2Pop2 = …;
constexpr FeatureBitset ImpliedFeaturesPPX = …;
constexpr FeatureBitset ImpliedFeaturesNDD = …;
constexpr FeatureBitset ImpliedFeaturesCCMP = …;
constexpr FeatureBitset ImpliedFeaturesNF = …;
constexpr FeatureBitset ImpliedFeaturesCF = …;
constexpr FeatureBitset ImpliedFeaturesZU = …;
constexpr FeatureInfo FeatureInfos[X86::CPU_FEATURE_MAX] = …;
void llvm::X86::getFeaturesForCPU(StringRef CPU,
SmallVectorImpl<StringRef> &EnabledFeatures,
bool NeedPlus) { … }
static void getImpliedEnabledFeatures(FeatureBitset &Bits,
const FeatureBitset &Implies) { … }
static void getImpliedDisabledFeatures(FeatureBitset &Bits, unsigned Value) { … }
void llvm::X86::updateImpliedFeatures(
StringRef Feature, bool Enabled,
StringMap<bool> &Features) { … }
char llvm::X86::getCPUDispatchMangling(StringRef CPU) { … }
bool llvm::X86::validateCPUSpecificCPUDispatch(StringRef Name) { … }
std::array<uint32_t, 4>
llvm::X86::getCpuSupportsMask(ArrayRef<StringRef> FeatureStrs) { … }
unsigned llvm::X86::getFeaturePriority(ProcessorFeatures Feat) { … }