]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/X86/X86Subtarget.h
Merge llvm, clang, lld and lldb trunk r300890, and update build glue.
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / X86 / X86Subtarget.h
1 //===-- X86Subtarget.h - Define Subtarget for the X86 ----------*- C++ -*--===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the X86 specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_LIB_TARGET_X86_X86SUBTARGET_H
15 #define LLVM_LIB_TARGET_X86_X86SUBTARGET_H
16
17 #include "X86FrameLowering.h"
18 #include "X86ISelLowering.h"
19 #include "X86InstrInfo.h"
20 #include "X86SelectionDAGInfo.h"
21 #include "llvm/ADT/StringRef.h"
22 #include "llvm/ADT/Triple.h"
23 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
24 #include "llvm/IR/CallingConv.h"
25 #include "llvm/MC/MCInstrItineraries.h"
26 #include "llvm/Target/TargetMachine.h"
27 #include "llvm/Target/TargetSubtargetInfo.h"
28 #include <memory>
29
30 #define GET_SUBTARGETINFO_HEADER
31 #include "X86GenSubtargetInfo.inc"
32
33 namespace llvm {
34
35 class GlobalValue;
36
37 /// The X86 backend supports a number of different styles of PIC.
38 ///
39 namespace PICStyles {
40
41 enum Style {
42   StubPIC,          // Used on i386-darwin in pic mode.
43   GOT,              // Used on 32 bit elf on when in pic mode.
44   RIPRel,           // Used on X86-64 when in pic mode.
45   None              // Set when not in pic mode.
46 };
47
48 } // end namespace PICStyles
49
50 class X86Subtarget final : public X86GenSubtargetInfo {
51 protected:
52   enum X86SSEEnum {
53     NoSSE, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, AVX, AVX2, AVX512F
54   };
55
56   enum X863DNowEnum {
57     NoThreeDNow, MMX, ThreeDNow, ThreeDNowA
58   };
59
60   enum X86ProcFamilyEnum {
61     Others, IntelAtom, IntelSLM
62   };
63
64   /// X86 processor family: Intel Atom, and others
65   X86ProcFamilyEnum X86ProcFamily;
66
67   /// Which PIC style to use
68   PICStyles::Style PICStyle;
69
70   const TargetMachine &TM;
71
72   /// SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
73   X86SSEEnum X86SSELevel;
74
75   /// MMX, 3DNow, 3DNow Athlon, or none supported.
76   X863DNowEnum X863DNowLevel;
77
78   /// True if the processor supports X87 instructions.
79   bool HasX87;
80
81   /// True if this processor has conditional move instructions
82   /// (generally pentium pro+).
83   bool HasCMov;
84
85   /// True if the processor supports X86-64 instructions.
86   bool HasX86_64;
87
88   /// True if the processor supports POPCNT.
89   bool HasPOPCNT;
90
91   /// True if the processor supports SSE4A instructions.
92   bool HasSSE4A;
93
94   /// Target has AES instructions
95   bool HasAES;
96
97   /// Target has FXSAVE/FXRESTOR instructions
98   bool HasFXSR;
99
100   /// Target has XSAVE instructions
101   bool HasXSAVE;
102
103   /// Target has XSAVEOPT instructions
104   bool HasXSAVEOPT;
105
106   /// Target has XSAVEC instructions
107   bool HasXSAVEC;
108
109   /// Target has XSAVES instructions
110   bool HasXSAVES;
111
112   /// Target has carry-less multiplication
113   bool HasPCLMUL;
114
115   /// Target has 3-operand fused multiply-add
116   bool HasFMA;
117
118   /// Target has 4-operand fused multiply-add
119   bool HasFMA4;
120
121   /// Target has XOP instructions
122   bool HasXOP;
123
124   /// Target has TBM instructions.
125   bool HasTBM;
126
127   /// True if the processor has the MOVBE instruction.
128   bool HasMOVBE;
129
130   /// True if the processor has the RDRAND instruction.
131   bool HasRDRAND;
132
133   /// Processor has 16-bit floating point conversion instructions.
134   bool HasF16C;
135
136   /// Processor has FS/GS base insturctions.
137   bool HasFSGSBase;
138
139   /// Processor has LZCNT instruction.
140   bool HasLZCNT;
141
142   /// Processor has BMI1 instructions.
143   bool HasBMI;
144
145   /// Processor has BMI2 instructions.
146   bool HasBMI2;
147
148   /// Processor has VBMI instructions.
149   bool HasVBMI;
150
151   /// Processor has Integer Fused Multiply Add
152   bool HasIFMA;
153
154   /// Processor has RTM instructions.
155   bool HasRTM;
156
157   /// Processor has ADX instructions.
158   bool HasADX;
159
160   /// Processor has SHA instructions.
161   bool HasSHA;
162
163   /// Processor has PRFCHW instructions.
164   bool HasPRFCHW;
165
166   /// Processor has RDSEED instructions.
167   bool HasRDSEED;
168
169   /// Processor has LAHF/SAHF instructions.
170   bool HasLAHFSAHF;
171
172   /// Processor has MONITORX/MWAITX instructions.
173   bool HasMWAITX;
174
175   /// Processor has Cache Line Zero instruction
176   bool HasCLZERO;
177
178   /// Processor has Prefetch with intent to Write instruction
179   bool HasPFPREFETCHWT1;
180
181   /// True if BT (bit test) of memory instructions are slow.
182   bool IsBTMemSlow;
183
184   /// True if SHLD instructions are slow.
185   bool IsSHLDSlow;
186
187   /// True if the PMULLD instruction is slow compared to PMULLW/PMULHW and
188   //  PMULUDQ.
189   bool IsPMULLDSlow;
190
191   /// True if unaligned memory accesses of 16-bytes are slow.
192   bool IsUAMem16Slow;
193
194   /// True if unaligned memory accesses of 32-bytes are slow.
195   bool IsUAMem32Slow;
196
197   /// True if SSE operations can have unaligned memory operands.
198   /// This may require setting a configuration bit in the processor.
199   bool HasSSEUnalignedMem;
200
201   /// True if this processor has the CMPXCHG16B instruction;
202   /// this is true for most x86-64 chips, but not the first AMD chips.
203   bool HasCmpxchg16b;
204
205   /// True if the LEA instruction should be used for adjusting
206   /// the stack pointer. This is an optimization for Intel Atom processors.
207   bool UseLeaForSP;
208
209   /// True if there is no performance penalty to writing only the lower parts
210   /// of a YMM or ZMM register without clearing the upper part.
211   bool HasFastPartialYMMorZMMWrite;
212
213   /// True if hardware SQRTSS instruction is at least as fast (latency) as
214   /// RSQRTSS followed by a Newton-Raphson iteration.
215   bool HasFastScalarFSQRT;
216
217   /// True if hardware SQRTPS/VSQRTPS instructions are at least as fast
218   /// (throughput) as RSQRTPS/VRSQRTPS followed by a Newton-Raphson iteration.
219   bool HasFastVectorFSQRT;
220
221   /// True if 8-bit divisions are significantly faster than
222   /// 32-bit divisions and should be used when possible.
223   bool HasSlowDivide32;
224
225   /// True if 32-bit divides are significantly faster than
226   /// 64-bit divisions and should be used when possible.
227   bool HasSlowDivide64;
228
229   /// True if LZCNT instruction is fast.
230   bool HasFastLZCNT;
231
232   /// True if SHLD based rotate is fast.
233   bool HasFastSHLDRotate;
234
235   /// True if the short functions should be padded to prevent
236   /// a stall when returning too early.
237   bool PadShortFunctions;
238
239   /// True if the Calls with memory reference should be converted
240   /// to a register-based indirect call.
241   bool CallRegIndirect;
242
243   /// True if the LEA instruction inputs have to be ready at address generation
244   /// (AG) time.
245   bool LEAUsesAG;
246
247   /// True if the LEA instruction with certain arguments is slow
248   bool SlowLEA;
249
250   /// True if INC and DEC instructions are slow when writing to flags
251   bool SlowIncDec;
252
253   /// Processor has AVX-512 PreFetch Instructions
254   bool HasPFI;
255
256   /// Processor has AVX-512 Exponential and Reciprocal Instructions
257   bool HasERI;
258
259   /// Processor has AVX-512 Conflict Detection Instructions
260   bool HasCDI;
261
262   /// Processor has AVX-512 Doubleword and Quadword instructions
263   bool HasDQI;
264
265   /// Processor has AVX-512 Byte and Word instructions
266   bool HasBWI;
267
268   /// Processor has AVX-512 Vector Length eXtenstions
269   bool HasVLX;
270
271   /// Processor has PKU extenstions
272   bool HasPKU;
273
274   /// Processor supports MPX - Memory Protection Extensions
275   bool HasMPX;
276
277   /// Processor has Software Guard Extensions
278   bool HasSGX;
279
280   /// Processor supports Flush Cache Line instruction
281   bool HasCLFLUSHOPT;
282
283   /// Processor supports Cache Line Write Back instruction
284   bool HasCLWB;
285
286   /// Use software floating point for code generation.
287   bool UseSoftFloat;
288
289   /// The minimum alignment known to hold of the stack frame on
290   /// entry to the function and which must be maintained by every function.
291   unsigned stackAlignment;
292
293   /// Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.
294   ///
295   unsigned MaxInlineSizeThreshold;
296
297   /// What processor and OS we're targeting.
298   Triple TargetTriple;
299
300   /// Instruction itineraries for scheduling
301   InstrItineraryData InstrItins;
302
303   /// Gather the accessor points to GlobalISel-related APIs.
304   /// This is used to avoid ifndefs spreading around while GISel is
305   /// an optional library.
306   std::unique_ptr<GISelAccessor> GISel;
307
308 private:
309   /// Override the stack alignment.
310   unsigned StackAlignOverride;
311
312   /// True if compiling for 64-bit, false for 16-bit or 32-bit.
313   bool In64BitMode;
314
315   /// True if compiling for 32-bit, false for 16-bit or 64-bit.
316   bool In32BitMode;
317
318   /// True if compiling for 16-bit, false for 32-bit or 64-bit.
319   bool In16BitMode;
320
321   X86SelectionDAGInfo TSInfo;
322   // Ordering here is important. X86InstrInfo initializes X86RegisterInfo which
323   // X86TargetLowering needs.
324   X86InstrInfo InstrInfo;
325   X86TargetLowering TLInfo;
326   X86FrameLowering FrameLowering;
327
328 public:
329   /// This constructor initializes the data members to match that
330   /// of the specified triple.
331   ///
332   X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS,
333                const X86TargetMachine &TM, unsigned StackAlignOverride);
334
335   /// This object will take onwership of \p GISelAccessor.
336   void setGISelAccessor(GISelAccessor &GISel) { this->GISel.reset(&GISel); }
337
338   const X86TargetLowering *getTargetLowering() const override {
339     return &TLInfo;
340   }
341
342   const X86InstrInfo *getInstrInfo() const override { return &InstrInfo; }
343
344   const X86FrameLowering *getFrameLowering() const override {
345     return &FrameLowering;
346   }
347
348   const X86SelectionDAGInfo *getSelectionDAGInfo() const override {
349     return &TSInfo;
350   }
351
352   const X86RegisterInfo *getRegisterInfo() const override {
353     return &getInstrInfo()->getRegisterInfo();
354   }
355
356   /// Returns the minimum alignment known to hold of the
357   /// stack frame on entry to the function and which must be maintained by every
358   /// function for this subtarget.
359   unsigned getStackAlignment() const { return stackAlignment; }
360
361   /// Returns the maximum memset / memcpy size
362   /// that still makes it profitable to inline the call.
363   unsigned getMaxInlineSizeThreshold() const { return MaxInlineSizeThreshold; }
364
365   /// ParseSubtargetFeatures - Parses features string setting specified
366   /// subtarget options.  Definition of function is auto generated by tblgen.
367   void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
368
369   /// Methods used by Global ISel
370   const CallLowering *getCallLowering() const override;
371   const InstructionSelector *getInstructionSelector() const override;
372   const LegalizerInfo *getLegalizerInfo() const override;
373   const RegisterBankInfo *getRegBankInfo() const override;
374
375 private:
376   /// Initialize the full set of dependencies so we can use an initializer
377   /// list for X86Subtarget.
378   X86Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
379   void initializeEnvironment();
380   void initSubtargetFeatures(StringRef CPU, StringRef FS);
381
382 public:
383   /// Is this x86_64? (disregarding specific ABI / programming model)
384   bool is64Bit() const {
385     return In64BitMode;
386   }
387
388   bool is32Bit() const {
389     return In32BitMode;
390   }
391
392   bool is16Bit() const {
393     return In16BitMode;
394   }
395
396   /// Is this x86_64 with the ILP32 programming model (x32 ABI)?
397   bool isTarget64BitILP32() const {
398     return In64BitMode && (TargetTriple.getEnvironment() == Triple::GNUX32 ||
399                            TargetTriple.isOSNaCl());
400   }
401
402   /// Is this x86_64 with the LP64 programming model (standard AMD64, no x32)?
403   bool isTarget64BitLP64() const {
404     return In64BitMode && (TargetTriple.getEnvironment() != Triple::GNUX32 &&
405                            !TargetTriple.isOSNaCl());
406   }
407
408   PICStyles::Style getPICStyle() const { return PICStyle; }
409   void setPICStyle(PICStyles::Style Style)  { PICStyle = Style; }
410
411   bool hasX87() const { return HasX87; }
412   bool hasCMov() const { return HasCMov; }
413   bool hasSSE1() const { return X86SSELevel >= SSE1; }
414   bool hasSSE2() const { return X86SSELevel >= SSE2; }
415   bool hasSSE3() const { return X86SSELevel >= SSE3; }
416   bool hasSSSE3() const { return X86SSELevel >= SSSE3; }
417   bool hasSSE41() const { return X86SSELevel >= SSE41; }
418   bool hasSSE42() const { return X86SSELevel >= SSE42; }
419   bool hasAVX() const { return X86SSELevel >= AVX; }
420   bool hasAVX2() const { return X86SSELevel >= AVX2; }
421   bool hasAVX512() const { return X86SSELevel >= AVX512F; }
422   bool hasFp256() const { return hasAVX(); }
423   bool hasInt256() const { return hasAVX2(); }
424   bool hasSSE4A() const { return HasSSE4A; }
425   bool hasMMX() const { return X863DNowLevel >= MMX; }
426   bool has3DNow() const { return X863DNowLevel >= ThreeDNow; }
427   bool has3DNowA() const { return X863DNowLevel >= ThreeDNowA; }
428   bool hasPOPCNT() const { return HasPOPCNT; }
429   bool hasAES() const { return HasAES; }
430   bool hasFXSR() const { return HasFXSR; }
431   bool hasXSAVE() const { return HasXSAVE; }
432   bool hasXSAVEOPT() const { return HasXSAVEOPT; }
433   bool hasXSAVEC() const { return HasXSAVEC; }
434   bool hasXSAVES() const { return HasXSAVES; }
435   bool hasPCLMUL() const { return HasPCLMUL; }
436   // Prefer FMA4 to FMA - its better for commutation/memory folding and
437   // has equal or better performance on all supported targets.
438   bool hasFMA() const { return (HasFMA || hasAVX512()) && !HasFMA4; }
439   bool hasFMA4() const { return HasFMA4; }
440   bool hasAnyFMA() const { return hasFMA() || hasFMA4(); }
441   bool hasXOP() const { return HasXOP; }
442   bool hasTBM() const { return HasTBM; }
443   bool hasMOVBE() const { return HasMOVBE; }
444   bool hasRDRAND() const { return HasRDRAND; }
445   bool hasF16C() const { return HasF16C; }
446   bool hasFSGSBase() const { return HasFSGSBase; }
447   bool hasLZCNT() const { return HasLZCNT; }
448   bool hasBMI() const { return HasBMI; }
449   bool hasBMI2() const { return HasBMI2; }
450   bool hasVBMI() const { return HasVBMI; }
451   bool hasIFMA() const { return HasIFMA; }
452   bool hasRTM() const { return HasRTM; }
453   bool hasADX() const { return HasADX; }
454   bool hasSHA() const { return HasSHA; }
455   bool hasPRFCHW() const { return HasPRFCHW; }
456   bool hasRDSEED() const { return HasRDSEED; }
457   bool hasLAHFSAHF() const { return HasLAHFSAHF; }
458   bool hasMWAITX() const { return HasMWAITX; }
459   bool hasCLZERO() const { return HasCLZERO; }
460   bool isBTMemSlow() const { return IsBTMemSlow; }
461   bool isSHLDSlow() const { return IsSHLDSlow; }
462   bool isPMULLDSlow() const { return IsPMULLDSlow; }
463   bool isUnalignedMem16Slow() const { return IsUAMem16Slow; }
464   bool isUnalignedMem32Slow() const { return IsUAMem32Slow; }
465   bool hasSSEUnalignedMem() const { return HasSSEUnalignedMem; }
466   bool hasCmpxchg16b() const { return HasCmpxchg16b; }
467   bool useLeaForSP() const { return UseLeaForSP; }
468   bool hasFastPartialYMMorZMMWrite() const {
469     return HasFastPartialYMMorZMMWrite;
470   }
471   bool hasFastScalarFSQRT() const { return HasFastScalarFSQRT; }
472   bool hasFastVectorFSQRT() const { return HasFastVectorFSQRT; }
473   bool hasFastLZCNT() const { return HasFastLZCNT; }
474   bool hasFastSHLDRotate() const { return HasFastSHLDRotate; }
475   bool hasSlowDivide32() const { return HasSlowDivide32; }
476   bool hasSlowDivide64() const { return HasSlowDivide64; }
477   bool padShortFunctions() const { return PadShortFunctions; }
478   bool callRegIndirect() const { return CallRegIndirect; }
479   bool LEAusesAG() const { return LEAUsesAG; }
480   bool slowLEA() const { return SlowLEA; }
481   bool slowIncDec() const { return SlowIncDec; }
482   bool hasCDI() const { return HasCDI; }
483   bool hasPFI() const { return HasPFI; }
484   bool hasERI() const { return HasERI; }
485   bool hasDQI() const { return HasDQI; }
486   bool hasBWI() const { return HasBWI; }
487   bool hasVLX() const { return HasVLX; }
488   bool hasPKU() const { return HasPKU; }
489   bool hasMPX() const { return HasMPX; }
490   bool hasCLFLUSHOPT() const { return HasCLFLUSHOPT; }
491
492   bool isXRaySupported() const override { return is64Bit(); }
493
494   bool isAtom() const { return X86ProcFamily == IntelAtom; }
495   bool isSLM() const { return X86ProcFamily == IntelSLM; }
496   bool useSoftFloat() const { return UseSoftFloat; }
497
498   /// Use mfence if we have SSE2 or we're on x86-64 (even if we asked for
499   /// no-sse2). There isn't any reason to disable it if the target processor
500   /// supports it.
501   bool hasMFence() const { return hasSSE2() || is64Bit(); }
502
503   const Triple &getTargetTriple() const { return TargetTriple; }
504
505   bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
506   bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); }
507   bool isTargetDragonFly() const { return TargetTriple.isOSDragonFly(); }
508   bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); }
509   bool isTargetPS4() const { return TargetTriple.isPS4CPU(); }
510
511   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
512   bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); }
513   bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
514
515   bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
516   bool isTargetKFreeBSD() const { return TargetTriple.isOSKFreeBSD(); }
517   bool isTargetGlibc() const { return TargetTriple.isOSGlibc(); }
518   bool isTargetAndroid() const { return TargetTriple.isAndroid(); }
519   bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); }
520   bool isTargetNaCl32() const { return isTargetNaCl() && !is64Bit(); }
521   bool isTargetNaCl64() const { return isTargetNaCl() && is64Bit(); }
522   bool isTargetMCU() const { return TargetTriple.isOSIAMCU(); }
523   bool isTargetFuchsia() const { return TargetTriple.isOSFuchsia(); }
524
525   bool isTargetWindowsMSVC() const {
526     return TargetTriple.isWindowsMSVCEnvironment();
527   }
528
529   bool isTargetKnownWindowsMSVC() const {
530     return TargetTriple.isKnownWindowsMSVCEnvironment();
531   }
532
533   bool isTargetWindowsCoreCLR() const {
534     return TargetTriple.isWindowsCoreCLREnvironment();
535   }
536
537   bool isTargetWindowsCygwin() const {
538     return TargetTriple.isWindowsCygwinEnvironment();
539   }
540
541   bool isTargetWindowsGNU() const {
542     return TargetTriple.isWindowsGNUEnvironment();
543   }
544
545   bool isTargetWindowsItanium() const {
546     return TargetTriple.isWindowsItaniumEnvironment();
547   }
548
549   bool isTargetCygMing() const { return TargetTriple.isOSCygMing(); }
550
551   bool isOSWindows() const { return TargetTriple.isOSWindows(); }
552
553   bool isTargetWin64() const {
554     return In64BitMode && TargetTriple.isOSWindows();
555   }
556
557   bool isTargetWin32() const {
558     return !In64BitMode && (isTargetCygMing() || isTargetKnownWindowsMSVC());
559   }
560
561   bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; }
562   bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; }
563
564   bool isPICStyleStubPIC() const {
565     return PICStyle == PICStyles::StubPIC;
566   }
567
568   bool isPositionIndependent() const { return TM.isPositionIndependent(); }
569
570   bool isCallingConvWin64(CallingConv::ID CC) const {
571     switch (CC) {
572     // On Win64, all these conventions just use the default convention.
573     case CallingConv::C:
574     case CallingConv::Fast:
575     case CallingConv::X86_FastCall:
576     case CallingConv::X86_StdCall:
577     case CallingConv::X86_ThisCall:
578     case CallingConv::X86_VectorCall:
579     case CallingConv::Intel_OCL_BI:
580       return isTargetWin64();
581     // This convention allows using the Win64 convention on other targets.
582     case CallingConv::X86_64_Win64:
583       return true;
584     // This convention allows using the SysV convention on Windows targets.
585     case CallingConv::X86_64_SysV:
586       return false;
587     // Otherwise, who knows what this is.
588     default:
589       return false;
590     }
591   }
592
593   /// Classify a global variable reference for the current subtarget according
594   /// to how we should reference it in a non-pcrel context.
595   unsigned char classifyLocalReference(const GlobalValue *GV) const;
596
597   unsigned char classifyGlobalReference(const GlobalValue *GV,
598                                         const Module &M) const;
599   unsigned char classifyGlobalReference(const GlobalValue *GV) const;
600
601   /// Classify a global function reference for the current subtarget.
602   unsigned char classifyGlobalFunctionReference(const GlobalValue *GV,
603                                                 const Module &M) const;
604   unsigned char classifyGlobalFunctionReference(const GlobalValue *GV) const;
605
606   /// Classify a blockaddress reference for the current subtarget according to
607   /// how we should reference it in a non-pcrel context.
608   unsigned char classifyBlockAddressReference() const;
609
610   /// Return true if the subtarget allows calls to immediate address.
611   bool isLegalToCallImmediateAddr() const;
612
613   /// This function returns the name of a function which has an interface
614   /// like the non-standard bzero function, if such a function exists on
615   /// the current subtarget and it is considered prefereable over
616   /// memset with zero passed as the second argument. Otherwise it
617   /// returns null.
618   const char *getBZeroEntry() const;
619
620   /// This function returns true if the target has sincos() routine in its
621   /// compiler runtime or math libraries.
622   bool hasSinCos() const;
623
624   /// Enable the MachineScheduler pass for all X86 subtargets.
625   bool enableMachineScheduler() const override { return true; }
626
627   // TODO: Update the regression tests and return true.
628   bool supportPrintSchedInfo() const override { return false; }
629
630   bool enableEarlyIfConversion() const override;
631
632   /// Return the instruction itineraries based on the subtarget selection.
633   const InstrItineraryData *getInstrItineraryData() const override {
634     return &InstrItins;
635   }
636
637   AntiDepBreakMode getAntiDepBreakMode() const override {
638     return TargetSubtargetInfo::ANTIDEP_CRITICAL;
639   }
640 };
641
642 } // end namespace llvm
643
644 #endif // LLVM_LIB_TARGET_X86_X86SUBTARGET_H