LLVM API Documentation
#include <X86Subtarget.h>


Public Types | |
| enum | AsmWriterFlavorTy { ATT = 0, Intel = 1, Unset } |
| enum | { isELF, isCygwin, isDarwin, isWindows, isMingw } |
Public Member Functions | |
| X86Subtarget (const Module &M, const std::string &FS, bool is64Bit) | |
| unsigned | getStackAlignment () const |
| unsigned | getMaxInlineSizeThreshold () const |
| void | 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 | has3DNow () const |
| bool | has3DNowA () const |
| bool | isBTMemSlow () const |
| unsigned | getAsmFlavor () const |
| bool | isFlavorAtt () const |
| bool | isFlavorIntel () 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 | isPICStyleStub () const |
| bool | isPICStyleRIPRel () const |
| bool | isPICStyleWinPIC () const |
| unsigned | getDarwinVers () const |
| getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard. | |
| bool | isLinux () const |
| isLinux - Return true if the target is "Linux". | |
| bool | GVRequiresExtraLoad (const GlobalValue *GV, const TargetMachine &TM, bool isDirectCall) const |
| bool | GVRequiresRegister (const GlobalValue *GV, const TargetMachine &TM, bool isDirectCall) 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 | |
| AsmWriterFlavorTy | AsmFlavor |
| PICStyles::Style | PICStyle |
| X86SSEEnum | X86SSELevel |
| X863DNowEnum | X863DNowLevel |
| bool | HasX86_64 |
| 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 31 of file X86Subtarget.h.
enum llvm::X86Subtarget::X86SSEEnum [protected] |
Definition at line 39 of file X86Subtarget.h.
enum llvm::X86Subtarget::X863DNowEnum [protected] |
| anonymous enum |
| X86Subtarget::X86Subtarget | ( | const Module & | M, | |
| const std::string & | FS, | |||
| bool | is64Bit | |||
| ) |
This constructor initializes the data members to match that of the specified module.
Definition at line 305 of file X86Subtarget.cpp.
References AsmFlavor, ATT, AutoDetectSubtargetFeatures(), DarwinVers, DOUT, GetCurrentX86CPU(), llvm::Module::getTargetTriple(), HasX86_64, Intel, isCygwin, isDarwin, isELF, IsLinux, isMingw, isWindows, ParseSubtargetFeatures(), SSE2, llvm::StackAlignment, stackAlignment, TargetType, Unset, 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 103 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 107 of file X86Subtarget.h.
References MaxInlineSizeThreshold.
| void 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 166 of file X86Subtarget.cpp.
References c, DetectFamilyModel(), llvm::N86::EAX, llvm::N86::EBX, llvm::N86::ECX, llvm::N86::EDX, llvm::X86::GetCpuIDAndInfo(), HasX86_64, IsBTMemSlow, MMX, SSE1, SSE2, SSE3, SSE41, SSE42, SSSE3, and X86SSELevel.
Referenced by X86Subtarget().
| bool llvm::X86Subtarget::is64Bit | ( | ) | const [inline] |
Definition at line 117 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::X86InstrInfo::getPointerRegClass(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), getVZextMovL(), llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::X86TargetLowering::isLegalAddressingMode(), llvm::X86TargetLowering::isTruncateFree(), PerformBuildVectorCombine(), PerformSTORECombine(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(), X86FastISel::X86FastISel(), llvm::X86RegisterInfo::X86RegisterInfo(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| PICStyles::Style llvm::X86Subtarget::getPICStyle | ( | ) | const [inline] |
| void llvm::X86Subtarget::setPICStyle | ( | PICStyles::Style | Style | ) | [inline] |
Definition at line 120 of file X86Subtarget.h.
References PICStyle.
Referenced by llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::hasMMX | ( | ) | const [inline] |
Definition at line 122 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 123 of file X86Subtarget.h.
References SSE1, and X86SSELevel.
Referenced by llvm::X86TargetLowering::getByValTypeAlignment(), llvm::X86TargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), llvm::X86TargetLowering::LowerXConstraint(), X86FastISel::X86FastISel(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE2 | ( | ) | const [inline] |
Definition at line 124 of file X86Subtarget.h.
References SSE2, and X86SSELevel.
Referenced by llvm::X86TargetLowering::getOptimalMemOpType(), llvm::X86TargetLowering::getRegForInlineAsmConstraint(), llvm::X86TargetLowering::LowerXConstraint(), PerformSELECTCombine(), X86FastISel::X86FastISel(), and llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE3 | ( | ) | const [inline] |
Definition at line 125 of file X86Subtarget.h.
References SSE3, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSSE3 | ( | ) | const [inline] |
| bool llvm::X86Subtarget::hasSSE41 | ( | ) | const [inline] |
Definition at line 127 of file X86Subtarget.h.
References SSE41, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::hasSSE42 | ( | ) | const [inline] |
Definition at line 128 of file X86Subtarget.h.
References SSE42, and X86SSELevel.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::has3DNow | ( | ) | const [inline] |
| bool llvm::X86Subtarget::has3DNowA | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isBTMemSlow | ( | ) | const [inline] |
| unsigned llvm::X86Subtarget::getAsmFlavor | ( | ) | const [inline] |
Definition at line 134 of file X86Subtarget.h.
References AsmFlavor, and Unset.
Referenced by llvm::X86TargetAsmInfo< llvm::TargetAsmInfo >::X86TargetAsmInfo().
| bool llvm::X86Subtarget::isFlavorAtt | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isFlavorIntel | ( | ) | const [inline] |
Definition at line 139 of file X86Subtarget.h.
References AsmFlavor, and Intel.
Referenced by llvm::X86TargetMachine::createTargetAsmInfo(), and llvm::createX86CodePrinterPass().
| bool llvm::X86Subtarget::isTargetDarwin | ( | ) | const [inline] |
Definition at line 141 of file X86Subtarget.h.
References isDarwin, and TargetType.
Referenced by llvm::X86TargetMachine::addCodeEmitter(), llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86ATTAsmPrinter::doInitialization(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), getDataLayout(), llvm::X86RegisterInfo::getDwarfRegNum(), getPICLabelString(), GVRequiresExtraLoad(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetELF | ( | ) | const [inline] |
Definition at line 142 of file X86Subtarget.h.
References isELF, and TargetType.
Referenced by llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::X86TargetMachine::getELFWriterInfo(), getPICLabelString(), GVRequiresExtraLoad(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), shouldPrintPLT(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetWindows | ( | ) | const [inline] |
Definition at line 145 of file X86Subtarget.h.
References isWindows, and TargetType.
Referenced by GVRequiresExtraLoad().
| bool llvm::X86Subtarget::isTargetMingw | ( | ) | const [inline] |
Definition at line 146 of file X86Subtarget.h.
References isMingw, and TargetType.
Referenced by llvm::X86TargetLowering::X86TargetLowering().
| bool llvm::X86Subtarget::isTargetCygMing | ( | ) | const [inline] |
Definition at line 147 of file X86Subtarget.h.
References isCygwin, isMingw, and TargetType.
Referenced by llvm::X86ATTAsmPrinter::decorateName(), llvm::X86ATTAsmPrinter::doFinalization(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::X86RegisterInfo::emitPrologue(), llvm::X86RegisterInfo::getDwarfRegNum(), GVRequiresExtraLoad(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().
| bool llvm::X86Subtarget::isTargetCygwin | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isTargetWin64 | ( | ) | const [inline] |
Definition at line 150 of file X86Subtarget.h.
References isMingw, isWindows, and TargetType.
Referenced by llvm::X86RegisterInfo::X86RegisterInfo(), and llvm::X86TargetMachine::X86TargetMachine().
| std::string llvm::X86Subtarget::getDataLayout | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isPICStyleSet | ( | ) | const [inline] |
| bool llvm::X86Subtarget::isPICStyleGOT | ( | ) | const [inline] |
Definition at line 168 of file X86Subtarget.h.
References llvm::PICStyles::GOT, and PICStyle.
Referenced by llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printPICJumpTableEntry(), llvm::X86ATTAsmPrinter::printPICJumpTableSetLabel(), shouldPrintGOT(), and shouldPrintPLT().
| bool llvm::X86Subtarget::isPICStyleStub | ( | ) | const [inline] |
Definition at line 169 of file X86Subtarget.h.
References PICStyle, and llvm::PICStyles::Stub.
Referenced by llvm::X86ATTAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printPICJumpTableEntry(), and shouldPrintStub().
| bool llvm::X86Subtarget::isPICStyleRIPRel | ( | ) | const [inline] |
Definition at line 170 of file X86Subtarget.h.
References PICStyle, and llvm::PICStyles::RIPRel.
Referenced by llvm::X86TargetLowering::getPICJumpTableRelocBase(), llvm::X86ATTAsmPrinter::printOperand(), llvm::X86ATTAsmPrinter::printPICJumpTableEntry(), llvm::X86ATTAsmPrinter::printPICJumpTableSetLabel(), shouldPrintPLT(), and llvm::X86TargetMachine::symbolicAddressesAreRIPRel().
| bool llvm::X86Subtarget::isPICStyleWinPIC | ( | ) | const [inline] |
| unsigned llvm::X86Subtarget::getDarwinVers | ( | ) | const [inline] |
getDarwinVers - Return the darwin version number, 8 = tiger, 9 = leopard.
Definition at line 174 of file X86Subtarget.h.
References DarwinVers.
Referenced by getBZeroEntry(), llvm::X86DarwinTargetAsmInfo::getEHGlobalPrefix(), llvm::X86ATTAsmPrinter::printOperand(), and llvm::X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo().
| bool llvm::X86Subtarget::isLinux | ( | ) | const [inline] |
isLinux - Return true if the target is "Linux".
Definition at line 177 of file X86Subtarget.h.
References IsLinux.
| bool X86Subtarget::GVRequiresExtraLoad | ( | const GlobalValue * | GV, | |
| const TargetMachine & | TM, | |||
| bool | isDirectCall | |||
| ) | const |
True if accessing the GV requires an extra load. For Windows, dllimported symbols are indirect, loading the value at address GV rather then the value of GV itself. This means that the GlobalAddress must be in the base or index register of the address, not the GV offset field.
True if accessing the GV requires an extra load. For Windows, dllimported symbols are indirect, loading the value at address GV rather then the value of GV itself. This means that the GlobalAddress must be in the base or index register of the address, not the GV offset field.
Definition at line 37 of file X86Subtarget.cpp.
References llvm::TargetMachine::getCodeModel(), llvm::TargetMachine::getRelocationModel(), llvm::GlobalValue::hasCommonLinkage(), llvm::GlobalValue::hasDLLImportLinkage(), llvm::GlobalValue::hasHiddenVisibility(), llvm::GlobalValue::hasInternalLinkage(), llvm::GlobalValue::hasNotBeenReadFromBitcode(), llvm::GlobalValue::isDeclaration(), isTargetCygMing(), isTargetDarwin(), isTargetELF(), isTargetWindows(), llvm::CodeModel::Large, llvm::GlobalValue::mayBeOverridden(), and llvm::Reloc::Static.
Referenced by GVRequiresRegister(), llvm::X86TargetLowering::isLegalAddressingMode(), and llvm::X86ATTAsmPrinter::printOperand().
| bool X86Subtarget::GVRequiresRegister | ( | const GlobalValue * | GV, | |
| const TargetMachine & | TM, | |||
| bool | isDirectCall | |||
| ) | const |
True if accessing the GV requires a register. This is a superset of the cases where GVRequiresExtraLoad is true. Some variations of PIC require a register, but not an extra load.
True if accessing the GV requires a register. This is a superset of the cases where GVRequiresExtraLoad is true. Some variations of PIC require a register, but not an extra load.
Definition at line 72 of file X86Subtarget.cpp.
References llvm::TargetMachine::getRelocationModel(), GVRequiresExtraLoad(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasInternalLinkage(), and llvm::Reloc::PIC_.
Referenced by llvm::X86TargetLowering::isLegalAddressingMode().
| 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 90 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 102 of file X86Subtarget.cpp.
AsmWriterFlavorTy llvm::X86Subtarget::AsmFlavor [protected] |
AsmFlavor - Which x86 asm dialect to use.
Definition at line 49 of file X86Subtarget.h.
Referenced by getAsmFlavor(), isFlavorAtt(), isFlavorIntel(), and X86Subtarget().
PICStyles::Style llvm::X86Subtarget::PICStyle [protected] |
PICStyle - Which PIC style to use
Definition at line 53 of file X86Subtarget.h.
Referenced by getPICStyle(), isPICStyleGOT(), isPICStyleRIPRel(), isPICStyleSet(), isPICStyleStub(), isPICStyleWinPIC(), and setPICStyle().
X86SSEEnum llvm::X86Subtarget::X86SSELevel [protected] |
X86SSELevel - MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
Definition at line 57 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 61 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 65 of file X86Subtarget.h.
Referenced by AutoDetectSubtargetFeatures(), and X86Subtarget().
bool llvm::X86Subtarget::IsBTMemSlow [protected] |
IsBTMemSlow - True if BT (bit test) of memory instructions are slow.
Definition at line 68 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 72 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 75 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 79 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 83 of file X86Subtarget.h.
Referenced by getMaxInlineSizeThreshold().
| enum { ... } llvm::X86Subtarget::TargetType |
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.