14 #ifndef LLVM_LIB_TARGET_X86_X86SUBTARGET_H
15 #define LLVM_LIB_TARGET_X86_X86SUBTARGET_H
26 #define GET_SUBTARGETINFO_HEADER
27 #include "X86GenSubtargetInfo.inc"
50 NoMMXSSE,
MMX,
SSE1,
SSE2,
SSE3,
SSSE3,
SSE41,
SSE42,
AVX,
AVX2,
AVX512F
234 unsigned StackAlignOverride;
264 return &FrameLowering;
290 void initializeEnvironment();
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
unsigned getMaxInlineSizeThreshold() const
Returns the maximum memset / memcpy size that still makes it profitable to inline the call...
bool HasPRFCHW
Processor has PRFCHW instructions.
const X86RegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
bool HasTBM
Target has TBM instructions.
Intel_OCL_BI - Calling conventions for Intel OpenCL built-ins.
bool HasBMI2
Processor has BMI2 instructions.
The C convention as specified in the x86-64 supplement to the System V ABI, used on most non-Windows ...
bool isTargetWindowsCygwin() const
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
bool isTargetCygMing() const
const X86InstrInfo * getInstrInfo() const override
bool HasCDI
Processor has AVX-512 Conflict Detection Instructions.
bool HasAES
Target has AES instructions.
bool isTargetMachO() const
const X86FrameLowering * getFrameLowering() const override
void setPICStyle(PICStyles::Style Style)
bool HasERI
Processor has AVX-512 Exponential and Reciprocal Instructions.
bool enableMachineScheduler() const override
Enable the MachineScheduler pass for all X86 subtargets.
unsigned char ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const
ClassifyGlobalReference - Classify a global variable reference for the current subtarget according to...
unsigned MaxInlineSizeThreshold
Max.
bool LEAUsesAG
True if the LEA instruction inputs have to be ready at address generation (AG) time.
bool isTargetKnownWindowsMSVC() const
bool IsUAMem32Slow
True if unaligned 32-byte memory accesses are slow.
bool isOSDragonFly() const
bool HasRDRAND
True if the processor has the RDRAND instruction.
bool hasCmpxchg16b() const
bool isOSWindows() const
Tests whether the OS is Windows.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
bool HasFMA
Target has 3-operand fused multiply-add.
bool isTargetNaCl64() const
bool isTargetSolaris() const
const InstrItineraryData * getInstrItineraryData() const override
Return the instruction itineraries based on the subtarget selection.
PICStyles::Style getPICStyle() const
bool isTargetDarwin() const
bool HasPOPCNT
True if the processor supports POPCNT.
const Triple & getTargetTriple() const
bool HasSlowDivide32
True if 8-bit divisions are significantly faster than 32-bit divisions and should be used when possib...
bool isTargetWindowsItanium() const
unsigned getStackAlignment() const
Returns the minimum alignment known to hold of the stack frame on entry to the function and which mus...
bool isWindowsMSVCEnvironment() const
bool HasPFI
Processor has AVX-512 PreFetch Instructions.
bool isOSLinux() const
Tests whether the OS is Linux.
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
bool is64Bit() const
Is this x86_64? (disregarding specific ABI / programming model)
bool HasCmpxchg16b
True if this processor has the CMPXCHG16B instruction; this is true for most x86-64 chips...
bool isTargetWindowsGNU() const
bool isPICStyleRIPRel() const
Itinerary data supplied by a subtarget to be used by a target.
bool isPICStyleStubAny() const
bool UseLeaForSP
True if the LEA instruction should be used for adjusting the stack pointer.
X863DNowEnum X863DNowLevel
3DNow, 3DNow Athlon, or none supported.
bool HasSSE4A
True if the processor supports SSE4A instructions.
bool CallRegIndirect
True if the Calls with memory reference should be converted to a register-based indirect call...
bool HasLZCNT
Processor has LZCNT instruction.
bool HasF16C
Processor has 16-bit floating point conversion instructions.
bool SlowIncDec
True if INC and DEC instructions are slow when writing to flags.
unsigned char ClassifyBlockAddressReference() const
Classify a blockaddress reference for the current subtarget according to how we should reference it i...
const X86TargetLowering * getTargetLowering() const override
bool useSoftFloat() const
bool hasSSEUnalignedMem() const
bool isCallingConvWin64(CallingConv::ID CC) const
bool isWindowsGNUEnvironment() const
bool isTargetCOFF() const
bool hasSinCos() const
This function returns true if the target has sincos() routine in its compiler runtime or math librari...
bool isPICStyleStubPIC() const
bool IsBTMemSlow
True if BT (bit test) of memory instructions are slow.
bool HasADX
Processor has ADX instructions.
bool HasBWI
Processor has AVX-512 Byte and Word instructions.
bool isTargetWin32() const
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
bool hasSlowDivide64() const
bool IsLegalToCallImmediateAddr(const TargetMachine &TM) const
Return true if the subtarget allows calls to immediate address.
PICStyles::Style PICStyle
Which PIC style to use.
bool HasXOP
Target has XOP instructions.
bool SlowLEA
True if the LEA instruction with certain arguments is slow.
bool isPICStyleStubNoDynamic() const
bool HasDQI
Processor has AVX-512 Doubleword and Quadword instructions.
bool enableEarlyIfConversion() const override
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
bool IsSHLDSlow
True if SHLD instructions are slow.
bool isPICStyleGOT() const
InstrItineraryData InstrItins
Instruction itineraries for scheduling.
bool isPICStyleSet() const
bool HasFSGSBase
Processor has FS/GS base insturctions.
Triple - Helper class for working with autoconf configuration names.
const X86RegisterInfo * getRegisterInfo() const override
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
X86Subtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const X86TargetMachine &TM, unsigned StackAlignOverride)
This constructor initializes the data members to match that of the specified triple.
bool HasMPX
Processot supports MPX - Memory Protection Extensions.
X86ProcFamilyEnum X86ProcFamily
X86 processor family: Intel Atom, and others.
bool HasX86_64
True if the processor supports X86-64 instructions.
bool HasSSEUnalignedMem
True if SSE operations can have unaligned memory operands.
bool isTargetWindowsMSVC() const
bool isTarget64BitILP32() const
Is this x86_64 with the ILP32 programming model (x32 ABI)?
bool HasSHA
Processor has SHA instructions.
bool HasBMI
Processor has BMI1 instructions.
bool isUnalignedMem32Slow() const
bool isTargetLinux() const
bool HasHLE
Processor has HLE.
X86_FastCall - 'fast' analog of X86_StdCall.
bool UseSoftFloat
Use software floating point for code generation.
bool isUnalignedMemAccessFast() const
bool isTargetDragonFly() const
bool HasPCLMUL
Target has carry-less multiplication.
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
const X86SelectionDAGInfo * getSelectionDAGInfo() const override
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
bool isWindowsCygwinEnvironment() const
bool isTarget64BitLP64() const
Is this x86_64 with the LP64 programming model (standard AMD64, no x32)?
Fast - This calling convention attempts to make calls as fast as possible (e.g.
X86SSEEnum X86SSELevel
MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
X86_ThisCall - Similar to X86_StdCall.
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
bool HasCMov
True if this processor has conditional move instructions (generally pentium pro+).
bool isTargetWin64() const
bool isKnownWindowsMSVCEnvironment() const
bool HasFMA4
Target has 4-operand fused multiply-add.
bool HasRTM
Processor has RTM instructions.
bool isWindowsItaniumEnvironment() const
bool isTargetFreeBSD() const
The C convention as implemented on Windows/x86-64.
Primary interface to the complete machine description for the target machine.
bool HasVLX
Processor has AVX-512 Vector Length eXtenstions.
const char * getBZeroEntry() const
This function returns the name of a function which has an interface like the non-standard bzero funct...
bool padShortFunctions() const
C - The default llvm calling convention, compatible with C.
bool callRegIndirect() const
StringRef - Represent a constant reference to a string, i.e.
bool HasRDSEED
Processor has RDSEED instructions.
AntiDepBreakMode getAntiDepBreakMode() const override
unsigned stackAlignment
The minimum alignment known to hold of the stack frame on entry to the function and which must be mai...
bool isTargetNaCl32() const
bool isPS4() const
Tests whether the target is the PS4 platform.
Triple TargetTriple
What processor and OS we're targeting.
bool IsUAMemFast
True if unaligned memory access is fast.
bool HasMOVBE
True if the processor has the MOVBE instruction.
bool PadShortFunctions
True if the short functions should be padded to prevent a stall when returning too early...
bool hasSlowDivide32() const
bool isTargetNaCl() const
bool HasSlowDivide64
True if 16-bit divides are significantly faster than 64-bit divisions and should be used when possibl...