LLVM API Documentation

llvm::X86Subtarget Class Reference

#include <X86Subtarget.h>

Inheritance diagram for llvm::X86Subtarget:

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

Collaboration graph
[legend]
List of all members.

Public Types

 isELF
 isCygwin
 isDarwin
 isWindows
enum  { isELF, isCygwin, isDarwin, isWindows }

Public Member Functions

 X86Subtarget (const Module &M, const std::string &FS)
unsigned getStackAlignment () const
unsigned getMinRepStrSizeThreshold () const
void ParseSubtargetFeatures (const std::string &FS, const std::string &CPU)
bool is64Bit () const
bool hasMMX () const
bool hasSSE1 () const
bool hasSSE2 () const
bool hasSSE3 () const
bool has3DNow () const
bool has3DNowA () const
bool isTargetDarwin () const

Public Attributes

enum llvm::X86Subtarget:: { ... }  TargetType

Protected Types

 NoMMXSSE
 MMX
 SSE1
 SSE2
 SSE3
 NoThreeDNow
 ThreeDNow
 ThreeDNowA
enum  X86SSEEnum {
  NoMMXSSE, MMX, SSE1, SSE2,
  SSE3
}
enum  X863DNowEnum { NoThreeDNow, ThreeDNow, ThreeDNowA }

Protected Attributes

X86SSEEnum X86SSELevel
 X86SSELevel - MMX, SSE1, SSE2, SSE3, or none supported.
X863DNowEnum X863DNowLevel
 X863DNowLevel - 3DNow or 3DNow Athlon, or none supported.
bool Is64Bit
 Is64Bit - True if the processor supports Em64T.
unsigned stackAlignment
unsigned MinRepStrSizeThreshold
 Min. memset / memcpy size that is turned into rep/movs, rep/stos ops.

Detailed Description

Definition at line 24 of file X86Subtarget.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
isELF 
isCygwin 
isDarwin 
isWindows 

Definition at line 51 of file X86Subtarget.h.

enum llvm::X86Subtarget::X863DNowEnum [protected]

Enumerator:
NoThreeDNow 
ThreeDNow 
ThreeDNowA 

Definition at line 30 of file X86Subtarget.h.

enum llvm::X86Subtarget::X86SSEEnum [protected]

Enumerator:
NoMMXSSE 
MMX 
SSE1 
SSE2 
SSE3 

Definition at line 26 of file X86Subtarget.h.


Constructor & Destructor Documentation

X86Subtarget::X86Subtarget ( const Module M,
const std::string &  FS 
)

This constructor initializes the data members to match that of the specified module.

Definition at line 147 of file X86Subtarget.cpp.

References GetCurrentX86CPU(), llvm::Module::getTargetTriple(), Is64Bit, isCygwin, isDarwin, isELF, isWindows, M, MinRepStrSizeThreshold, NoMMXSSE, NoThreeDNow, ParseSubtargetFeatures(), stackAlignment, TargetType, X863DNowLevel, and X86SSELevel.


Member Function Documentation

unsigned llvm::X86Subtarget::getMinRepStrSizeThreshold (  )  const [inline]

getMinRepStrSizeThreshold - Returns the minimum memset / memcpy size required to turn the operation into a X86 rep/movs or rep/stos instruction. This is only used if the src / dst alignment is not DWORD aligned.

Definition at line 69 of file X86Subtarget.h.

References MinRepStrSizeThreshold.

Referenced by llvm::X86TargetLowering::LowerOperation().

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 63 of file X86Subtarget.h.

References stackAlignment.

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

Definition at line 81 of file X86Subtarget.h.

References ThreeDNow, and X863DNowLevel.

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

Definition at line 82 of file X86Subtarget.h.

References ThreeDNowA, and X863DNowLevel.

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

Definition at line 77 of file X86Subtarget.h.

References MMX, and X86SSELevel.

Referenced by llvm::X86TargetLowering::X86TargetLowering().

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

Definition at line 78 of file X86Subtarget.h.

References SSE1, and X86SSELevel.

Referenced by llvm::X86TargetLowering::getRegClassForInlineAsmConstraint(), and llvm::X86TargetLowering::X86TargetLowering().

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

Definition at line 79 of file X86Subtarget.h.

References SSE2, and X86SSELevel.

Referenced by llvm::X86TargetLowering::getRegClassForInlineAsmConstraint(), and llvm::X86TargetLowering::X86TargetLowering().

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

Definition at line 80 of file X86Subtarget.h.

References SSE3, and X86SSELevel.

Referenced by llvm::X86TargetLowering::X86TargetLowering().

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

Definition at line 75 of file X86Subtarget.h.

References Is64Bit.

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

Definition at line 84 of file X86Subtarget.h.

References isDarwin, and TargetType.

Referenced by llvm::X86TargetLowering::isLegalAddressImmediate(), llvm::X86TargetLowering::LowerOperation(), llvm::X86TargetLowering::X86TargetLowering(), and llvm::X86TargetMachine::X86TargetMachine().

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


Member Data Documentation

bool llvm::X86Subtarget::Is64Bit [protected]

Is64Bit - True if the processor supports Em64T.

Definition at line 41 of file X86Subtarget.h.

Referenced by is64Bit(), and X86Subtarget().

unsigned llvm::X86Subtarget::MinRepStrSizeThreshold [protected]

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

Definition at line 48 of file X86Subtarget.h.

Referenced by getMinRepStrSizeThreshold(), 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 45 of file X86Subtarget.h.

Referenced by getStackAlignment(), and X86Subtarget().

enum { ... } llvm::X86Subtarget::TargetType

Referenced by isTargetDarwin(), and X86Subtarget().

X863DNowEnum llvm::X86Subtarget::X863DNowLevel [protected]

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

Definition at line 38 of file X86Subtarget.h.

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

X86SSEEnum llvm::X86Subtarget::X86SSELevel [protected]

X86SSELevel - MMX, SSE1, SSE2, SSE3, or none supported.

Definition at line 35 of file X86Subtarget.h.

Referenced by hasMMX(), hasSSE1(), hasSSE2(), hasSSE3(), and X86Subtarget().


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