LLVM  9.0.0svn
X86Subtarget.h
Go to the documentation of this file.
1 //===-- X86Subtarget.h - Define Subtarget for the X86 ----------*- C++ -*--===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the X86 specific subclass of TargetSubtargetInfo.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_X86_X86SUBTARGET_H
14 #define LLVM_LIB_TARGET_X86_X86SUBTARGET_H
15 
16 #include "X86FrameLowering.h"
17 #include "X86ISelLowering.h"
18 #include "X86InstrInfo.h"
19 #include "X86SelectionDAGInfo.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ADT/Triple.h"
27 #include "llvm/IR/CallingConv.h"
29 #include <climits>
30 #include <memory>
31 
32 #define GET_SUBTARGETINFO_HEADER
33 #include "X86GenSubtargetInfo.inc"
34 
35 namespace llvm {
36 
37 class GlobalValue;
38 
39 /// The X86 backend supports a number of different styles of PIC.
40 ///
41 namespace PICStyles {
42 
43 enum Style {
44  StubPIC, // Used on i386-darwin in pic mode.
45  GOT, // Used on 32 bit elf on when in pic mode.
46  RIPRel, // Used on X86-64 when in pic mode.
47  None // Set when not in pic mode.
48 };
49 
50 } // end namespace PICStyles
51 
52 class X86Subtarget final : public X86GenSubtargetInfo {
53 public:
54  // NOTE: Do not add anything new to this list. Coarse, CPU name based flags
55  // are not a good idea. We should be migrating away from these.
62  IntelTRM
63  };
64 
65 protected:
66  enum X86SSEEnum {
67  NoSSE, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, AVX, AVX2, AVX512F
68  };
69 
70  enum X863DNowEnum {
71  NoThreeDNow, MMX, ThreeDNow, ThreeDNowA
72  };
73 
74  /// X86 processor family: Intel Atom, and others
75  X86ProcFamilyEnum X86ProcFamily = Others;
76 
77  /// Which PIC style to use
79 
80  const TargetMachine &TM;
81 
82  /// SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
83  X86SSEEnum X86SSELevel = NoSSE;
84 
85  /// MMX, 3DNow, 3DNow Athlon, or none supported.
86  X863DNowEnum X863DNowLevel = NoThreeDNow;
87 
88  /// True if the processor supports X87 instructions.
89  bool HasX87 = false;
90 
91  /// True if the processor supports CMPXCHG8B.
92  bool HasCmpxchg8b = false;
93 
94  /// True if this processor has NOPL instruction
95  /// (generally pentium pro+).
96  bool HasNOPL = false;
97 
98  /// True if this processor has conditional move instructions
99  /// (generally pentium pro+).
100  bool HasCMov = false;
101 
102  /// True if the processor supports X86-64 instructions.
103  bool HasX86_64 = false;
104 
105  /// True if the processor supports POPCNT.
106  bool HasPOPCNT = false;
107 
108  /// True if the processor supports SSE4A instructions.
109  bool HasSSE4A = false;
110 
111  /// Target has AES instructions
112  bool HasAES = false;
113  bool HasVAES = false;
114 
115  /// Target has FXSAVE/FXRESTOR instructions
116  bool HasFXSR = false;
117 
118  /// Target has XSAVE instructions
119  bool HasXSAVE = false;
120 
121  /// Target has XSAVEOPT instructions
122  bool HasXSAVEOPT = false;
123 
124  /// Target has XSAVEC instructions
125  bool HasXSAVEC = false;
126 
127  /// Target has XSAVES instructions
128  bool HasXSAVES = false;
129 
130  /// Target has carry-less multiplication
131  bool HasPCLMUL = false;
132  bool HasVPCLMULQDQ = false;
133 
134  /// Target has Galois Field Arithmetic instructions
135  bool HasGFNI = false;
136 
137  /// Target has 3-operand fused multiply-add
138  bool HasFMA = false;
139 
140  /// Target has 4-operand fused multiply-add
141  bool HasFMA4 = false;
142 
143  /// Target has XOP instructions
144  bool HasXOP = false;
145 
146  /// Target has TBM instructions.
147  bool HasTBM = false;
148 
149  /// Target has LWP instructions
150  bool HasLWP = false;
151 
152  /// True if the processor has the MOVBE instruction.
153  bool HasMOVBE = false;
154 
155  /// True if the processor has the RDRAND instruction.
156  bool HasRDRAND = false;
157 
158  /// Processor has 16-bit floating point conversion instructions.
159  bool HasF16C = false;
160 
161  /// Processor has FS/GS base insturctions.
162  bool HasFSGSBase = false;
163 
164  /// Processor has LZCNT instruction.
165  bool HasLZCNT = false;
166 
167  /// Processor has BMI1 instructions.
168  bool HasBMI = false;
169 
170  /// Processor has BMI2 instructions.
171  bool HasBMI2 = false;
172 
173  /// Processor has VBMI instructions.
174  bool HasVBMI = false;
175 
176  /// Processor has VBMI2 instructions.
177  bool HasVBMI2 = false;
178 
179  /// Processor has Integer Fused Multiply Add
180  bool HasIFMA = false;
181 
182  /// Processor has RTM instructions.
183  bool HasRTM = false;
184 
185  /// Processor has ADX instructions.
186  bool HasADX = false;
187 
188  /// Processor has SHA instructions.
189  bool HasSHA = false;
190 
191  /// Processor has PRFCHW instructions.
192  bool HasPRFCHW = false;
193 
194  /// Processor has RDSEED instructions.
195  bool HasRDSEED = false;
196 
197  /// Processor has LAHF/SAHF instructions.
198  bool HasLAHFSAHF = false;
199 
200  /// Processor has MONITORX/MWAITX instructions.
201  bool HasMWAITX = false;
202 
203  /// Processor has Cache Line Zero instruction
204  bool HasCLZERO = false;
205 
206  /// Processor has Cache Line Demote instruction
207  bool HasCLDEMOTE = false;
208 
209  /// Processor has MOVDIRI instruction (direct store integer).
210  bool HasMOVDIRI = false;
211 
212  /// Processor has MOVDIR64B instruction (direct store 64 bytes).
213  bool HasMOVDIR64B = false;
214 
215  /// Processor has ptwrite instruction.
216  bool HasPTWRITE = false;
217 
218  /// Processor has Prefetch with intent to Write instruction
219  bool HasPREFETCHWT1 = false;
220 
221  /// True if SHLD instructions are slow.
222  bool IsSHLDSlow = false;
223 
224  /// True if the PMULLD instruction is slow compared to PMULLW/PMULHW and
225  // PMULUDQ.
226  bool IsPMULLDSlow = false;
227 
228  /// True if the PMADDWD instruction is slow compared to PMULLD.
229  bool IsPMADDWDSlow = false;
230 
231  /// True if unaligned memory accesses of 16-bytes are slow.
232  bool IsUAMem16Slow = false;
233 
234  /// True if unaligned memory accesses of 32-bytes are slow.
235  bool IsUAMem32Slow = false;
236 
237  /// True if SSE operations can have unaligned memory operands.
238  /// This may require setting a configuration bit in the processor.
239  bool HasSSEUnalignedMem = false;
240 
241  /// True if this processor has the CMPXCHG16B instruction;
242  /// this is true for most x86-64 chips, but not the first AMD chips.
243  bool HasCmpxchg16b = false;
244 
245  /// True if the LEA instruction should be used for adjusting
246  /// the stack pointer. This is an optimization for Intel Atom processors.
247  bool UseLeaForSP = false;
248 
249  /// True if POPCNT instruction has a false dependency on the destination register.
250  bool HasPOPCNTFalseDeps = false;
251 
252  /// True if LZCNT/TZCNT instructions have a false dependency on the destination register.
253  bool HasLZCNTFalseDeps = false;
254 
255  /// True if its preferable to combine to a single shuffle using a variable
256  /// mask over multiple fixed shuffles.
257  bool HasFastVariableShuffle = false;
258 
259  /// True if there is no performance penalty to writing only the lower parts
260  /// of a YMM or ZMM register without clearing the upper part.
261  bool HasFastPartialYMMorZMMWrite = false;
262 
263  /// True if there is no performance penalty for writing NOPs with up to
264  /// 11 bytes.
265  bool HasFast11ByteNOP = false;
266 
267  /// True if there is no performance penalty for writing NOPs with up to
268  /// 15 bytes.
269  bool HasFast15ByteNOP = false;
270 
271  /// True if gather is reasonably fast. This is true for Skylake client and
272  /// all AVX-512 CPUs.
273  bool HasFastGather = false;
274 
275  /// True if hardware SQRTSS instruction is at least as fast (latency) as
276  /// RSQRTSS followed by a Newton-Raphson iteration.
277  bool HasFastScalarFSQRT = false;
278 
279  /// True if hardware SQRTPS/VSQRTPS instructions are at least as fast
280  /// (throughput) as RSQRTPS/VRSQRTPS followed by a Newton-Raphson iteration.
281  bool HasFastVectorFSQRT = false;
282 
283  /// True if 8-bit divisions are significantly faster than
284  /// 32-bit divisions and should be used when possible.
285  bool HasSlowDivide32 = false;
286 
287  /// True if 32-bit divides are significantly faster than
288  /// 64-bit divisions and should be used when possible.
289  bool HasSlowDivide64 = false;
290 
291  /// True if LZCNT instruction is fast.
292  bool HasFastLZCNT = false;
293 
294  /// True if SHLD based rotate is fast.
295  bool HasFastSHLDRotate = false;
296 
297  /// True if the processor supports macrofusion.
298  bool HasMacroFusion = false;
299 
300  /// True if the processor supports branch fusion.
301  bool HasBranchFusion = false;
302 
303  /// True if the processor has enhanced REP MOVSB/STOSB.
304  bool HasERMSB = false;
305 
306  /// True if the short functions should be padded to prevent
307  /// a stall when returning too early.
308  bool PadShortFunctions = false;
309 
310  /// True if two memory operand instructions should use a temporary register
311  /// instead.
312  bool SlowTwoMemOps = false;
313 
314  /// True if the LEA instruction inputs have to be ready at address generation
315  /// (AG) time.
316  bool LEAUsesAG = false;
317 
318  /// True if the LEA instruction with certain arguments is slow
319  bool SlowLEA = false;
320 
321  /// True if the LEA instruction has all three source operands: base, index,
322  /// and offset or if the LEA instruction uses base and index registers where
323  /// the base is EBP, RBP,or R13
324  bool Slow3OpsLEA = false;
325 
326  /// True if INC and DEC instructions are slow when writing to flags
327  bool SlowIncDec = false;
328 
329  /// Processor has AVX-512 PreFetch Instructions
330  bool HasPFI = false;
331 
332  /// Processor has AVX-512 Exponential and Reciprocal Instructions
333  bool HasERI = false;
334 
335  /// Processor has AVX-512 Conflict Detection Instructions
336  bool HasCDI = false;
337 
338  /// Processor has AVX-512 population count Instructions
339  bool HasVPOPCNTDQ = false;
340 
341  /// Processor has AVX-512 Doubleword and Quadword instructions
342  bool HasDQI = false;
343 
344  /// Processor has AVX-512 Byte and Word instructions
345  bool HasBWI = false;
346 
347  /// Processor has AVX-512 Vector Length eXtenstions
348  bool HasVLX = false;
349 
350  /// Processor has PKU extenstions
351  bool HasPKU = false;
352 
353  /// Processor has AVX-512 Vector Neural Network Instructions
354  bool HasVNNI = false;
355 
356  /// Processor has AVX-512 Bit Algorithms instructions
357  bool HasBITALG = false;
358 
359  /// Processor supports MPX - Memory Protection Extensions
360  bool HasMPX = false;
361 
362  /// Processor supports CET SHSTK - Control-Flow Enforcement Technology
363  /// using Shadow Stack
364  bool HasSHSTK = false;
365 
366  /// Processor supports Invalidate Process-Context Identifier
367  bool HasINVPCID = false;
368 
369  /// Processor has Software Guard Extensions
370  bool HasSGX = false;
371 
372  /// Processor supports Flush Cache Line instruction
373  bool HasCLFLUSHOPT = false;
374 
375  /// Processor supports Cache Line Write Back instruction
376  bool HasCLWB = false;
377 
378  /// Processor supports Write Back No Invalidate instruction
379  bool HasWBNOINVD = false;
380 
381  /// Processor support RDPID instruction
382  bool HasRDPID = false;
383 
384  /// Processor supports WaitPKG instructions
385  bool HasWAITPKG = false;
386 
387  /// Processor supports PCONFIG instruction
388  bool HasPCONFIG = false;
389 
390  /// Processor has a single uop BEXTR implementation.
391  bool HasFastBEXTR = false;
392 
393  /// Try harder to combine to horizontal vector ops if they are fast.
394  bool HasFastHorizontalOps = false;
395 
396  /// Use a retpoline thunk rather than indirect calls to block speculative
397  /// execution.
398  bool UseRetpolineIndirectCalls = false;
399 
400  /// Use a retpoline thunk or remove any indirect branch to block speculative
401  /// execution.
402  bool UseRetpolineIndirectBranches = false;
403 
404  /// Deprecated flag, query `UseRetpolineIndirectCalls` and
405  /// `UseRetpolineIndirectBranches` instead.
406  bool DeprecatedUseRetpoline = false;
407 
408  /// When using a retpoline thunk, call an externally provided thunk rather
409  /// than emitting one inside the compiler.
410  bool UseRetpolineExternalThunk = false;
411 
412  /// Use software floating point for code generation.
413  bool UseSoftFloat = false;
414 
415  /// The minimum alignment known to hold of the stack frame on
416  /// entry to the function and which must be maintained by every function.
417  unsigned stackAlignment = 4;
418 
419  /// Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.
420  ///
421  // FIXME: this is a known good value for Yonah. How about others?
422  unsigned MaxInlineSizeThreshold = 128;
423 
424  /// Indicates target prefers 256 bit instructions.
425  bool Prefer256Bit = false;
426 
427  /// Threeway branch is profitable in this subtarget.
428  bool ThreewayBranchProfitable = false;
429 
430  /// What processor and OS we're targeting.
432 
433  /// GlobalISel related APIs.
434  std::unique_ptr<CallLowering> CallLoweringInfo;
435  std::unique_ptr<LegalizerInfo> Legalizer;
436  std::unique_ptr<RegisterBankInfo> RegBankInfo;
437  std::unique_ptr<InstructionSelector> InstSelector;
438 
439 private:
440  /// Override the stack alignment.
441  unsigned StackAlignOverride;
442 
443  /// Preferred vector width from function attribute.
444  unsigned PreferVectorWidthOverride;
445 
446  /// Resolved preferred vector width from function attribute and subtarget
447  /// features.
448  unsigned PreferVectorWidth = UINT32_MAX;
449 
450  /// Required vector width from function attribute.
451  unsigned RequiredVectorWidth;
452 
453  /// True if compiling for 64-bit, false for 16-bit or 32-bit.
454  bool In64BitMode;
455 
456  /// True if compiling for 32-bit, false for 16-bit or 64-bit.
457  bool In32BitMode;
458 
459  /// True if compiling for 16-bit, false for 32-bit or 64-bit.
460  bool In16BitMode;
461 
462  /// Contains the Overhead of gather\scatter instructions
463  int GatherOverhead = 1024;
464  int ScatterOverhead = 1024;
465 
466  X86SelectionDAGInfo TSInfo;
467  // Ordering here is important. X86InstrInfo initializes X86RegisterInfo which
468  // X86TargetLowering needs.
469  X86InstrInfo InstrInfo;
470  X86TargetLowering TLInfo;
471  X86FrameLowering FrameLowering;
472 
473 public:
474  /// This constructor initializes the data members to match that
475  /// of the specified triple.
476  ///
477  X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS,
478  const X86TargetMachine &TM, unsigned StackAlignOverride,
479  unsigned PreferVectorWidthOverride,
480  unsigned RequiredVectorWidth);
481 
482  const X86TargetLowering *getTargetLowering() const override {
483  return &TLInfo;
484  }
485 
486  const X86InstrInfo *getInstrInfo() const override { return &InstrInfo; }
487 
488  const X86FrameLowering *getFrameLowering() const override {
489  return &FrameLowering;
490  }
491 
492  const X86SelectionDAGInfo *getSelectionDAGInfo() const override {
493  return &TSInfo;
494  }
495 
496  const X86RegisterInfo *getRegisterInfo() const override {
497  return &getInstrInfo()->getRegisterInfo();
498  }
499 
500  /// Returns the minimum alignment known to hold of the
501  /// stack frame on entry to the function and which must be maintained by every
502  /// function for this subtarget.
503  unsigned getStackAlignment() const { return stackAlignment; }
504 
505  /// Returns the maximum memset / memcpy size
506  /// that still makes it profitable to inline the call.
507  unsigned getMaxInlineSizeThreshold() const { return MaxInlineSizeThreshold; }
508 
509  /// ParseSubtargetFeatures - Parses features string setting specified
510  /// subtarget options. Definition of function is auto generated by tblgen.
511  void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
512 
513  /// Methods used by Global ISel
514  const CallLowering *getCallLowering() const override;
515  const InstructionSelector *getInstructionSelector() const override;
516  const LegalizerInfo *getLegalizerInfo() const override;
517  const RegisterBankInfo *getRegBankInfo() const override;
518 
519 private:
520  /// Initialize the full set of dependencies so we can use an initializer
521  /// list for X86Subtarget.
522  X86Subtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
523  void initSubtargetFeatures(StringRef CPU, StringRef FS);
524 
525 public:
526  /// Is this x86_64? (disregarding specific ABI / programming model)
527  bool is64Bit() const {
528  return In64BitMode;
529  }
530 
531  bool is32Bit() const {
532  return In32BitMode;
533  }
534 
535  bool is16Bit() const {
536  return In16BitMode;
537  }
538 
539  /// Is this x86_64 with the ILP32 programming model (x32 ABI)?
540  bool isTarget64BitILP32() const {
541  return In64BitMode && (TargetTriple.getEnvironment() == Triple::GNUX32 ||
542  TargetTriple.isOSNaCl());
543  }
544 
545  /// Is this x86_64 with the LP64 programming model (standard AMD64, no x32)?
546  bool isTarget64BitLP64() const {
547  return In64BitMode && (TargetTriple.getEnvironment() != Triple::GNUX32 &&
548  !TargetTriple.isOSNaCl());
549  }
550 
551  PICStyles::Style getPICStyle() const { return PICStyle; }
552  void setPICStyle(PICStyles::Style Style) { PICStyle = Style; }
553 
554  bool hasX87() const { return HasX87; }
555  bool hasCmpxchg8b() const { return HasCmpxchg8b; }
556  bool hasNOPL() const { return HasNOPL; }
557  // SSE codegen depends on cmovs, and all SSE1+ processors support them.
558  // All 64-bit processors support cmov.
559  bool hasCMov() const { return HasCMov || X86SSELevel >= SSE1 || is64Bit(); }
560  bool hasSSE1() const { return X86SSELevel >= SSE1; }
561  bool hasSSE2() const { return X86SSELevel >= SSE2; }
562  bool hasSSE3() const { return X86SSELevel >= SSE3; }
563  bool hasSSSE3() const { return X86SSELevel >= SSSE3; }
564  bool hasSSE41() const { return X86SSELevel >= SSE41; }
565  bool hasSSE42() const { return X86SSELevel >= SSE42; }
566  bool hasAVX() const { return X86SSELevel >= AVX; }
567  bool hasAVX2() const { return X86SSELevel >= AVX2; }
568  bool hasAVX512() const { return X86SSELevel >= AVX512F; }
569  bool hasInt256() const { return hasAVX2(); }
570  bool hasSSE4A() const { return HasSSE4A; }
571  bool hasMMX() const { return X863DNowLevel >= MMX; }
572  bool has3DNow() const { return X863DNowLevel >= ThreeDNow; }
573  bool has3DNowA() const { return X863DNowLevel >= ThreeDNowA; }
574  bool hasPOPCNT() const { return HasPOPCNT; }
575  bool hasAES() const { return HasAES; }
576  bool hasVAES() const { return HasVAES; }
577  bool hasFXSR() const { return HasFXSR; }
578  bool hasXSAVE() const { return HasXSAVE; }
579  bool hasXSAVEOPT() const { return HasXSAVEOPT; }
580  bool hasXSAVEC() const { return HasXSAVEC; }
581  bool hasXSAVES() const { return HasXSAVES; }
582  bool hasPCLMUL() const { return HasPCLMUL; }
583  bool hasVPCLMULQDQ() const { return HasVPCLMULQDQ; }
584  bool hasGFNI() const { return HasGFNI; }
585  // Prefer FMA4 to FMA - its better for commutation/memory folding and
586  // has equal or better performance on all supported targets.
587  bool hasFMA() const { return HasFMA; }
588  bool hasFMA4() const { return HasFMA4; }
589  bool hasAnyFMA() const { return hasFMA() || hasFMA4(); }
590  bool hasXOP() const { return HasXOP; }
591  bool hasTBM() const { return HasTBM; }
592  bool hasLWP() const { return HasLWP; }
593  bool hasMOVBE() const { return HasMOVBE; }
594  bool hasRDRAND() const { return HasRDRAND; }
595  bool hasF16C() const { return HasF16C; }
596  bool hasFSGSBase() const { return HasFSGSBase; }
597  bool hasLZCNT() const { return HasLZCNT; }
598  bool hasBMI() const { return HasBMI; }
599  bool hasBMI2() const { return HasBMI2; }
600  bool hasVBMI() const { return HasVBMI; }
601  bool hasVBMI2() const { return HasVBMI2; }
602  bool hasIFMA() const { return HasIFMA; }
603  bool hasRTM() const { return HasRTM; }
604  bool hasADX() const { return HasADX; }
605  bool hasSHA() const { return HasSHA; }
606  bool hasPRFCHW() const { return HasPRFCHW || HasPREFETCHWT1; }
607  bool hasPREFETCHWT1() const { return HasPREFETCHWT1; }
608  bool hasSSEPrefetch() const {
609  // We implicitly enable these when we have a write prefix supporting cache
610  // level OR if we have prfchw, but don't already have a read prefetch from
611  // 3dnow.
612  return hasSSE1() || (hasPRFCHW() && !has3DNow()) || hasPREFETCHWT1();
613  }
614  bool hasRDSEED() const { return HasRDSEED; }
615  bool hasLAHFSAHF() const { return HasLAHFSAHF; }
616  bool hasMWAITX() const { return HasMWAITX; }
617  bool hasCLZERO() const { return HasCLZERO; }
618  bool hasCLDEMOTE() const { return HasCLDEMOTE; }
619  bool hasMOVDIRI() const { return HasMOVDIRI; }
620  bool hasMOVDIR64B() const { return HasMOVDIR64B; }
621  bool hasPTWRITE() const { return HasPTWRITE; }
622  bool isSHLDSlow() const { return IsSHLDSlow; }
623  bool isPMULLDSlow() const { return IsPMULLDSlow; }
624  bool isPMADDWDSlow() const { return IsPMADDWDSlow; }
625  bool isUnalignedMem16Slow() const { return IsUAMem16Slow; }
626  bool isUnalignedMem32Slow() const { return IsUAMem32Slow; }
627  int getGatherOverhead() const { return GatherOverhead; }
628  int getScatterOverhead() const { return ScatterOverhead; }
629  bool hasSSEUnalignedMem() const { return HasSSEUnalignedMem; }
630  bool hasCmpxchg16b() const { return HasCmpxchg16b && is64Bit(); }
631  bool useLeaForSP() const { return UseLeaForSP; }
632  bool hasPOPCNTFalseDeps() const { return HasPOPCNTFalseDeps; }
633  bool hasLZCNTFalseDeps() const { return HasLZCNTFalseDeps; }
634  bool hasFastVariableShuffle() const {
635  return HasFastVariableShuffle;
636  }
638  return HasFastPartialYMMorZMMWrite;
639  }
640  bool hasFastGather() const { return HasFastGather; }
641  bool hasFastScalarFSQRT() const { return HasFastScalarFSQRT; }
642  bool hasFastVectorFSQRT() const { return HasFastVectorFSQRT; }
643  bool hasFastLZCNT() const { return HasFastLZCNT; }
644  bool hasFastSHLDRotate() const { return HasFastSHLDRotate; }
645  bool hasFastBEXTR() const { return HasFastBEXTR; }
646  bool hasFastHorizontalOps() const { return HasFastHorizontalOps; }
647  bool hasMacroFusion() const { return HasMacroFusion; }
648  bool hasBranchFusion() const { return HasBranchFusion; }
649  bool hasERMSB() const { return HasERMSB; }
650  bool hasSlowDivide32() const { return HasSlowDivide32; }
651  bool hasSlowDivide64() const { return HasSlowDivide64; }
652  bool padShortFunctions() const { return PadShortFunctions; }
653  bool slowTwoMemOps() const { return SlowTwoMemOps; }
654  bool LEAusesAG() const { return LEAUsesAG; }
655  bool slowLEA() const { return SlowLEA; }
656  bool slow3OpsLEA() const { return Slow3OpsLEA; }
657  bool slowIncDec() const { return SlowIncDec; }
658  bool hasCDI() const { return HasCDI; }
659  bool hasVPOPCNTDQ() const { return HasVPOPCNTDQ; }
660  bool hasPFI() const { return HasPFI; }
661  bool hasERI() const { return HasERI; }
662  bool hasDQI() const { return HasDQI; }
663  bool hasBWI() const { return HasBWI; }
664  bool hasVLX() const { return HasVLX; }
665  bool hasPKU() const { return HasPKU; }
666  bool hasVNNI() const { return HasVNNI; }
667  bool hasBITALG() const { return HasBITALG; }
668  bool hasMPX() const { return HasMPX; }
669  bool hasSHSTK() const { return HasSHSTK; }
670  bool hasCLFLUSHOPT() const { return HasCLFLUSHOPT; }
671  bool hasCLWB() const { return HasCLWB; }
672  bool hasWBNOINVD() const { return HasWBNOINVD; }
673  bool hasRDPID() const { return HasRDPID; }
674  bool hasWAITPKG() const { return HasWAITPKG; }
675  bool hasPCONFIG() const { return HasPCONFIG; }
676  bool hasSGX() const { return HasSGX; }
677  bool threewayBranchProfitable() const { return ThreewayBranchProfitable; }
678  bool hasINVPCID() const { return HasINVPCID; }
679  bool useRetpolineIndirectCalls() const { return UseRetpolineIndirectCalls; }
681  return UseRetpolineIndirectBranches;
682  }
683  bool useRetpolineExternalThunk() const { return UseRetpolineExternalThunk; }
684 
685  unsigned getPreferVectorWidth() const { return PreferVectorWidth; }
686  unsigned getRequiredVectorWidth() const { return RequiredVectorWidth; }
687 
688  // Helper functions to determine when we should allow widening to 512-bit
689  // during codegen.
690  // TODO: Currently we're always allowing widening on CPUs without VLX,
691  // because for many cases we don't have a better option.
692  bool canExtendTo512DQ() const {
693  return hasAVX512() && (!hasVLX() || getPreferVectorWidth() >= 512);
694  }
695  bool canExtendTo512BW() const {
696  return hasBWI() && canExtendTo512DQ();
697  }
698 
699  // If there are no 512-bit vectors and we prefer not to use 512-bit registers,
700  // disable them in the legalizer.
701  bool useAVX512Regs() const {
702  return hasAVX512() && (canExtendTo512DQ() || RequiredVectorWidth > 256);
703  }
704 
705  bool useBWIRegs() const {
706  return hasBWI() && useAVX512Regs();
707  }
708 
709  bool isXRaySupported() const override { return is64Bit(); }
710 
711  X86ProcFamilyEnum getProcFamily() const { return X86ProcFamily; }
712 
713  /// TODO: to be removed later and replaced with suitable properties
714  bool isAtom() const { return X86ProcFamily == IntelAtom; }
715  bool isSLM() const { return X86ProcFamily == IntelSLM; }
716  bool isGLM() const {
717  return X86ProcFamily == IntelGLM ||
718  X86ProcFamily == IntelGLP ||
719  X86ProcFamily == IntelTRM;
720  }
721  bool useSoftFloat() const { return UseSoftFloat; }
722 
723  /// Use mfence if we have SSE2 or we're on x86-64 (even if we asked for
724  /// no-sse2). There isn't any reason to disable it if the target processor
725  /// supports it.
726  bool hasMFence() const { return hasSSE2() || is64Bit(); }
727 
728  const Triple &getTargetTriple() const { return TargetTriple; }
729 
730  bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
731  bool isTargetFreeBSD() const { return TargetTriple.isOSFreeBSD(); }
732  bool isTargetDragonFly() const { return TargetTriple.isOSDragonFly(); }
733  bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); }
734  bool isTargetPS4() const { return TargetTriple.isPS4CPU(); }
735 
736  bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
737  bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); }
738  bool isTargetMachO() const { return TargetTriple.isOSBinFormatMachO(); }
739 
740  bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
741  bool isTargetKFreeBSD() const { return TargetTriple.isOSKFreeBSD(); }
742  bool isTargetGlibc() const { return TargetTriple.isOSGlibc(); }
743  bool isTargetAndroid() const { return TargetTriple.isAndroid(); }
744  bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); }
745  bool isTargetNaCl32() const { return isTargetNaCl() && !is64Bit(); }
746  bool isTargetNaCl64() const { return isTargetNaCl() && is64Bit(); }
747  bool isTargetMCU() const { return TargetTriple.isOSIAMCU(); }
748  bool isTargetFuchsia() const { return TargetTriple.isOSFuchsia(); }
749 
750  bool isTargetWindowsMSVC() const {
751  return TargetTriple.isWindowsMSVCEnvironment();
752  }
753 
755  return TargetTriple.isKnownWindowsMSVCEnvironment();
756  }
757 
758  bool isTargetWindowsCoreCLR() const {
759  return TargetTriple.isWindowsCoreCLREnvironment();
760  }
761 
762  bool isTargetWindowsCygwin() const {
763  return TargetTriple.isWindowsCygwinEnvironment();
764  }
765 
766  bool isTargetWindowsGNU() const {
767  return TargetTriple.isWindowsGNUEnvironment();
768  }
769 
770  bool isTargetWindowsItanium() const {
771  return TargetTriple.isWindowsItaniumEnvironment();
772  }
773 
774  bool isTargetCygMing() const { return TargetTriple.isOSCygMing(); }
775 
776  bool isOSWindows() const { return TargetTriple.isOSWindows(); }
777 
778  bool isTargetWin64() const { return In64BitMode && isOSWindows(); }
779 
780  bool isTargetWin32() const { return !In64BitMode && isOSWindows(); }
781 
782  bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; }
783  bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; }
784 
785  bool isPICStyleStubPIC() const {
786  return PICStyle == PICStyles::StubPIC;
787  }
788 
789  bool isPositionIndependent() const { return TM.isPositionIndependent(); }
790 
792  switch (CC) {
793  // On Win64, all these conventions just use the default convention.
794  case CallingConv::C:
795  case CallingConv::Fast:
796  case CallingConv::Swift:
802  return isTargetWin64();
803  // This convention allows using the Win64 convention on other targets.
804  case CallingConv::Win64:
805  return true;
806  // This convention allows using the SysV convention on Windows targets.
808  return false;
809  // Otherwise, who knows what this is.
810  default:
811  return false;
812  }
813  }
814 
815  /// Classify a global variable reference for the current subtarget according
816  /// to how we should reference it in a non-pcrel context.
817  unsigned char classifyLocalReference(const GlobalValue *GV) const;
818 
819  unsigned char classifyGlobalReference(const GlobalValue *GV,
820  const Module &M) const;
821  unsigned char classifyGlobalReference(const GlobalValue *GV) const;
822 
823  /// Classify a global function reference for the current subtarget.
824  unsigned char classifyGlobalFunctionReference(const GlobalValue *GV,
825  const Module &M) const;
826  unsigned char classifyGlobalFunctionReference(const GlobalValue *GV) const;
827 
828  /// Classify a blockaddress reference for the current subtarget according to
829  /// how we should reference it in a non-pcrel context.
830  unsigned char classifyBlockAddressReference() const;
831 
832  /// Return true if the subtarget allows calls to immediate address.
833  bool isLegalToCallImmediateAddr() const;
834 
835  /// If we are using retpolines, we need to expand indirectbr to avoid it
836  /// lowering to an actual indirect jump.
837  bool enableIndirectBrExpand() const override {
838  return useRetpolineIndirectBranches();
839  }
840 
841  /// Enable the MachineScheduler pass for all X86 subtargets.
842  bool enableMachineScheduler() const override { return true; }
843 
844  bool enableEarlyIfConversion() const override;
845 
846  void getPostRAMutations(std::vector<std::unique_ptr<ScheduleDAGMutation>>
847  &Mutations) const override;
848 
849  AntiDepBreakMode getAntiDepBreakMode() const override {
850  return TargetSubtargetInfo::ANTIDEP_CRITICAL;
851  }
852 
853  bool enableAdvancedRASplitCost() const override { return true; }
854 };
855 
856 } // end namespace llvm
857 
858 #endif // LLVM_LIB_TARGET_X86_X86SUBTARGET_H
bool hasAVX() const
Definition: X86Subtarget.h:566
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Definition: Triple.h:476
bool isTargetPS4() const
Definition: X86Subtarget.h:734
bool is64Bit() const
Is this x86_64? (disregarding specific ABI / programming model)
Definition: X86Subtarget.h:527
bool hasSHA() const
Definition: X86Subtarget.h:605
bool hasSSE41() const
Definition: X86Subtarget.h:564
This class represents lattice values for constants.
Definition: AllocatorList.h:23
bool hasSSEPrefetch() const
Definition: X86Subtarget.h:608
bool isOSWindows() const
Definition: X86Subtarget.h:776
bool hasPOPCNT() const
Definition: X86Subtarget.h:574
bool hasAVX2() const
Definition: X86Subtarget.h:567
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
bool hasFMA() const
Definition: X86Subtarget.h:587
bool hasWBNOINVD() const
Definition: X86Subtarget.h:672
bool hasSlowDivide64() const
Definition: X86Subtarget.h:651
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition: Triple.h:614
bool hasRDPID() const
Definition: X86Subtarget.h:673
bool hasSGX() const
Definition: X86Subtarget.h:676
const X86InstrInfo * getInstrInfo() const override
Definition: X86Subtarget.h:486
bool hasCLWB() const
Definition: X86Subtarget.h:671
bool slowLEA() const
Definition: X86Subtarget.h:655
const X86FrameLowering * getFrameLowering() const override
Definition: X86Subtarget.h:488
void setPICStyle(PICStyles::Style Style)
Definition: X86Subtarget.h:552
const TargetMachine & TM
Definition: X86Subtarget.h:80
bool enableMachineScheduler() const override
Enable the MachineScheduler pass for all X86 subtargets.
Definition: X86Subtarget.h:842
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
Definition: Triple.h:572
bool hasFastBEXTR() const
Definition: X86Subtarget.h:645
bool hasVBMI2() const
Definition: X86Subtarget.h:601
bool isPMADDWDSlow() const
Definition: X86Subtarget.h:624
bool hasCLZERO() const
Definition: X86Subtarget.h:617
bool has3DNowA() const
Definition: X86Subtarget.h:573
bool useAVX512Regs() const
Definition: X86Subtarget.h:701
bool isOSFuchsia() const
Definition: Triple.h:496
bool isTargetNaCl64() const
Definition: X86Subtarget.h:746
bool isWindowsCygwinEnvironment() const
Definition: Triple.h:552
bool isTargetKnownWindowsMSVC() const
Definition: X86Subtarget.h:754
C - The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
bool slowTwoMemOps() const
Definition: X86Subtarget.h:653
bool hasPCONFIG() const
Definition: X86Subtarget.h:675
bool hasSHSTK() const
Definition: X86Subtarget.h:669
bool isTargetWindowsMSVC() const
Definition: X86Subtarget.h:750
bool isTargetMachO() const
Definition: X86Subtarget.h:738
int getGatherOverhead() const
Definition: X86Subtarget.h:627
bool hasXSAVE() const
Definition: X86Subtarget.h:578
bool isUnalignedMem32Slow() const
Definition: X86Subtarget.h:626
bool isPICStyleStubPIC() const
Definition: X86Subtarget.h:785
bool hasVPOPCNTDQ() const
Definition: X86Subtarget.h:659
bool hasPREFETCHWT1() const
Definition: X86Subtarget.h:607
Holds all the information related to register banks.
bool hasLWP() const
Definition: X86Subtarget.h:592
bool isPICStyleRIPRel() const
Definition: X86Subtarget.h:783
bool hasFMA4() const
Definition: X86Subtarget.h:588
bool padShortFunctions() const
Definition: X86Subtarget.h:652
bool isTargetSolaris() const
Definition: X86Subtarget.h:733
bool hasAES() const
Definition: X86Subtarget.h:575
bool isTarget64BitLP64() const
Is this x86_64 with the LP64 programming model (standard AMD64, no x32)?
Definition: X86Subtarget.h:546
bool isKnownWindowsMSVCEnvironment() const
Checks if the environment is MSVC.
Definition: Triple.h:534
bool hasPKU() const
Definition: X86Subtarget.h:665
bool is32Bit() const
Definition: X86Subtarget.h:531
X86_FastCall - &#39;fast&#39; analog of X86_StdCall.
Definition: CallingConv.h:91
bool canExtendTo512DQ() const
Definition: X86Subtarget.h:692
bool hasCmpxchg16b() const
Definition: X86Subtarget.h:630
bool hasFastLZCNT() const
Definition: X86Subtarget.h:643
bool useRetpolineExternalThunk() const
Definition: X86Subtarget.h:683
bool isOSSolaris() const
Definition: Triple.h:502
bool hasVLX() const
Definition: X86Subtarget.h:664
bool slow3OpsLEA() const
Definition: X86Subtarget.h:656
std::unique_ptr< CallLowering > CallLoweringInfo
GlobalISel related APIs.
Definition: X86Subtarget.h:434
bool hasFastSHLDRotate() const
Definition: X86Subtarget.h:644
bool isTargetNaCl() const
Definition: X86Subtarget.h:744
bool hasNOPL() const
Definition: X86Subtarget.h:556
bool isTargetCygMing() const
Definition: X86Subtarget.h:774
bool hasMOVDIRI() const
Definition: X86Subtarget.h:619
bool hasMPX() const
Definition: X86Subtarget.h:668
bool hasINVPCID() const
Definition: X86Subtarget.h:678
The C convention as specified in the x86-64 supplement to the System V ABI, used on most non-Windows ...
Definition: CallingConv.h:143
bool hasFastHorizontalOps() const
Definition: X86Subtarget.h:646
bool isWindowsItaniumEnvironment() const
Definition: Triple.h:548
bool isWindowsGNUEnvironment() const
Definition: Triple.h:556
bool hasFSGSBase() const
Definition: X86Subtarget.h:596
bool hasFastVariableShuffle() const
Definition: X86Subtarget.h:634
bool hasDQI() const
Definition: X86Subtarget.h:662
bool isWindowsCoreCLREnvironment() const
Definition: Triple.h:544
bool isOSDragonFly() const
Definition: Triple.h:500
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:529
const X86TargetLowering * getTargetLowering() const override
Definition: X86Subtarget.h:482
bool hasADX() const
Definition: X86Subtarget.h:604
bool isSLM() const
Definition: X86Subtarget.h:715
bool hasSSSE3() const
Definition: X86Subtarget.h:563
bool isTargetKFreeBSD() const
Definition: X86Subtarget.h:741
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
Definition: CallingConv.h:157
X86_ThisCall - Similar to X86_StdCall.
Definition: CallingConv.h:110
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition: Triple.h:619
unsigned getStackAlignment() const
Returns the minimum alignment known to hold of the stack frame on entry to the function and which mus...
Definition: X86Subtarget.h:503
bool hasCLDEMOTE() const
Definition: X86Subtarget.h:618
bool hasGFNI() const
Definition: X86Subtarget.h:584
bool isTargetNaCl32() const
Definition: X86Subtarget.h:745
static bool is64Bit(const char *name)
bool isXRaySupported() const override
Definition: X86Subtarget.h:709
bool hasERMSB() const
Definition: X86Subtarget.h:649
bool hasMWAITX() const
Definition: X86Subtarget.h:616
bool hasSSEUnalignedMem() const
Definition: X86Subtarget.h:629
bool hasF16C() const
Definition: X86Subtarget.h:595
bool hasERI() const
Definition: X86Subtarget.h:661
bool hasPCLMUL() const
Definition: X86Subtarget.h:582
bool useLeaForSP() const
Definition: X86Subtarget.h:631
bool hasMMX() const
Definition: X86Subtarget.h:571
bool hasFXSR() const
Definition: X86Subtarget.h:577
bool isTargetWindowsGNU() const
Definition: X86Subtarget.h:766
bool isPS4CPU() const
Tests whether the target is the PS4 CPU.
Definition: Triple.h:639
bool isTargetFreeBSD() const
Definition: X86Subtarget.h:731
PICStyles::Style PICStyle
Which PIC style to use.
Definition: X86Subtarget.h:78
bool isOSKFreeBSD() const
Tests whether the OS is kFreeBSD.
Definition: Triple.h:582
bool isPositionIndependent() const
Definition: X86Subtarget.h:789
bool hasCMov() const
Definition: X86Subtarget.h:559
bool isTargetGlibc() const
Definition: X86Subtarget.h:742
X86ProcFamilyEnum getProcFamily() const
Definition: X86Subtarget.h:711
const Triple & getTargetTriple() const
Definition: X86Subtarget.h:728
bool hasVNNI() const
Definition: X86Subtarget.h:666
bool hasXOP() const
Definition: X86Subtarget.h:590
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition: Triple.h:624
bool isTargetDarwin() const
Definition: X86Subtarget.h:730
bool hasSSE42() const
Definition: X86Subtarget.h:565
bool hasX87() const
Definition: X86Subtarget.h:554
bool isTargetMCU() const
Definition: X86Subtarget.h:747
bool isPMULLDSlow() const
Definition: X86Subtarget.h:623
bool useRetpolineIndirectCalls() const
Definition: X86Subtarget.h:679
bool hasPRFCHW() const
Definition: X86Subtarget.h:606
bool isTargetWin64() const
Definition: X86Subtarget.h:778
bool hasSSE3() const
Definition: X86Subtarget.h:562
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
bool slowIncDec() const
Definition: X86Subtarget.h:657
bool hasBMI2() const
Definition: X86Subtarget.h:599
bool hasVPCLMULQDQ() const
Definition: X86Subtarget.h:583
bool isTargetELF() const
Definition: X86Subtarget.h:736
bool isOSIAMCU() const
Definition: Triple.h:506
const X86RegisterInfo * getRegisterInfo() const override
Definition: X86Subtarget.h:496
std::unique_ptr< InstructionSelector > InstSelector
Definition: X86Subtarget.h:437
bool isUnalignedMem16Slow() const
Definition: X86Subtarget.h:625
bool isAtom() const
TODO: to be removed later and replaced with suitable properties.
Definition: X86Subtarget.h:714
unsigned getMaxInlineSizeThreshold() const
Returns the maximum memset / memcpy size that still makes it profitable to inline the call...
Definition: X86Subtarget.h:507
bool isPICStyleGOT() const
Definition: X86Subtarget.h:782
bool hasMOVDIR64B() const
Definition: X86Subtarget.h:620
bool threewayBranchProfitable() const
Definition: X86Subtarget.h:677
bool hasFastPartialYMMorZMMWrite() const
Definition: X86Subtarget.h:637
bool LEAusesAG() const
Definition: X86Subtarget.h:654
The C convention as implemented on Windows/x86-64 and AArch64.
Definition: CallingConv.h:153
bool has3DNow() const
Definition: X86Subtarget.h:572
bool hasRDSEED() const
Definition: X86Subtarget.h:614
unsigned getPreferVectorWidth() const
Definition: X86Subtarget.h:685
bool isOSLinux() const
Tests whether the OS is Linux.
Definition: Triple.h:577
bool hasVBMI() const
Definition: X86Subtarget.h:600
bool hasBITALG() const
Definition: X86Subtarget.h:667
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
Definition: Triple.h:309
bool isTargetWin32() const
Definition: X86Subtarget.h:780
bool hasXSAVEC() const
Definition: X86Subtarget.h:580
bool isTargetAndroid() const
Definition: X86Subtarget.h:743
bool isOSFreeBSD() const
Definition: Triple.h:492
bool canExtendTo512BW() const
Definition: X86Subtarget.h:695
bool isTarget64BitILP32() const
Is this x86_64 with the ILP32 programming model (x32 ABI)?
Definition: X86Subtarget.h:540
bool hasFastScalarFSQRT() const
Definition: X86Subtarget.h:641
bool hasCLFLUSHOPT() const
Definition: X86Subtarget.h:670
Fast - This calling convention attempts to make calls as fast as possible (e.g.
Definition: CallingConv.h:42
bool hasPOPCNTFalseDeps() const
Definition: X86Subtarget.h:632
bool hasIFMA() const
Definition: X86Subtarget.h:602
int getScatterOverhead() const
Definition: X86Subtarget.h:628
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
Definition: Triple.h:561
bool enableAdvancedRASplitCost() const override
Definition: X86Subtarget.h:853
bool hasAnyFMA() const
Definition: X86Subtarget.h:589
bool useSoftFloat() const
Definition: X86Subtarget.h:721
Intel_OCL_BI - Calling conventions for Intel OpenCL built-ins.
Definition: CallingConv.h:139
std::unique_ptr< RegisterBankInfo > RegBankInfo
Definition: X86Subtarget.h:436
bool useRetpolineIndirectBranches() const
Definition: X86Subtarget.h:680
std::unique_ptr< LegalizerInfo > Legalizer
Definition: X86Subtarget.h:435
bool enableIndirectBrExpand() const override
If we are using retpolines, we need to expand indirectbr to avoid it lowering to an actual indirect j...
Definition: X86Subtarget.h:837
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
Definition: CallingConv.h:86
bool hasRDRAND() const
Definition: X86Subtarget.h:594
bool hasLAHFSAHF() const
Definition: X86Subtarget.h:615
Provides the logic to select generic machine instructions.
bool is16Bit() const
Definition: X86Subtarget.h:535
bool hasVAES() const
Definition: X86Subtarget.h:576
bool isOSGlibc() const
Tests whether the OS uses glibc.
Definition: Triple.h:602
unsigned getRequiredVectorWidth() const
Definition: X86Subtarget.h:686
bool hasPTWRITE() const
Definition: X86Subtarget.h:621
bool useBWIRegs() const
Definition: X86Subtarget.h:705
const X86SelectionDAGInfo * getSelectionDAGInfo() const override
Definition: X86Subtarget.h:492
bool isTargetDragonFly() const
Definition: X86Subtarget.h:732
bool isPositionIndependent() const
bool isGLM() const
Definition: X86Subtarget.h:716
bool hasInt256() const
Definition: X86Subtarget.h:569
bool isTargetCOFF() const
Definition: X86Subtarget.h:737
bool isTargetFuchsia() const
Definition: X86Subtarget.h:748
bool isTargetWindowsItanium() const
Definition: X86Subtarget.h:770
bool hasSlowDivide32() const
Definition: X86Subtarget.h:650
bool hasCDI() const
Definition: X86Subtarget.h:658
bool hasBranchFusion() const
Definition: X86Subtarget.h:648
bool hasPFI() const
Definition: X86Subtarget.h:660
bool hasMOVBE() const
Definition: X86Subtarget.h:593
bool hasBMI() const
Definition: X86Subtarget.h:598
bool hasXSAVES() const
Definition: X86Subtarget.h:581
bool hasSSE1() const
Definition: X86Subtarget.h:560
bool isTargetLinux() const
Definition: X86Subtarget.h:740
This file describes how to lower LLVM calls to machine code calls.
bool isCallingConvWin64(CallingConv::ID CC) const
Definition: X86Subtarget.h:791
bool isSHLDSlow() const
Definition: X86Subtarget.h:622
PICStyles::Style getPICStyle() const
Definition: X86Subtarget.h:551
bool isAndroid() const
Tests whether the target is Android.
Definition: Triple.h:652
bool hasCmpxchg8b() const
Definition: X86Subtarget.h:555
bool hasMacroFusion() const
Definition: X86Subtarget.h:647
bool isTargetWindowsCygwin() const
Definition: X86Subtarget.h:762
bool hasAVX512() const
Definition: X86Subtarget.h:568
bool hasSSE4A() const
Definition: X86Subtarget.h:570
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:65
bool hasBWI() const
Definition: X86Subtarget.h:663
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
AntiDepBreakMode getAntiDepBreakMode() const override
Definition: X86Subtarget.h:849
bool hasFastGather() const
Definition: X86Subtarget.h:640
ThreeDNow - This indicates that the instruction uses the wacky 0x0F 0x0F prefix for 3DNow! instructio...
Definition: X86BaseInfo.h:508
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
Definition: Triple.h:539
Triple TargetTriple
What processor and OS we&#39;re targeting.
Definition: X86Subtarget.h:431
bool hasTBM() const
Definition: X86Subtarget.h:591
bool hasWAITPKG() const
Definition: X86Subtarget.h:674
bool hasLZCNT() const
Definition: X86Subtarget.h:597
bool hasMFence() const
Use mfence if we have SSE2 or we&#39;re on x86-64 (even if we asked for no-sse2).
Definition: X86Subtarget.h:726
bool hasXSAVEOPT() const
Definition: X86Subtarget.h:579
bool hasSSE2() const
Definition: X86Subtarget.h:561
bool hasLZCNTFalseDeps() const
Definition: X86Subtarget.h:633
bool hasRTM() const
Definition: X86Subtarget.h:603
bool hasFastVectorFSQRT() const
Definition: X86Subtarget.h:642
bool isTargetWindowsCoreCLR() const
Definition: X86Subtarget.h:758