From 29cde35b43a8ff413ecec55abfa64ab43f99b3f1 Mon Sep 17 00:00:00 2001 From: Elena Demikhovsky Date: Sun, 24 Jan 2016 10:41:28 +0000 Subject: Added Skylake client to X86 targets and features Changes in X86.td: I set features of Intel processors in incremental form: IVB = SNB + X HSW = IVB + X .. I added Skylake client processor and defined it's features FeatureADX was missing on KNL Added some new features to appropriate processors SMAP, IFMA, PREFETCHWT1, VMFUNC and others Differential Revision: http://reviews.llvm.org/D16357 llvm-svn: 258659 --- llvm/lib/Target/X86/X86.td | 233 ++++++++++++++++++--------------------------- 1 file changed, 95 insertions(+), 138 deletions(-) (limited to 'llvm/lib/Target/X86/X86.td') diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td index 06b8b466674..d324e53ea14 100644 --- a/llvm/lib/Target/X86/X86.td +++ b/llvm/lib/Target/X86/X86.td @@ -125,6 +125,9 @@ def FeatureCDI : SubtargetFeature<"avx512cd", "HasCDI", "true", def FeaturePFI : SubtargetFeature<"avx512pf", "HasPFI", "true", "Enable AVX-512 PreFetch Instructions", [FeatureAVX512]>; +def FeaturePREFETCHWT1 : SubtargetFeature<"prefetchwt1", "HasPFPREFETCHWT1", + "true", + "Prefetch with Intent to Write and T1 Hint">; def FeatureDQI : SubtargetFeature<"avx512dq", "HasDQI", "true", "Enable AVX-512 Doubleword and Quadword Instructions", [FeatureAVX512]>; @@ -137,6 +140,9 @@ def FeatureVLX : SubtargetFeature<"avx512vl", "HasVLX", "true", def FeatureVBMI : SubtargetFeature<"avx512vbmi", "HasVBMI", "true", "Enable AVX-512 Vector Bit Manipulation Instructions", [FeatureAVX512]>; +def FeatureIFMA : SubtargetFeature<"ifma", "HasIFMA", "true", + "Enable AVX-512 Integer Fused Multiple-Add", + [FeatureAVX512]>; def FeaturePKU : SubtargetFeature<"pku", "HasPKU", "true", "Enable protection keys">; def FeaturePCLMUL : SubtargetFeature<"pclmul", "HasPCLMUL", "true", @@ -202,6 +208,20 @@ def FeatureSlowDivide64 : SubtargetFeature<"idivq-to-divw", def FeaturePadShortFunctions : SubtargetFeature<"pad-short-functions", "PadShortFunctions", "true", "Pad short functions">; +def FeatureINVPCID : SubtargetFeature<"invpcid", "HasInvPCId", "true", + "Invalidate Process-Context Identifier">; +def FeatureVMFUNC : SubtargetFeature<"vmfunc", "HasVMFUNC", "true", + "VM Functions">; +def FeatureSMAP : SubtargetFeature<"smap", "HasSMAP", "true", + "Supervisor Mode Access Protection">; +def FeatureSGX : SubtargetFeature<"sgx", "HasSGX", "true", + "Enable Software Guard Extensions">; +def FeatureCLFLUSHOPT : SubtargetFeature<"clflushopt", "HasCLFLUSHOPT", "true", + "Flush A Cache Line Optimized">; +def FeaturePCOMMIT : SubtargetFeature<"pcommit", "HasPCOMMIT", "true", + "Enable Persistent Commit">; +def FeatureCLWB : SubtargetFeature<"clwb", "HasCLWB", "true", + "Cache Line Write Back">; // TODO: This feature ought to be renamed. // What it really refers to are CPUs for which certain instructions // (which ones besides the example below?) are microcoded. @@ -365,13 +385,12 @@ def : WestmereProc<"westmere">; // SSE is not listed here since llvm treats AVX as a reimplementation of SSE, // rather than a superset. -class SandyBridgeProc : ProcessorModel : ProcessorModel; + +class SandyBridgeProc : ProcessorModel; def : SandyBridgeProc<"sandybridge">; def : SandyBridgeProc<"corei7-avx">; // Legacy alias. -class IvyBridgeProc : ProcessorModel; + +class IvyBridgeProc : ProcessorModel; def : IvyBridgeProc<"ivybridge">; def : IvyBridgeProc<"core-avx-i">; // Legacy alias. -class HaswellProc : ProcessorModel; + +class HaswellProc : ProcessorModel; def : HaswellProc<"haswell">; def : HaswellProc<"core-avx2">; // Legacy alias. -class BroadwellProc : ProcessorModel; +class BroadwellProc : ProcessorModel; def : BroadwellProc<"broadwell">; +def ProcIntelSKL : SubtargetFeature<"skl", "X86ProcFamily", "IntelSKL", + " Intel Skylake Client Processor", [ + ProcIntelBDW, + FeatureMPX, + FeatureXSAVEC, + FeatureXSAVES, + FeatureSGX, + FeatureCLFLUSHOPT +]>; + +// FIXME: define SKL model +class SkylakeClientProc : ProcessorModel; +def : SkylakeClientProc<"skl">; + // FIXME: define KNL model -class KnightsLandingProc : ProcessorModel : ProcessorModel; def : KnightsLandingProc<"knl">; -// FIXME: define SKX model -class SkylakeProc : ProcessorModel; -def : SkylakeProc<"skylake">; -def : SkylakeProc<"skx">; // Legacy alias. -class CannonlakeProc : ProcessorModel : ProcessorModel; +def : SkylakeServerProc<"skylake">; +def : SkylakeServerProc<"skx">; // Legacy alias. + +def ProcIntelCNL : SubtargetFeature<"cnl", "X86ProcFamily", "IntelCNL", + " Intel Cannonlake Processor", [ + ProcIntelSKX, FeatureVBMI, - FeatureFMA, - FeatureRTM, - FeatureHLE, - FeatureADX, - FeatureRDSEED, - FeatureSlowIncDec, - FeatureMPX, - FeatureXSAVEC, - FeatureXSAVES, - FeatureLAHFSAHF + FeatureIFMA, + FeatureSHA ]>; + +class CannonlakeProc : ProcessorModel; def : CannonlakeProc<"cannonlake">; def : CannonlakeProc<"cnl">; -- cgit v1.2.3