LLVM API Documentation

llvm::X86 Namespace Reference

Define some predicates that are used for node matching. More...


Enumerations

enum  CondCode {
  COND_A = 0, COND_AE = 1, COND_B = 2, COND_BE = 3,
  COND_E = 4, COND_G = 5, COND_GE = 6, COND_L = 7,
  COND_LE = 8, COND_NE = 9, COND_NO = 10, COND_NP = 11,
  COND_NS = 12, COND_O = 13, COND_P = 14, COND_S = 15,
  COND_NE_OR_P, COND_NP_OR_E, COND_INVALID
}
enum  SubregIndex { SUBREG_8BIT = 1, SUBREG_8BIT_HI = 2, SUBREG_16BIT = 3, SUBREG_32BIT = 4 }
enum  RelocationType {
  reloc_pcrel_word = 0, reloc_picrel_word = 1, reloc_absolute_word = 2, reloc_absolute_word_sext = 3,
  reloc_absolute_dword = 4
}

Functions

unsigned GetCondBranchFromCond (CondCode CC)
CondCode GetOppositeBranchCondition (X86::CondCode CC)
bool isPSHUFDMask (ShuffleVectorSDNode *N)
bool isPSHUFHWMask (ShuffleVectorSDNode *N)
bool isPSHUFLWMask (ShuffleVectorSDNode *N)
bool isSHUFPMask (ShuffleVectorSDNode *N)
bool isMOVHLPSMask (ShuffleVectorSDNode *N)
bool isMOVHLPS_v_undef_Mask (ShuffleVectorSDNode *N)
bool isMOVLPMask (ShuffleVectorSDNode *N)
bool isMOVHPMask (ShuffleVectorSDNode *N)
bool isUNPCKLMask (ShuffleVectorSDNode *N, bool V2IsSplat=false)
bool isUNPCKHMask (ShuffleVectorSDNode *N, bool V2IsSplat=false)
bool isUNPCKL_v_undef_Mask (ShuffleVectorSDNode *N)
bool isUNPCKH_v_undef_Mask (ShuffleVectorSDNode *N)
bool isMOVLMask (ShuffleVectorSDNode *N)
bool isMOVSHDUPMask (ShuffleVectorSDNode *N)
bool isMOVSLDUPMask (ShuffleVectorSDNode *N)
bool isMOVDDUPMask (ShuffleVectorSDNode *N)
unsigned getShuffleSHUFImmediate (SDNode *N)
unsigned getShufflePSHUFHWImmediate (SDNode *N)
unsigned getShufflePSHUFLWImmediate (SDNode *N)
bool isZeroNode (SDValue Elt)
bool isOffsetSuitableForCodeModel (int64_t Offset, CodeModel::Model M, bool hasSymbolicDisplacement=true)
FastISel * createFastISel (MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw, DenseMap< const Value *, unsigned > &, DenseMap< const BasicBlock *, MachineBasicBlock * > &, DenseMap< const AllocaInst *, int > &, SmallSet< Instruction *, 8 > &)
bool GetCpuIDAndInfo (unsigned value, unsigned *rEAX, unsigned *rEBX, unsigned *rECX, unsigned *rEDX)


Detailed Description

Define some predicates that are used for node matching.

Enumeration Type Documentation

Enumerator:
COND_A 
COND_AE 
COND_B 
COND_BE 
COND_E 
COND_G 
COND_GE 
COND_L 
COND_LE 
COND_NE 
COND_NO 
COND_NP 
COND_NS 
COND_O 
COND_P 
COND_S 
COND_NE_OR_P 
COND_NP_OR_E 
COND_INVALID 

Definition at line 30 of file X86InstrInfo.h.

RelocationType - An enum for the x86 relocation codes. Note that the terminology here doesn't follow x86 convention - word means 32-bit and dword means 64-bit. The relocations will be treated by JIT or ObjectCode emitters, this is transparent to the x86 code emitter but JIT and ObjectCode will treat them differently

Enumerator:
reloc_pcrel_word  reloc_pcrel_word - PC relative relocation, add the relocated value to the value already in memory, after we adjust it for where the PC is.
reloc_picrel_word  reloc_picrel_word - PIC base relative relocation, add the relocated value to the value already in memory, after we adjust it for where the PIC base is.
reloc_absolute_word  reloc_absolute_word - absolute relocation, just add the relocated value to the value already in memory.
reloc_absolute_word_sext  reloc_absolute_word_sext - absolute relocation, just add the relocated value to the value already in memory. In object files, it represents a value which must be sign-extended when resolving the relocation.
reloc_absolute_dword  reloc_absolute_dword - absolute relocation, just add the relocated value to the value already in memory.

