14 #ifndef LLVM_LIB_TARGET_X86_X86SUBTARGET_H
15 #define LLVM_LIB_TARGET_X86_X86SUBTARGET_H
27 #define GET_SUBTARGETINFO_HEADER
28 #include "X86GenSubtargetInfo.inc"
309 std::unique_ptr<GISelAccessor>
GISel;
313 unsigned StackAlignOverride;
346 return &FrameLowering;
377 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 HasFXSR
Target has FXSAVE/FXRESTOR instructions.
bool HasTBM
Target has TBM instructions.
bool HasBMI2
Processor has BMI2 instructions.
bool hasFastVectorFSQRT() const
The goal of this helper class is to gather the accessor to all the APIs related to GlobalISel...
bool isOSKFreeBSD() const
Tests whether the OS is kFreeBSD.
Intel_OCL_BI - Calling conventions for Intel OpenCL built-ins.
bool isTargetWindowsCygwin() const
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
bool HasSGX
Processor has Software Guard Extensions.
const CallLowering * getCallLowering() const override
Methods used by Global ISel.
bool HasPCOMMIT
Processor has Persistent Commit feature.
A Module instance is used to store all the information related to an LLVM module. ...
bool HasLAHFSAHF
Processor has LAHF/SAHF instructions.
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 MaxInlineSizeThreshold
Max.
bool LEAUsesAG
True if the LEA instruction inputs have to be ready at address generation (AG) time.
const LegalizerInfo * getLegalizerInfo() const override
bool hasFastPartialYMMWrite() const
bool isTargetKnownWindowsMSVC() const
bool HasFastScalarFSQRT
True if hardware SQRTSS instruction is at least as fast (latency) as RSQRTSS followed by a Newton-Rap...
bool IsUAMem32Slow
True if unaligned memory accesses of 32-bytes are slow.
bool isTargetWindowsCoreCLR() const
bool isOSDragonFly() const
bool IsPMULLDSlow
True if the PMULLD instruction is slow compared to PMULLW/PMULHW and.
bool HasRDRAND
True if the processor has the RDRAND instruction.
bool hasCmpxchg16b() const
bool isAndroid() const
Tests whether the target is Android.
bool isOSWindows() const
Tests whether the OS is Windows.
bool HasCLWB
Processor supports Cache Line Write Back instruction.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
bool HasFMA
Target has 3-operand fused multiply-add.
bool HasFastVectorFSQRT
True if hardware SQRTPS/VSQRTPS instructions are at least as fast (throughput) as RSQRTPS/VRSQRTPS fo...
bool isTargetNaCl64() const
Holds all the information related to register banks.
void setGISelAccessor(GISelAccessor &GISel)
This object will take onwership of GISelAccessor.
bool isTargetAndroid() 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 HasCLFLUSHOPT
Processor supports Flush Cache Line instruction.
bool HasPOPCNT
True if the processor supports POPCNT.
bool HasPKU
Processor has PKU extenstions.
bool isTargetGlibc() const
const InstructionSelector * getInstructionSelector() const override
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 HasFastPartialYMMWrite
True if there is no performance penalty to writing only the lower parts of a YMM register without cle...
X86_ThisCall - Similar to X86_StdCall.
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
bool HasPFI
Processor has AVX-512 PreFetch Instructions.
bool isOSLinux() const
Tests whether the OS is Linux.
bool hasFastLZCNT() const
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
bool HasIFMA
Processor has Integer Fused Multiply Add.
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
X86_FastCall - 'fast' analog of X86_StdCall.
bool HasX87
True if the processor supports X87 instructions.
Itinerary data supplied by a subtarget to be used by a target.
bool UseLeaForSP
True if the LEA instruction should be used for adjusting the stack pointer.
X863DNowEnum X863DNowLevel
MMX, 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.
bool HasInvPCId
Processor supports Invalidate Process-Context Identifier.
const X86TargetLowering * getTargetLowering() const override
X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS, const X86TargetMachine &TM, unsigned StackAlignOverride)
This constructor initializes the data members to match that of the specified triple.
bool useSoftFloat() const
bool hasSSEUnalignedMem() const
bool isCallingConvWin64(CallingConv::ID CC) const
bool isWindowsGNUEnvironment() const
bool isTargetCOFF() const
bool HasMWAITX
Processor has MONITORX/MWAITX instructions.
bool HasPFPREFETCHWT1
Processor has Prefetch with intent to Write instruction.
bool hasSinCos() const
This function returns true if the target has sincos() routine in its compiler runtime or math librari...
C - The default llvm calling convention, compatible with C.
bool isPICStyleStubPIC() const
bool IsBTMemSlow
True if BT (bit test) of memory instructions are slow.
X86_StdCall - stdcall is the calling conventions mostly used by the Win32 API.
bool HasADX
Processor has ADX instructions.
bool HasBWI
Processor has AVX-512 Byte and Word instructions.
bool isPositionIndependent() const
bool isTargetWin32() const
bool hasSlowDivide64() const
std::unique_ptr< GISelAccessor > GISel
Gather the accessor points to GlobalISel-related APIs.
bool isPositionIndependent() const
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 HasDQI
Processor has AVX-512 Doubleword and Quadword instructions.
bool enableEarlyIfConversion() const override
unsigned char classifyLocalReference(const GlobalValue *GV) const
Classify a global variable reference for the current subtarget according to how we should reference i...
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
bool isWindowsCoreCLREnvironment() const
bool IsSHLDSlow
True if SHLD instructions are slow.
MSVC calling convention that passes vectors and vector aggregates in SSE registers.
bool isPICStyleGOT() const
InstrItineraryData InstrItins
Instruction itineraries for scheduling.
bool HasFSGSBase
Processor has FS/GS base insturctions.
bool HasVMFUNC
Processor has VM Functions.
unsigned char classifyBlockAddressReference() const
Classify a blockaddress reference for the current subtarget according to how we should reference it i...
bool IsUAMem16Slow
True if unaligned memory accesses of 16-bytes are slow.
Triple - Helper class for working with autoconf configuration names.
virtual bool isXRaySupported() const override
const X86RegisterInfo * getRegisterInfo() const override
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
bool HasMPX
Processor 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
unsigned char classifyGlobalFunctionReference(const GlobalValue *GV, const Module &M) const
Classify a global function reference for the current subtarget.
bool HasXSAVES
Target has XSAVES instructions.
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.
bool HasVBMI
Processor has VBMI instructions.
The C convention as specified in the x86-64 supplement to the System V ABI, used on most non-Windows ...
bool UseSoftFloat
Use software floating point for code generation.
The C convention as implemented on Windows/x86-64.
bool isTargetDragonFly() const
bool HasPCLMUL
Target has carry-less multiplication.
Provides the logic to select generic machine instructions.
bool hasFastScalarFSQRT() const
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
const X86SelectionDAGInfo * getSelectionDAGInfo() const override
bool HasXSAVEOPT
Target has XSAVEOPT instructions.
bool isOSGlibc() const
Tests whether the OS uses glibc.
bool isWindowsCygwinEnvironment() const
bool isTarget64BitLP64() const
Is this x86_64 with the LP64 programming model (standard AMD64, no x32)?
X86SSEEnum X86SSELevel
SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
unsigned char classifyGlobalReference(const GlobalValue *GV, const Module &M) const
bool isPS4CPU() const
Tests whether the target is the PS4 CPU.
bool HasXSAVE
Target has XSAVE instructions.
bool isUnalignedMem16Slow() const
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
Checks if the environment is MSVC.
bool HasFMA4
Target has 4-operand fused multiply-add.
bool HasRTM
Processor has RTM instructions.
bool isWindowsItaniumEnvironment() const
bool isTargetFreeBSD() const
const RegisterBankInfo * getRegBankInfo() const override
bool HasXSAVEC
Target has XSAVEC instructions.
Primary interface to the complete machine description for the target machine.
bool HasVLX
Processor has AVX-512 Vector Length eXtenstions.
bool HasFastLZCNT
True if LZCNT instruction is fast.
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
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 hasMFence() const
Use mfence if we have SSE2 or we're on x86-64 (even if we asked for no-sse2).
bool isTargetKFreeBSD() const
bool isTargetNaCl32() const
bool isPMULLDSlow() const
Triple TargetTriple
What processor and OS we're targeting.
bool isLegalToCallImmediateAddr() const
Return true if the subtarget allows calls to immediate address.
Fast - This calling convention attempts to make calls as fast as possible (e.g.
bool HasMOVBE
True if the processor has the MOVBE instruction.
bool HasSMAP
Processor has Supervisor Mode Access Protection.
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 32-bit divides are significantly faster than 64-bit divisions and should be used when possibl...