llvm.org GIT mirror llvm / ea5732d
Remove Proc feature flags for X86 processors that are used to inherit features from one processor to another. This exposed extra features to the -mattr command line that we shouldn't. Replace with just inherited listconcats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260832 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
2 changed file(s) with 34 addition(s) and 38 deletion(s). Raw diff Collapse all Expand all
387387 ]>;
388388 def : WestmereProc<"westmere">;
389389
390 class ProcessorFeatures Inherited,
391 list NewFeatures> {
392 list Value = !listconcat(Inherited, NewFeatures);
393 }
394
395 class ProcModel
396 list ProcFeatures,
397 list OtherFeatures> :
398 ProcessorModel;
399
390400 // SSE is not listed here since llvm treats AVX as a reimplementation of SSE,
391401 // rather than a superset.
392 def ProcIntelSNB : SubtargetFeature<"snb", "X86ProcFamily", "IntelSNB",
393 " Intel SandyBridge Processor", [
402 def SNBFeatures : ProcessorFeatures<[], [
394403 FeatureMMX,
395404 FeatureAVX,
396405 FeatureFXSR,
403412 FeatureLAHFSAHF
404413 ]>;
405414
406 class SandyBridgeProc : ProcessorModel
407 ProcIntelSNB,
415 class SandyBridgeProc : ProcModel,
416 SNBFeatures.Value, [
408417 FeatureSlowBTMem,
409418 FeatureSlowUAMem32
410419 ]>;
411420 def : SandyBridgeProc<"sandybridge">;
412421 def : SandyBridgeProc<"corei7-avx">; // Legacy alias.
413422
414 def ProcIntelIVB : SubtargetFeature<"ivb", "X86ProcFamily", "IntelIVB",
415 " Intel IvyBridge Processor", [
416 ProcIntelSNB,
423 def IVBFeatures : ProcessorFeatures
417424 FeatureRDRAND,
418425 FeatureF16C,
419426 FeatureFSGSBase
420427 ]>;
421428
422 class IvyBridgeProc : ProcessorModel
423 ProcIntelIVB,
429 class IvyBridgeProc : ProcModel,
430 IVBFeatures.Value, [
424431 FeatureSlowBTMem,
425432 FeatureSlowUAMem32
426433 ]>;
427434 def : IvyBridgeProc<"ivybridge">;
428435 def : IvyBridgeProc<"core-avx-i">; // Legacy alias.
429436
430 def ProcIntelHSW : SubtargetFeature<"hsw", "X86ProcFamily", "IntelHSW",
431 " Intel Haswell Processor", [
432 ProcIntelIVB,
437 def HSWFeatures : ProcessorFeatures
433438 FeatureAVX2,
434439 FeatureBMI,
435440 FeatureBMI2,
443448 FeatureSlowIncDec
444449 ]>;
445450
446 class HaswellProc : ProcessorModel
447 [ProcIntelHSW]>;
451 class HaswellProc : ProcModel
452 HSWFeatures.Value, []>;
448453 def : HaswellProc<"haswell">;
449454 def : HaswellProc<"core-avx2">; // Legacy alias.
450455
451 def ProcIntelBDW : SubtargetFeature<"bdw", "X86ProcFamily", "IntelBDW",
452 " Intel Broadwell Processor", [
453 ProcIntelHSW,
456 def BDWFeatures : ProcessorFeatures
454457 FeatureADX,
455458 FeatureRDSEED,
456459 FeatureSMAP
457460 ]>;
458 class BroadwellProc : ProcessorModel
459 [ProcIntelBDW]>;
461 class BroadwellProc : ProcModel
462 BDWFeatures.Value, []>;
460463 def : BroadwellProc<"broadwell">;
461464
462 def ProcIntelSKL : SubtargetFeature<"skl", "X86ProcFamily", "IntelSKL",
463 " Intel Skylake Client Processor", [
464 ProcIntelBDW,
465 def SKLFeatures : ProcessorFeatures
465466 FeatureMPX,
466467 FeatureXSAVEC,
467468 FeatureXSAVES,
470471 ]>;
471472
472473 // FIXME: define SKL model
473 class SkylakeClientProc : ProcessorModel
474 [ProcIntelSKL]>;
474 class SkylakeClientProc : ProcModel
475 SKLFeatures.Value, []>;
475476 def : SkylakeClientProc<"skl">;
476477
477478 // FIXME: define KNL model
478 class KnightsLandingProc : ProcessorModel
479 ProcIntelIVB,
479 class KnightsLandingProc : ProcModel,
480 IVBFeatures.Value, [
480481 FeatureAVX512,
481482 FeatureERI,
482483 FeatureCDI,
492493 ]>;
493494 def : KnightsLandingProc<"knl">;
494495
495 def ProcIntelSKX : SubtargetFeature<"skx", "X86ProcFamily", "IntelSKX",
496 " Intel Skylake Server Processor", [
497 ProcIntelSKL,
496 def SKXFeatures : ProcessorFeatures
498497 FeatureAVX512,
499498 FeatureCDI,
500499 FeatureDQI,
506505 ]>;
507506
508507 // FIXME: define SKX model
509 class SkylakeServerProc : ProcessorModel
510 [ ProcIntelSKX]>;
508 class SkylakeServerProc : ProcModel
509 SKXFeatures.Value, []>;
511510 def : SkylakeServerProc<"skylake">;
512511 def : SkylakeServerProc<"skx">; // Legacy alias.
513512
514 def ProcIntelCNL : SubtargetFeature<"cnl", "X86ProcFamily", "IntelCNL",
515 " Intel Cannonlake Processor", [
516 ProcIntelSKX,
513 def CNLFeatures : ProcessorFeatures
517514 FeatureVBMI,
518515 FeatureIFMA,
519516 FeatureSHA
520517 ]>;
521518
522 class CannonlakeProc : ProcessorModel
523 [ ProcIntelCNL ]>;
519 class CannonlakeProc : ProcModel
520 CNLFeatures.Value, []>;
524521 def : CannonlakeProc<"cannonlake">;
525522 def : CannonlakeProc<"cnl">;
526523
5454 };
5555
5656 enum X86ProcFamilyEnum {
57 Others, IntelAtom, IntelSLM, IntelSNB, IntelIVB, IntelHSW, IntelBDW,
58 IntelKNL, IntelSKL, IntelSKX, IntelCNL
57 Others, IntelAtom, IntelSLM
5958 };
6059
6160 /// X86 processor family: Intel Atom, and others