Definition at line 26 of file X86Relocations.h.

SubregIndex - The index of various sized subregister classes. Note that these indices must be kept in sync with the class indices in the X86RegisterInfo.td file.

Enumerator:
SUBREG_8BIT 
SUBREG_8BIT_HI 
SUBREG_16BIT 
SUBREG_32BIT 

Definition at line 37 of file X86RegisterInfo.h.


Function Documentation

llvm::FastISel * llvm::X86::createFastISel ( MachineFunction &  mf,
MachineModuleInfo *  mmi,
DwarfWriter *  dw,
DenseMap< const Value *, unsigned > &  vm,
DenseMap< const BasicBlock *, MachineBasicBlock * > &  bm,
DenseMap< const AllocaInst *, int > &  am,
SmallSet< Instruction *, 8 > &  cil 
)

Definition at line 1673 of file X86FastISel.cpp.

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

unsigned llvm::X86::GetCondBranchFromCond ( X86::CondCode  CC  ) 

bool llvm::X86::GetCpuIDAndInfo ( unsigned  value,
unsigned *  rEAX,
unsigned *  rEBX,
unsigned *  rECX,
unsigned *  rEDX 
)

GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the specified arguments. If we can't run cpuid on the host, return true.

GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in the specified arguments. If we can't run cpuid on the host, return true.

Definition at line 161 of file X86Subtarget.cpp.

Referenced by llvm::X86Subtarget::AutoDetectSubtargetFeatures(), GetCurrentX86CPU(), and llvm::X86JITInfo::getLazyResolverFunction().

X86::CondCode llvm::X86::GetOppositeBranchCondition ( X86::CondCode  CC  ) 

GetOppositeBranchCondition - Return the inverse of the specified cond, e.g. turning COND_E to COND_NE.

GetOppositeBranchCondition - Return the inverse of the specified condition, e.g. turning COND_E to COND_NE.

Definition at line 1480 of file X86InstrInfo.cpp.

References COND_A, COND_AE, COND_B, COND_BE, COND_E, COND_G, COND_GE, COND_L, COND_LE, COND_NE, COND_NO, COND_NP, COND_NS, COND_O, COND_P, COND_S, and llvm_unreachable.

unsigned llvm::X86::getShufflePSHUFHWImmediate ( SDNode *  N  ) 

getShufflePSHUFHWImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUFHW instructions.

getShufflePSHUFHWImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUFHW instructions.

Definition at line 2730 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt().

unsigned llvm::X86::getShufflePSHUFLWImmediate ( SDNode *  N  ) 

getShufflePSHUFKWImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUFLW instructions.

getShufflePSHUFLWImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUFLW instructions.

Definition at line 2747 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt().

unsigned llvm::X86::getShuffleSHUFImmediate ( SDNode *  N  ) 

getShuffleSHUFImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUF* and SHUFP* instructions.

getShuffleSHUFImmediate - Return the appropriate immediate to shuffle the specified isShuffleMask VECTOR_SHUFFLE mask with PSHUF* and SHUFP* instructions.

Definition at line 2710 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), and llvm::EVT::getVectorNumElements().

bool llvm::X86::isMOVDDUPMask ( ShuffleVectorSDNode *  N  ) 

isMOVDDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVDDUP.

isMOVDDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVDDUP.

Definition at line 2695 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isUndefOrEqual().

bool llvm::X86::isMOVHLPS_v_undef_Mask ( ShuffleVectorSDNode *  N  ) 

isMOVHLPS_v_undef_Mask - Special case of isMOVHLPSMask for canonical form of vector_shuffle v, v, <2, 3, 2, 3>, i.e. vector_shuffle v, undef, <2, 3, 2, 3>

isMOVHLPS_v_undef_Mask - Special case of isMOVHLPSMask for canonical form of vector_shuffle v, v, <2, 3, 2, 3>, i.e. vector_shuffle v, undef, <2, 3, 2, 3>

Definition at line 2469 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isUndefOrEqual().

bool llvm::X86::isMOVHLPSMask ( ShuffleVectorSDNode *  N  ) 

isMOVHLPSMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVHLPS.

isMOVHLPSMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVHLPS.

Definition at line 2416 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isUndefOrEqual().

bool llvm::X86::isMOVHPMask ( ShuffleVectorSDNode *  N  ) 

isMOVHPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for MOVHP{S|D}. as well as MOVLHPS.

isMOVHPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVHP{S|D} and MOVLHPS.

Definition at line 2449 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isUndefOrEqual().

bool llvm::X86::isMOVLMask ( ShuffleVectorSDNode *  N  ) 

isMOVLMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSS, MOVSD, and MOVD, i.e. setting the lowest element.

Definition at line 2610 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isMOVLMask(), and M.

bool llvm::X86::isMOVLPMask ( ShuffleVectorSDNode *  N  ) 

isMOVLPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for MOVLP{S|D}.

isMOVLPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVLP{S|D}.

Definition at line 2429 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), llvm::EVT::getVectorNumElements(), and isUndefOrEqual().

bool llvm::X86::isMOVSHDUPMask ( ShuffleVectorSDNode *  N  ) 

isMOVSHDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSHDUP.

isMOVSHDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSHDUP.

Definition at line 2646 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), and llvm::EVT::getVectorNumElements().

bool llvm::X86::isMOVSLDUPMask ( ShuffleVectorSDNode *  N  ) 

isMOVSLDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSLDUP.

isMOVSLDUPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to MOVSLDUP.

Definition at line 2672 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMaskElt(), llvm::SDNode::getValueType(), and llvm::EVT::getVectorNumElements().

bool llvm::X86::isOffsetSuitableForCodeModel ( int64_t  Offset,
CodeModel::Model  M,
bool  hasSymbolicDisplacement = true 
)

isOffsetSuitableForCodeModel - Returns true of the given offset can be fit into displacement field of the instruction.

Definition at line 2150 of file X86ISelLowering.cpp.

References llvm::isInt32(), llvm::CodeModel::Kernel, and llvm::CodeModel::Small.

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

bool llvm::X86::isPSHUFDMask ( ShuffleVectorSDNode *  N  ) 

isPSHUFDMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to PSHUFD.

Definition at line 2308 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isPSHUFDMask(), and M.

bool llvm::X86::isPSHUFHWMask ( ShuffleVectorSDNode *  N  ) 

isPSHUFHWMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to PSHUFD.

Definition at line 2333 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isPSHUFHWMask(), and M.

bool llvm::X86::isPSHUFLWMask ( ShuffleVectorSDNode *  N  ) 

isPSHUFLWMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to PSHUFD.

Definition at line 2358 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isPSHUFLWMask(), and M.

bool llvm::X86::isSHUFPMask ( ShuffleVectorSDNode *  N  ) 

isSHUFPMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to SHUFP*.

Definition at line 2382 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isSHUFPMask(), and M.

bool llvm::X86::isUNPCKH_v_undef_Mask ( ShuffleVectorSDNode *  N  ) 

isUNPCKH_v_undef_Mask - Special case of isUNPCKHMask for canonical form of vector_shuffle v, v, <2, 6, 3, 7>, i.e. vector_shuffle v, undef, <2, 2, 3, 3>

Definition at line 2585 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isUNPCKH_v_undef_Mask(), and M.

bool llvm::X86::isUNPCKHMask ( ShuffleVectorSDNode *  N,
bool  V2IsSplat = false 
)

isUNPCKHMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to UNPCKH.

Definition at line 2535 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isUNPCKHMask(), and M.

bool llvm::X86::isUNPCKL_v_undef_Mask ( ShuffleVectorSDNode *  N  ) 

isUNPCKL_v_undef_Mask - Special case of isUNPCKLMask for canonical form of vector_shuffle v, v, <0, 4, 1, 5>, i.e. vector_shuffle v, undef, <0, 0, 1, 1>

Definition at line 2560 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isUNPCKL_v_undef_Mask(), and M.

bool llvm::X86::isUNPCKLMask ( ShuffleVectorSDNode *  N,
bool  V2IsSplat = false 
)

isUNPCKLMask - Return true if the specified VECTOR_SHUFFLE operand specifies a shuffle of elements that is suitable for input to UNPCKL.

Definition at line 2505 of file X86ISelLowering.cpp.

References llvm::ShuffleVectorSDNode::getMask(), llvm::SDNode::getValueType(), isUNPCKLMask(), and M.

bool llvm::X86::isZeroNode ( SDValue  Elt  ) 

isZeroNode - Returns true if Elt is a constant zero or a floating point constant +0.0.

isZeroNode - Returns true if Elt is a constant zero or a floating point constant +0.0.

Definition at line 2763 of file X86ISelLowering.cpp.

Referenced by getNumOfConsecutiveZeros(), and isZeroShuffle().