LLVM API Documentation
#include <X86Subtarget.h>
Public Types | |
| enum | { isELF, isCygwin, isDarwin, isWindows, isMingw } |
Public Member Functions | |
| X86Subtarget (const std::string &TT, const std::string &FS, bool is64Bit) | |
| unsigned | getStackAlignment () const |
| unsigned | getMaxInlineSizeThreshold () const |
| std::string | ParseSubtargetFeatures (const std::string &FS, const std::string &CPU) |
| void | AutoDetectSubtargetFeatures () |
| bool | is64Bit () const |
| PICStyles::Style | getPICStyle () const |
| void | setPICStyle (PICStyles::Style Style) |
| bool | hasMMX () const |
| bool | hasSSE1 () const |
| bool | hasSSE2 () const |
| bool | hasSSE3 () const |
| bool | hasSSSE3 () const |
| bool | hasSSE41 () const |
| bool | hasSSE42 () const |
| bool | hasSSE4A () const |
| bool | has3DNow () const |
| bool | has3DNowA () const |
| bool | hasAVX () const |
| bool | hasFMA3 () const |
| bool | hasFMA4 () const |
| bool | isBTMemSlow () const |
| bool | isTargetDarwin () const |
| bool | isTargetELF () const |
| bool | isTargetWindows () const |
| bool | isTargetMingw () const |
| bool | isTargetCygMing () const |
| bool | isTargetCygwin () const |
| bool | isTargetWin64 () const |
| std::string | getDataLayout () const |
| bool | isPICStyleSet () const |
| bool | isPICStyleGOT () const |
| bool | isPICStyleRIPRel () const |
| bool | isPICStyleStubPIC () const |
| bool | isPICStyleStubNoDynamic () const |
| bool | isPICStyleStubAny () const |
| unsigned | getDarwinVers () const |
| bool | isLinux () const |
| isLinux - Return true if the target is "Linux". | |
| unsigned char | ClassifyGlobalReference (const GlobalValue *GV, const TargetMachine &TM) const |
| bool | IsLegalToCallImmediateAddr (const TargetMachine &TM) const |
| const char * | getBZeroEntry () const |
| unsigned | getSpecialAddressLatency () const |
Public Attributes | |
| enum llvm::X86Subtarget:: { ... } | TargetType |
Protected Types | |
| enum | X86SSEEnum { NoMMXSSE, MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42 } |
| enum | X863DNowEnum { NoThreeDNow, ThreeDNow, ThreeDNowA } |
Protected Attributes | |
| PICStyles::Style | PICStyle |
| X86SSEEnum | X86SSELevel |
| X863DNowEnum | X863DNowLevel |
| bool | HasX86_64 |
| bool | HasSSE4A |
| HasSSE4A - True if the processor supports SSE4A instructions. | |
| bool | HasAVX |
| HasAVX - Target has AVX instructions. | |
| bool | HasFMA3 |
| HasFMA3 - Target has 3-operand fused multiply-add. | |
| bool | HasFMA4 |
| HasFMA4 - Target has 4-operand fused multiply-add. | |
| bool | IsBTMemSlow |
| IsBTMemSlow - True if BT (bit test) of memory instructions are slow. | |
| unsigned char | DarwinVers |
| bool | IsLinux |
| isLinux - true if this is a "linux" platform. | |
| unsigned | stackAlignment |
| unsigned | MaxInlineSizeThreshold |
Definition at line 36 of file X86Subtarget.h.
enum llvm::X86Subtarget::X86SSEEnum [protected] |
Definition at line 38 of file X86Subtarget.h.
enum llvm::X86Subtarget::X863DNowEnum [protected] |
| anonymous enum |
| X86Subtarget::X86Subtarget | ( | const std::string & | TT, | |
| const std::string & | FS, | |||
| bool | is64Bit | |||
| ) |
This constructor initializes the data members to match that of the specified triple.
Definition at line 378 of file X86Subtarget.cpp.
References AutoDetectSubtargetFeatures(), DarwinVers, DEBUG, llvm::FloatABI::Default, llvm::errs(), llvm::FloatABIType, GetCurrentX86CPU(), llvm::FloatABI::Hard, HasX86_64, isCygwin, isDarwin, isELF, IsLinux, isMingw, isWindows, ParseSubtargetFeatures(), SSE2, stackAlignment, llvm::StackAlignment, TargetType, X863DNowLevel, and X86SSELevel.
| unsigned llvm::X86Subtarget::getStackAlignment | ( | ) | const [inline] |
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function for this subtarget.
Definition at line 110 of file X86Subtarget.h.
References stackAlignment.
Referenced by llvm::X86TargetLowering::getOptimalMemOpType().
| unsigned llvm::X86Subtarget::getMaxInlineSizeThreshold | ( | ) | const [inline] |
getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size that still makes it profitable to inline the call.
Definition at line 114 of file X86Subtarget.h.
References MaxInlineSizeThreshold.
| std::string llvm::X86Subtarget::ParseSubtargetFeatures | ( | const std::string & | FS, | |
| const std::string & | CPU | |||
| ) |
ParseSubtargetFeatures - Parses features string setting specified subtarget options. Definition of function is auto generated by tblgen.
Referenced by X86Subtarget().
| void X86Subtarget::AutoDetectSubtargetFeatures | ( | ) |
AutoDetectSubtargetFeatures - Auto-detect CPU features using CPUID instruction.
Definition at line 226 of file X86Subtarget.cpp.
References c, DetectFamilyModel(), llvm::N86::EAX, llvm::N86::EBX, llvm::N86::ECX, llvm::N86::EDX, llvm::X86::GetCpuIDAndInfo(), HasAVX, HasFMA3, HasFMA4, HasSSE4A, HasX86_64, IsBTMemSlow, MMX, SSE1, SSE2, SSE3, SSE41, SSE42, SSSE3, and X86SSELevel.
Referenced by X86Subtarget().
| bool llvm::X86Subtarget::is64Bit | ( | ) | const [inline] |
Definition at line 125 of file X86Subtarget.h.
Referenced by llvm::X86TargetMachine::addCodeEmitter(), llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86TargetLowering::getByValTypeAlignment(), getDataLayout(), llvm::X86RegisterInfo::getDwarfRegNum(), llvm::X86InstrInfo::GetInstSizeInBytes(), llvm::X86TargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getPICJumpTableRelocBase(), llvm::X86TargetLowering::getRegClassForInlineAsmConstraint(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), getVZextMovL(), llvm::X86TargetLowering::isLegalAddressingMode(), llvm::X86TargetLowering::isTruncateFree(), llvm::X86TargetLowering::isZExtFree(), PerformSTORECombine(), llvm::X86RegisterInfo::X86RegisterInfo(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| PICStyles::Style llvm::X86Subtarget::getPICStyle | ( | ) | const [inline] |
Definition at line 127 of file X86Subtarget.h.
References PICStyle.
Referenced by llvm::X86TargetMachine::X86TargetMachine().
| void llvm::X86Subtarget::setPICStyle | ( | PICStyles::Style | Style | ) | [inline] |
Definition at line 128 of file X86Subtarget.h.
References PICStyle.
Referenced by llvm::X86TargetMachine::addCodeEmitter(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::hasMMX | ( | ) | const [inline] |
Definition at line 130 of file X86Subtarget.h.
References MMX, and X86SSELevel.
Referenced by llvm::X86TargetLowering::getRegForInlineAsmConstraint(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE1 | ( | ) | const [inline] |
Definition at line 131 of file X86Subtarget.h.
References SSE1, and X86SSELevel.
Referenced by llvm::X86TargetLowering::getByValTypeAlignment(), llvm::X86TargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), llvm::X86TargetLowering::LowerXConstraint(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE2 | ( | ) | const [inline] |
Definition at line 132 of file X86Subtarget.h.
References SSE2, and X86SSELevel.
Referenced by llvm::X86TargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), llvm::X86TargetLowering::LowerXConstraint(), PerformSELECTCombine(), PerformShiftCombine(), PerformSTORECombine(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE3 | ( | ) | const [inline] |
Definition at line 133 of file X86Subtarget.h.
References SSE3, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSSE3 | ( | ) | const [inline] |
Definition at line 134 of file X86Subtarget.h.
References SSSE3, and X86SSELevel.
Referenced by LowerVECTOR_SHUFFLEv16i8(), and LowerVECTOR_SHUFFLEv8i16().
| bool llvm::X86Subtarget::hasSSE41 | ( | ) | const [inline] |
Definition at line 135 of file X86Subtarget.h.
References SSE41, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE42 | ( | ) | const [inline] |
Definition at line 136 of file X86Subtarget.h.
References SSE42, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE4A | ( | ) | const [inline] |
| bool llvm::X86Subtarget::has3DNow | ( | ) | const [inline] |
| bool llvm::X86Subtarget::has3DNowA | ( | ) | const [inline] |
| bool llvm::X86Subtarget::hasAVX | ( | ) | const [inline] |
Definition at line 140 of file X86Subtarget.h.
References HasAVX.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasFMA3 | ( | ) | const [inline] |
| bool llvm::X86Subtarget::hasFMA4 | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isBTMemSlow | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isTargetDarwin | ( | ) | const [inline] |
Definition at line 145 of file X86Subtarget.h.
References isDarwin, and TargetType.
Referenced by llvm::X86TargetMachine::addCodeEmitter(), ClassifyGlobalReference(), llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), getDataLayout(), llvm::X86RegisterInfo::getDwarfRegNum(), llvm::X86ATTAsmPrinter::GetPICBaseSymbol(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::PrintPICBaseSymbol(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetELF | ( | ) | const [inline] |
Definition at line 146 of file X86Subtarget.h.
References isELF, and TargetType.
Referenced by ClassifyGlobalReference(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::X86TargetMachine::getELFWriterInfo(), llvm::X86ATTAsmPrinter::GetPICBaseSymbol(), IsLegalToCallImmediateAddr(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::PrintPICBaseSymbol(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetWindows | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isTargetMingw | ( | ) | const [inline] |
Definition at line 148 of file X86Subtarget.h.
References isMingw, and TargetType.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::isTargetCygMing | ( | ) | const [inline] |
Definition at line 149 of file X86Subtarget.h.
References isCygwin, isMingw, and TargetType.
Referenced by llvm::X86ATTAsmPrinter::DecorateCygMingName(), llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::X86RegisterInfo::emitPrologue(), llvm::X86RegisterInfo::getDwarfRegNum(), llvm::X86ATTAsmPrinter::LowerGlobalAddressOperand(), llvm::X86ATTAsmPrinter::PrintGlobalVariable(), llvm::X86ATTAsmPrinter::printSymbolOperand(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetCygwin | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isTargetWin64 | ( | ) | const [inline] |
Definition at line 153 of file X86Subtarget.h.
References isMingw, isWindows, and TargetType.
Referenced by llvm::X86RegisterInfo::emitPrologue(), and llvm::X86RegisterInfo::X86RegisterInfo().
| std::string llvm::X86Subtarget::getDataLayout | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isPICStyleSet | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isPICStyleGOT | ( | ) | const [inline] |
Definition at line 169 of file X86Subtarget.h.
References llvm::PICStyles::GOT, and PICStyle.
Referenced by ClassifyGlobalReference(), llvm::X86ATTAsmPrinter::printPICJumpTableEntry(), and llvm::X86ATTAsmPrinter::printPICJumpTableSetLabel().
| bool llvm::X86Subtarget::isPICStyleRIPRel | ( | ) | const [inline] |
Definition at line 170 of file X86Subtarget.h.
References PICStyle, and llvm::PICStyles::RIPRel.
Referenced by ClassifyGlobalReference(), llvm::X86ATTAsmPrinter::printPICJumpTableEntry(), and llvm::X86ATTAsmPrinter::printPICJumpTableSetLabel().
| bool llvm::X86Subtarget::isPICStyleStubPIC | ( | ) | const [inline] |
Definition at line 172 of file X86Subtarget.h.
References PICStyle, and llvm::PICStyles::StubPIC.
Referenced by ClassifyGlobalReference(), and llvm::X86ATTAsmPrinter::printPICJumpTableEntry().
| bool llvm::X86Subtarget::isPICStyleStubNoDynamic | ( | ) | const [inline] |
Definition at line 176 of file X86Subtarget.h.
References PICStyle, and llvm::PICStyles::StubDynamicNoPIC.
Referenced by ClassifyGlobalReference().
| bool llvm::X86Subtarget::isPICStyleStubAny | ( | ) | const [inline] |
Definition at line 179 of file X86Subtarget.h.
References PICStyle, llvm::PICStyles::StubDynamicNoPIC, and llvm::PICStyles::StubPIC.
| unsigned llvm::X86Subtarget::getDarwinVers | ( | ) | const [inline] |
getDarwinVers - Return the darwin version number, 8 = Tiger, 9 = Leopard, 10 = Snow Leopard, etc.
Definition at line 185 of file X86Subtarget.h.
References DarwinVers.
Referenced by getBZeroEntry().
| bool llvm::X86Subtarget::isLinux | ( | ) | const [inline] |
isLinux - Return true if the target is "Linux".
Definition at line 188 of file X86Subtarget.h.
References IsLinux.
| unsigned char X86Subtarget::ClassifyGlobalReference | ( | const GlobalValue * | GV, | |
| const TargetMachine & | TM | |||
| ) | const |
ClassifyGlobalReference - Classify a global variable reference for the current subtarget according to how we should reference it in a non-pcrel context.
ClassifyGlobalReference - Classify a global variable reference for the current subtarget according to how we should reference it in a non-pcrel context.
Definition at line 33 of file X86Subtarget.cpp.
References llvm::TargetMachine::getCodeModel(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasDefaultVisibility(), llvm::GlobalValue::hasDLLImportLinkage(), llvm::GlobalValue::hasHiddenVisibility(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasNotBeenReadFromBitcode(), llvm::GlobalValue::isDeclaration(), isPICStyleGOT(), isPICStyleRIPRel(), isPICStyleStubNoDynamic(), isPICStyleStubPIC(), isTargetDarwin(), isTargetELF(), llvm::GlobalValue::isWeakForLinker(), llvm::CodeModel::Large, llvm::X86II::MO_DARWIN_HIDDEN_NONLAZY, llvm::X86II::MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE, llvm::X86II::MO_DARWIN_NONLAZY, llvm::X86II::MO_DARWIN_NONLAZY_PIC_BASE, llvm::X86II::MO_DLLIMPORT, llvm::X86II::MO_GOT, llvm::X86II::MO_GOTOFF, llvm::X86II::MO_GOTPCREL, llvm::X86II::MO_NO_FLAG, and llvm::X86II::MO_PIC_BASE_OFFSET.
Referenced by llvm::X86TargetLowering::isLegalAddressingMode(), and llvm::X86TargetLowering::LowerAsmOperandForConstraint().
| bool X86Subtarget::IsLegalToCallImmediateAddr | ( | const TargetMachine & | TM | ) | const |
IsLegalToCallImmediateAddr - Return true if the subtarget allows calls to immediate address.
IsLegalToCallImmediateAddr - Return true if the subtarget allows calls to immediate address.
Definition at line 142 of file X86Subtarget.cpp.
References llvm::TargetMachine::getRelocationModel(), isTargetELF(), and llvm::Reloc::Static.
| const char * X86Subtarget::getBZeroEntry | ( | ) | const |
This function returns the name of a function which has an interface like the non-standard bzero function, if such a function exists on the current subtarget and it is considered prefereable over memset with zero passed as the second argument. Otherwise it returns null.
getBZeroEntry - This function returns the name of a function which has an interface like the non-standard bzero function, if such a function exists on the current subtarget and it is considered prefereable over memset with zero passed as the second argument. Otherwise it returns null.
Definition at line 132 of file X86Subtarget.cpp.
References getDarwinVers().
| unsigned X86Subtarget::getSpecialAddressLatency | ( | ) | const [virtual] |
getSpecialAddressLatency - For targets where it is beneficial to backschedule instructions that compute addresses, return a value indicating the number of scheduling cycles of backscheduling that should be attempted.
getSpecialAddressLatency - For targets where it is beneficial to backschedule instructions that compute addresses, return a value indicating the number of scheduling cycles of backscheduling that should be attempted.
Reimplemented from llvm::TargetSubtarget.
Definition at line 152 of file X86Subtarget.cpp.
PICStyles::Style llvm::X86Subtarget::PICStyle [protected] |
PICStyle - Which PIC style to use
Definition at line 48 of file X86Subtarget.h.
Referenced by getPICStyle(), isPICStyleGOT(), isPICStyleRIPRel(), isPICStyleSet(), isPICStyleStubAny(), isPICStyleStubNoDynamic(), isPICStyleStubPIC(), and setPICStyle().
X86SSEEnum llvm::X86Subtarget::X86SSELevel [protected] |
X86SSELevel - MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
Definition at line 52 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), hasMMX(), hasSSE1(), hasSSE2(), hasSSE3(), hasSSE41(), hasSSE42(), hasSSSE3(), and X86Subtarget().
X863DNowEnum llvm::X86Subtarget::X863DNowLevel [protected] |
X863DNowLevel - 3DNow or 3DNow Athlon, or none supported.
Definition at line 56 of file X86Subtarget.h.
Referenced by has3DNow(), has3DNowA(), and X86Subtarget().
bool llvm::X86Subtarget::HasX86_64 [protected] |
HasX86_64 - True if the processor supports X86-64 instructions.
Definition at line 60 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and X86Subtarget().
bool llvm::X86Subtarget::HasSSE4A [protected] |
HasSSE4A - True if the processor supports SSE4A instructions.
Definition at line 63 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and hasSSE4A().
bool llvm::X86Subtarget::HasAVX [protected] |
HasAVX - Target has AVX instructions.
Definition at line 66 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and hasAVX().
bool llvm::X86Subtarget::HasFMA3 [protected] |
HasFMA3 - Target has 3-operand fused multiply-add.
Definition at line 69 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and hasFMA3().
bool llvm::X86Subtarget::HasFMA4 [protected] |
HasFMA4 - Target has 4-operand fused multiply-add.
Definition at line 72 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and hasFMA4().
bool llvm::X86Subtarget::IsBTMemSlow [protected] |
IsBTMemSlow - True if BT (bit test) of memory instructions are slow.
Definition at line 75 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and isBTMemSlow().
unsigned char llvm::X86Subtarget::DarwinVers [protected] |
DarwinVers - Nonzero if this is a darwin platform: the numeric version of the platform, e.g. 8 = 10.4 (Tiger), 9 = 10.5 (Leopard), etc.
Definition at line 79 of file X86Subtarget.h.
Referenced by getDarwinVers(), and X86Subtarget().
bool llvm::X86Subtarget::IsLinux [protected] |
isLinux - true if this is a "linux" platform.
Definition at line 82 of file X86Subtarget.h.
Referenced by isLinux(), and X86Subtarget().
unsigned llvm::X86Subtarget::stackAlignment [protected] |
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and which must be maintained by every function.
Definition at line 86 of file X86Subtarget.h.
Referenced by getStackAlignment(), and X86Subtarget().
unsigned llvm::X86Subtarget::MaxInlineSizeThreshold [protected] |
Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.
Definition at line 90 of file X86Subtarget.h.
Referenced by getMaxInlineSizeThreshold().
| enum { ... } llvm::X86Subtarget::TargetType |
Referenced by isTargetCygMing(), isTargetCygwin(), isTargetDarwin(), isTargetELF(), isTargetMingw(), isTargetWin64(), isTargetWindows(), and X86Subtarget().