LLVM API Documentation

llvm::X86Subtarget Class Reference

#include <X86Subtarget.h>

Inheritance diagram for llvm::X86Subtarget:
[legend]
Collaboration diagram for llvm::X86Subtarget:
[legend]

List of all members.

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


Detailed Description

Definition at line 36 of file X86Subtarget.h.


Member Enumeration Documentation

Enumerator:
NoMMXSSE 
MMX 
SSE1 
SSE2 
SSE3 
SSSE3 
SSE41 
SSE42 

Definition at line 38 of file X86Subtarget.h.

Enumerator:
NoThreeDNow 
ThreeDNow 
ThreeDNowA 

Definition at line 42 of file X86Subtarget.h.

anonymous enum

Enumerator:
isELF 
isCygwin 
isDarwin 
isWindows 
isMingw 

Definition at line 98 of file X86Subtarget.h.


Constructor & Destructor Documentation

X86Subtarget::X86Subtarget ( const std::string &  TT,
const std::string &  FS,
bool  is64Bit 
)


Member Function Documentation

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]

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]

bool llvm::X86Subtarget::hasMMX (  )  const [inline]

bool llvm::X86Subtarget::hasSSE1 (  )  const [inline]

bool llvm::X86Subtarget::hasSSE2 (  )  const [inline]

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]

Definition at line 137 of file X86Subtarget.h.

References HasSSE4A.

bool llvm::X86Subtarget::has3DNow (  )  const [inline]

Definition at line 138 of file X86Subtarget.h.

References ThreeDNow, and X863DNowLevel.

bool llvm::X86Subtarget::has3DNowA (  )  const [inline]

Definition at line 139 of file X86Subtarget.h.

References ThreeDNowA, and X863DNowLevel.

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]

Definition at line 141 of file X86Subtarget.h.

References HasFMA3.

bool llvm::X86Subtarget::hasFMA4 (  )  const [inline]

Definition at line 142 of file X86Subtarget.h.

References HasFMA4.

bool llvm::X86Subtarget::isBTMemSlow (  )  const [inline]

Definition at line 143 of file X86Subtarget.h.

References IsBTMemSlow.

bool llvm::X86Subtarget::isTargetDarwin (  )  const [inline]

bool llvm::X86Subtarget::isTargetELF (  )  const [inline]

bool llvm::X86Subtarget::isTargetWindows (  )  const [inline]

Definition at line 147 of file X86Subtarget.h.

References isWindows, and TargetType.

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]

bool llvm::X86Subtarget::isTargetCygwin (  )  const [inline]

Definition at line 152 of file X86Subtarget.h.

References isCygwin, and TargetType.

bool llvm::X86Subtarget::isTargetWin64 (  )  const [inline]

std::string llvm::X86Subtarget::getDataLayout (  )  const [inline]

Definition at line 157 of file X86Subtarget.h.

References is64Bit(), and isTargetDarwin().

bool llvm::X86Subtarget::isPICStyleSet (  )  const [inline]

Definition at line 168 of file X86Subtarget.h.

References llvm::PICStyles::None, and PICStyle.

bool llvm::X86Subtarget::isPICStyleGOT (  )  const [inline]

bool llvm::X86Subtarget::isPICStyleRIPRel (  )  const [inline]

bool llvm::X86Subtarget::isPICStyleStubPIC (  )  const [inline]

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]

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

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.


Member Data Documentation

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().

X863DNowLevel - 3DNow or 3DNow Athlon, or none supported.

Definition at line 56 of file X86Subtarget.h.

Referenced by has3DNow(), has3DNowA(), and X86Subtarget().

HasX86_64 - True if the processor supports X86-64 instructions.

Definition at line 60 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and X86Subtarget().

HasSSE4A - True if the processor supports SSE4A instructions.

Definition at line 63 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and hasSSE4A().

HasAVX - Target has AVX instructions.

Definition at line 66 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and hasAVX().

HasFMA3 - Target has 3-operand fused multiply-add.

Definition at line 69 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and hasFMA3().

HasFMA4 - Target has 4-operand fused multiply-add.

Definition at line 72 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and hasFMA4().

IsBTMemSlow - True if BT (bit test) of memory instructions are slow.

Definition at line 75 of file X86Subtarget.h.

Referenced by AutoDetectSubtargetFeatures(), and isBTMemSlow().

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().

isLinux - true if this is a "linux" platform.

Definition at line 82 of file X86Subtarget.h.

Referenced by isLinux(), and X86Subtarget().

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().

Max. memset / memcpy size that is turned into rep/movs, rep/stos ops.

Definition at line 90 of file X86Subtarget.h.

Referenced by getMaxInlineSizeThreshold().


The documentation for this class was generated from the following files: