LLVM API Documentation

llvm::X86InstrInfo Class Reference

#include <X86InstrInfo.h>

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

List of all members.

Public Member Functions

 X86InstrInfo (X86TargetMachine &tm)
virtual const X86RegisterInfo & getRegisterInfo () const
virtual bool isMoveInstr (const MachineInstr &MI, unsigned &SrcReg, unsigned &DstReg, unsigned &SrcSubIdx, unsigned &DstSubIdx) const
unsigned isLoadFromStackSlot (const MachineInstr *MI, int &FrameIndex) const
unsigned isStoreToStackSlot (const MachineInstr *MI, int &FrameIndex) const
bool isReallyTriviallyReMaterializable (const MachineInstr *MI) const
void reMaterialize (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, const MachineInstr *Orig) const
bool isInvariantLoad (const MachineInstr *MI) const
virtual MachineInstr * convertToThreeAddress (MachineFunction::iterator &MFI, MachineBasicBlock::iterator &MBBI, LiveVariables *LV) const
virtual MachineInstr * commuteInstruction (MachineInstr *MI, bool NewMI) const
virtual bool isUnpredicatedTerminator (const MachineInstr *MI) const
virtual bool AnalyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const
virtual unsigned RemoveBranch (MachineBasicBlock &MBB) const
virtual unsigned InsertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, const SmallVectorImpl< MachineOperand > &Cond) const
virtual bool copyRegToReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const
virtual void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC) const
virtual void storeRegToAddr (MachineFunction &MF, unsigned SrcReg, bool isKill, SmallVectorImpl< MachineOperand > &Addr, const TargetRegisterClass *RC, SmallVectorImpl< MachineInstr * > &NewMIs) const
virtual void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC) const
virtual void loadRegFromAddr (MachineFunction &MF, unsigned DestReg, SmallVectorImpl< MachineOperand > &Addr, const TargetRegisterClass *RC, SmallVectorImpl< MachineInstr * > &NewMIs) const
virtual bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI) const
virtual bool restoreCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI) const
virtual MachineInstr * foldMemoryOperandImpl (MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, int FrameIndex) const
virtual MachineInstr * foldMemoryOperandImpl (MachineFunction &MF, MachineInstr *MI, const SmallVectorImpl< unsigned > &Ops, MachineInstr *LoadMI) const
virtual bool canFoldMemoryOperand (const MachineInstr *, const SmallVectorImpl< unsigned > &) const
virtual bool unfoldMemoryOperand (MachineFunction &MF, MachineInstr *MI, unsigned Reg, bool UnfoldLoad, bool UnfoldStore, SmallVectorImpl< MachineInstr * > &NewMIs) const
virtual bool unfoldMemoryOperand (SelectionDAG &DAG, SDNode *N, SmallVectorImpl< SDNode * > &NewNodes) const
virtual unsigned getOpcodeAfterMemoryUnfold (unsigned Opc, bool UnfoldLoad, bool UnfoldStore) const
virtual bool BlockHasNoFallThrough (const MachineBasicBlock &MBB) const
virtual bool ReverseBranchCondition (SmallVectorImpl< MachineOperand > &Cond) const
bool IgnoreRegisterClassBarriers (const TargetRegisterClass *RC) const
const TargetRegisterClass * getPointerRegClass () const
unsigned char getBaseOpcodeFor (const TargetInstrDesc *TID) const
unsigned char getBaseOpcodeFor (unsigned Opcode) const
virtual unsigned GetInstSizeInBytes (const MachineInstr *MI) const
unsigned getGlobalBaseReg (MachineFunction *MF) const

Static Public Member Functions

static bool isX86_64NonExtLowByteReg (unsigned reg)
static unsigned sizeOfImm (const TargetInstrDesc *Desc)
static bool isX86_64ExtendedReg (const MachineOperand &MO)
static unsigned determineREX (const MachineInstr &MI)


Detailed Description

Definition at line 263 of file X86InstrInfo.h.


Constructor & Destructor Documentation

X86InstrInfo::X86InstrInfo ( X86TargetMachine &  tm  )  [explicit]


Member Function Documentation

virtual const X86RegisterInfo& llvm::X86InstrInfo::getRegisterInfo (  )  const [inline, virtual]

getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As such, whenever a client has an instance of instruction info, it should always be able to get register info as well (through this method).

Definition at line 286 of file X86InstrInfo.h.

Referenced by llvm::X86TargetMachine::getRegisterInfo().

bool X86InstrInfo::isMoveInstr ( const MachineInstr &  MI,
unsigned &  SrcReg,
unsigned &  DstReg,
unsigned &  SrcSubIdx,
unsigned &  DstSubIdx 
) const [virtual]

Return true if the instruction is a register to register move and return the source and dest operands and their sub-register indices by reference.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 665 of file X86InstrInfo.cpp.

References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), and llvm::MachineOperand::isReg().

unsigned X86InstrInfo::isLoadFromStackSlot ( const MachineInstr *  MI,
int &  FrameIndex 
) const [virtual]

isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the destination along with the FrameIndex of the loaded stack slot. If not, return 0. This predicate must return 0 if the instruction has any side effects other than loading from the stack slot.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 708 of file X86InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().

unsigned X86InstrInfo::isStoreToStackSlot ( const MachineInstr *  MI,
int &  FrameIndex 
) const [virtual]

isStoreToStackSlot - If the specified machine instruction is a direct store to a stack slot, return the virtual or physical register number of the source reg along with the FrameIndex of the loaded stack slot. If not, return 0. This predicate must return 0 if the instruction has any side effects other than storing to the stack slot.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 739 of file X86InstrInfo.cpp.

References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().

bool X86InstrInfo::isReallyTriviallyReMaterializable ( const MachineInstr *  MI  )  const [virtual]

isReallyTriviallyReMaterializable - For instructions with opcodes for which the M_REMATERIALIZABLE flag is set, this function tests whether the instruction itself is actually trivially rematerializable, considering its operands. This is used for targets that have instructions that are only trivially rematerializable for specific uses. This predicate must return false if the instruction has any side effects other than producing a value, or if it requres any address registers that are not always available.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 794 of file X86InstrInfo.cpp.

References BaseReg, llvm::MachineRegisterInfo::def_begin(), llvm::MachineRegisterInfo::def_end(), E, llvm::MachineOperand::getGlobal(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::isCPI(), llvm::MachineOperand::isGlobal(), isGVStub(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), MF, MRI, regIsPICBase(), and ReMatPICStubLoad.

void X86InstrInfo::reMaterialize ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
unsigned  DestReg,
const MachineInstr *  Orig 
) const [virtual]

bool X86InstrInfo::isInvariantLoad ( const MachineInstr *  MI  )  const [virtual]

isInvariantLoad - Return true if the specified instruction (which is marked mayLoad) is loading from a location whose value is invariant across the function. For example, loading a value from the constant pool or from from the argument area of a function if it does not change. This should only return true of *all* loads the instruction does are invariant (if it does multiple loads).

Reimplemented from llvm::TargetInstrInfo.

Definition at line 959 of file X86InstrInfo.cpp.

References llvm::MachineFunction::getFrameInfo(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), Idx, llvm::MachineOperand::isCPI(), llvm::MachineOperand::isFI(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::MachineOperand::isGlobal(), isGVStub(), llvm::MachineFrameInfo::isImmutableObjectIndex(), and MFI.

MachineInstr * X86InstrInfo::convertToThreeAddress ( MachineFunction::iterator &  MFI,
MachineBasicBlock::iterator &  MBBI,
LiveVariables *  LV 
) const [virtual]

convertToThreeAddress - This method must be implemented by targets that set the M_CONVERTIBLE_TO_3_ADDR flag. When this flag is set, the target may be able to convert a two-address instruction into a true three-address instruction on demand. This allows the X86 target (for example) to convert ADD and SHL instructions into LEA instructions if they would require register copies due to two-addressness.

This method returns a null pointer if the transformation cannot be performed, otherwise it returns the new instruction.

convertToThreeAddress - This method must be implemented by targets that set the M_CONVERTIBLE_TO_3_ADDR flag. When this flag is set, the target may be able to convert a two-address instruction into a true three-address instruction on demand. This allows the X86 target (for example) to convert ADD and SHL instructions into LEA instructions if they would require register copies due to two-addressness.

This method returns a null pointer if the transformation cannot be performed, otherwise it returns the new instruction.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1014 of file X86InstrInfo.cpp.

References A, llvm::addFullAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::addRegOffset(), llvm::addRegReg(), llvm::BuildMI(), llvm::CallingConv::C, llvm::MachineRegisterInfo::createVirtualRegister(), Dest, llvm::ISD::EXTRACT_SUBREG, llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::TargetMachine::getSubtarget(), llvm::LiveVariables::getVarInfo(), hasLiveCondCodeDef(), llvm::X86AddressMode::IndexReg, llvm::ISD::INSERT_SUBREG, llvm::MachineOperand::isDead(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isKill(), M, MF, MI, RegInfo, llvm::LiveVariables::replaceKillInstruction(), llvm::X86AddressMode::Scale, Src, and llvm::X86::SUBREG_16BIT.

MachineInstr * X86InstrInfo::commuteInstruction ( MachineInstr *  MI,
bool  NewMI 
) const [virtual]

commuteInstruction - We have a few instructions that must be hacked on to commute them.

commuteInstruction - We have a few instructions that must be hacked on to commute them.

Reimplemented from llvm::TargetInstrInfoImpl.

Definition at line 1258 of file X86InstrInfo.cpp.

References llvm::MachineFunction::CloneMachineInstr(), llvm::TargetInstrInfoImpl::commuteInstruction(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), MF, llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setImm().

bool X86InstrInfo::isUnpredicatedTerminator ( const MachineInstr *  MI  )  const [virtual]

isUnpredicatedTerminator - Returns true if the instruction is a terminator instruction that has not been predicated.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1468 of file X86InstrInfo.cpp.

References llvm::MachineInstr::getDesc(), llvm::TargetInstrDesc::isBarrier(), llvm::TargetInstrDesc::isBranch(), llvm::TargetInstrDesc::isPredicable(), llvm::TargetInstrInfo::isPredicated(), and llvm::TargetInstrDesc::isTerminator().

Referenced by isBrAnalysisUnpredicatedTerminator().

bool X86InstrInfo::AnalyzeBranch ( MachineBasicBlock &  MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const [virtual]

AnalyzeBranch - Analyze the branching code at the end of MBB, returning true if it cannot be understood (e.g. it's a switch dispatch or isn't implemented for a target). Upon success, this returns false and returns with the following information in various cases:

1. If this block ends with no branches (it just falls through to its succ) just return false, leaving TBB/FBB null. 2. If this block ends with only an unconditional branch, it sets TBB to be the destination block. 3. If this block ends with an conditional branch and it falls through to an successor block, it sets TBB to be the branch destination block and a list of operands that evaluate the condition. These operands can be passed to other TargetInstrInfo methods to create new branches. 4. If this block ends with an conditional branch and an unconditional block, it returns the 'true' destination in TBB, the 'false' destination in FBB, and a list of operands that evaluate the condition. These operands can be passed to other TargetInstrInfo methods to create new branches.

Note that RemoveBranch and InsertBranch must be implemented to support cases where this method returns success.

If AllowModify is true, then this routine is allowed to modify the basic block (e.g. delete instructions after the unconditional branch).

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1488 of file X86InstrInfo.cpp.

References llvm::MachineBasicBlock::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::X86::COND_E, llvm::X86::COND_INVALID, llvm::X86::COND_NE, llvm::X86::COND_NE_OR_P, llvm::X86::COND_NP, llvm::X86::COND_NP_OR_E, llvm::X86::COND_P, llvm::MachineOperand::CreateImm(), llvm::SmallVectorImpl< T >::empty(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::eraseFromParent(), GetCondFromBranchOpc(), isBrAnalysisUnpredicatedTerminator(), llvm::MachineBasicBlock::isLayoutSuccessor(), llvm::next(), llvm::SmallVectorImpl< T >::push_back(), and llvm::SmallVectorImpl< T >::size().

unsigned X86InstrInfo::RemoveBranch ( MachineBasicBlock &  MBB  )  const [virtual]

RemoveBranch - Remove the branching code at the end of the specific MBB. This is only invoked in cases where AnalyzeBranch returns success. It returns the number of instructions that were removed.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1577 of file X86InstrInfo.cpp.

References llvm::MachineBasicBlock::begin(), llvm::X86::COND_INVALID, llvm::MachineBasicBlock::end(), and GetCondFromBranchOpc().

unsigned X86InstrInfo::InsertBranch ( MachineBasicBlock &  MBB,
MachineBasicBlock *  TBB,
MachineBasicBlock *  FBB,
const SmallVectorImpl< MachineOperand > &  Cond 
) const [virtual]

InsertBranch - Insert a branch into the end of the specified MachineBasicBlock. This operands to this method are the same as those returned by AnalyzeBranch. This is invoked in cases where AnalyzeBranch returns success and when an unconditional branch (TBB is non-null, FBB is null, Cond is empty) needs to be inserted. It returns the number of instructions inserted.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1619 of file X86InstrInfo.cpp.

References llvm::MachineInstrBuilder::addMBB(), llvm::BuildMI(), llvm::X86::COND_NE_OR_P, llvm::X86::COND_NP_OR_E, llvm::SmallVectorImpl< T >::empty(), GetCondBranchFromCond(), and llvm::SmallVectorImpl< T >::size().

bool X86InstrInfo::copyRegToReg ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
unsigned  DestReg,
unsigned  SrcReg,
const TargetRegisterClass *  DestRC,
const TargetRegisterClass *  SrcRC 
) const [virtual]

copyRegToReg - Emit instructions to copy between a pair of registers. It returns false if the target does not how to copy between the specified registers.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1666 of file X86InstrInfo.cpp.

References llvm::MachineInstrBuilder::addReg(), and llvm::BuildMI().

void X86InstrInfo::storeRegToStackSlot ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
unsigned  SrcReg,
bool  isKill,
int  FrameIndex,
const TargetRegisterClass *  RC 
) const [virtual]

storeRegToStackSlot - Store the specified register of the given register class to the specified stack frame index. The store instruction is to be added to the given machine basic block before the specified machine instruction. If isKill is true, the register operand is the last use and must be marked kill.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1816 of file X86InstrInfo.cpp.

References llvm::addFrameReference(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::getParent(), llvm::X86RegisterInfo::getStackAlignment(), getStoreRegOpcode(), MF, and llvm::X86RegisterInfo::needsStackRealignment().

void X86InstrInfo::storeRegToAddr ( MachineFunction &  MF,
unsigned  SrcReg,
bool  isKill,
SmallVectorImpl< MachineOperand > &  Addr,
const TargetRegisterClass *  RC,
SmallVectorImpl< MachineInstr * > &  NewMIs 
) const [virtual]

storeRegToAddr - Store the specified register of the given register class to the specified address. The store instruction is to be added to the given machine basic block before the specified machine instruction. If isKill is true, the register operand is the last use and must be marked kill.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1828 of file X86InstrInfo.cpp.

References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::X86RegisterInfo::getStackAlignment(), getStoreRegOpcode(), llvm::X86RegisterInfo::needsStackRealignment(), llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), and X86InstrAddOperand().

Referenced by unfoldMemoryOperand().

void X86InstrInfo::loadRegFromStackSlot ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
unsigned  DestReg,
int  FrameIndex,
const TargetRegisterClass *  RC 
) const [virtual]

loadRegFromStackSlot - Load the specified register of the given register class from the specified stack frame index. The load instruction is to be added to the given machine basic block before the specified machine instruction.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1881 of file X86InstrInfo.cpp.

References llvm::addFrameReference(), llvm::BuildMI(), getLoadRegOpcode(), llvm::MachineBasicBlock::getParent(), llvm::X86RegisterInfo::getStackAlignment(), MF, and llvm::X86RegisterInfo::needsStackRealignment().

void X86InstrInfo::loadRegFromAddr ( MachineFunction &  MF,
unsigned  DestReg,
SmallVectorImpl< MachineOperand > &  Addr,
const TargetRegisterClass *  RC,
SmallVectorImpl< MachineInstr * > &  NewMIs 
) const [virtual]

loadRegFromAddr - Load the specified register of the given register class class from the specified address. The load instruction is to be added to the given machine basic block before the specified machine instruction.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1892 of file X86InstrInfo.cpp.

References llvm::BuildMI(), getLoadRegOpcode(), llvm::X86RegisterInfo::getStackAlignment(), llvm::X86RegisterInfo::needsStackRealignment(), llvm::SmallVectorImpl< T >::push_back(), llvm::SmallVectorImpl< T >::size(), and X86InstrAddOperand().

Referenced by unfoldMemoryOperand().

bool X86InstrInfo::spillCalleeSavedRegisters ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI 
) const [virtual]

spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of store instructions via storeRegToStackSlot(). Returns false otherwise.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1905 of file X86InstrInfo.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineFunction::getInfo(), llvm::MachineBasicBlock::getParent(), llvm::TargetMachine::getSubtarget(), MF, Reg, and llvm::X86MachineFunctionInfo::setCalleeSavedFrameSize().

bool X86InstrInfo::restoreCalleeSavedRegisters ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI,
const std::vector< CalleeSavedInfo > &  CSI 
) const [virtual]

restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of load instructions via loadRegToStackSlot(). Returns false otherwise.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 1929 of file X86InstrInfo.cpp.

References llvm::BuildMI(), llvm::TargetMachine::getSubtarget(), and Reg.

MachineInstr * X86InstrInfo::foldMemoryOperandImpl ( MachineFunction &  MF,
MachineInstr *  MI,
const SmallVectorImpl< unsigned > &  Ops,
int  FrameIndex 
) const [virtual]

foldMemoryOperand - If this target supports it, fold a load or store of the specified stack slot into the specified machine instruction for the specified operand(s). If this is possible, the target should perform the folding and return true, otherwise it should return false. If it folds the instruction, it is likely that the MachineInstruction the iterator references has been changed.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2070 of file X86InstrInfo.cpp.

References Alignment, llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::CreateFI(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), MFI, NoFusing, llvm::SmallVectorImpl< T >::push_back(), llvm::MachineInstr::setDesc(), and llvm::SmallVectorImpl< T >::size().

Referenced by foldMemoryOperandImpl().

MachineInstr * X86InstrInfo::foldMemoryOperandImpl ( MachineFunction &  MF,
MachineInstr *  MI,
const SmallVectorImpl< unsigned > &  Ops,
MachineInstr *  LoadMI 
) const [virtual]

bool X86InstrInfo::canFoldMemoryOperand ( const MachineInstr *  MI,
const SmallVectorImpl< unsigned > &  Ops 
) const [virtual]

bool X86InstrInfo::unfoldMemoryOperand ( MachineFunction &  MF,
MachineInstr *  MI,
unsigned  Reg,
bool  UnfoldLoad,
bool  UnfoldStore,
SmallVectorImpl< MachineInstr * > &  NewMIs 
) const [virtual]

bool X86InstrInfo::unfoldMemoryOperand ( SelectionDAG &  DAG,
SDNode *  N,
SmallVectorImpl< SDNode * > &  NewNodes 
) const [virtual]

unsigned X86InstrInfo::getOpcodeAfterMemoryUnfold ( unsigned  Opc,
bool  UnfoldLoad,
bool  UnfoldStore 
) const [virtual]

getOpcodeAfterMemoryUnfold - Returns the opcode of the would be new instruction after load / store are unfolded from an instruction of the specified opcode. It returns zero if the specified unfolding is not possible.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2443 of file X86InstrInfo.cpp.

References llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), and llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::find().

bool X86InstrInfo::BlockHasNoFallThrough ( const MachineBasicBlock &  MBB  )  const [virtual]

BlockHasNoFallThrough - Return true if the specified block does not fall-through into its successor block. This is primarily used when a branch is unanalyzable. It is useful for things like unconditional indirect branches (jump tables).

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2458 of file X86InstrInfo.cpp.

References llvm::MachineBasicBlock::back(), llvm::MachineBasicBlock::empty(), llvm::MachineInstr::getOpcode(), and llvm::ISD::RET.

bool X86InstrInfo::ReverseBranchCondition ( SmallVectorImpl< MachineOperand > &  Cond  )  const [virtual]

ReverseBranchCondition - Reverses the branch condition of the specified condition list, returning false on success and true if it cannot be reversed.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2480 of file X86InstrInfo.cpp.

References llvm::X86::COND_NE_OR_P, llvm::X86::COND_NP_OR_E, GetOppositeBranchCondition(), and llvm::SmallVectorImpl< T >::size().

bool X86InstrInfo::IgnoreRegisterClassBarriers ( const TargetRegisterClass *  RC  )  const [virtual]

IgnoreRegisterClassBarriers - Returns true if pre-register allocation live interval splitting pass should ignore barriers of the specified register class.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2490 of file X86InstrInfo.cpp.

const TargetRegisterClass * X86InstrInfo::getPointerRegClass (  )  const [virtual]

getPointerRegClass - Returns a TargetRegisterClass used for pointer values.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 2497 of file X86InstrInfo.cpp.

References llvm::TargetMachine::getSubtarget(), llvm::X86Subtarget::is64Bit(), and Subtarget.

Referenced by unfoldMemoryOperand().

unsigned char llvm::X86InstrInfo::getBaseOpcodeFor ( const TargetInstrDesc *  TID  )  const [inline]

Definition at line 420 of file X86InstrInfo.h.

References llvm::X86II::OpcodeShift, and llvm::TargetInstrDesc::TSFlags.

Referenced by getBaseOpcodeFor().

unsigned char llvm::X86InstrInfo::getBaseOpcodeFor ( unsigned  Opcode  )  const [inline]

Definition at line 423 of file X86InstrInfo.h.

References getBaseOpcodeFor().

static bool llvm::X86InstrInfo::isX86_64NonExtLowByteReg ( unsigned  reg  )  [inline, static]

Definition at line 427 of file X86InstrInfo.h.

Referenced by determineREX().

unsigned X86InstrInfo::sizeOfImm ( const TargetInstrDesc *  Desc  )  [static]

bool X86InstrInfo::isX86_64ExtendedReg ( const MachineOperand &  MO  )  [static]

isX86_64ExtendedReg - Is the MachineOperand a x86-64 extended register? e.g. r8, xmm8, etc.

Definition at line 2518 of file X86InstrInfo.cpp.

References llvm::MachineOperand::getReg(), and llvm::MachineOperand::isReg().

Referenced by determineREX().

unsigned X86InstrInfo::determineREX ( const MachineInstr &  MI  )  [static]

unsigned X86InstrInfo::GetInstSizeInBytes ( const MachineInstr *  MI  )  const [virtual]

unsigned X86InstrInfo::getGlobalBaseReg ( MachineFunction *  MF  )  const

getGlobalBaseReg - Return a virtual register initialized with the the global base register value. Output instructions required to initialize the register in the function entry block, if necessary.

getGlobalBaseReg - Return a virtual register initialized with the the global base register value. Output instructions required to initialize the register in the function entry block, if necessary.

Definition at line 3074 of file X86InstrInfo.cpp.

References llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::front(), llvm::TargetInstrInfo::get(), llvm::MachineFunction::getInfo(), llvm::X86TargetMachine::getInstrInfo(), llvm::MachineFunction::getRegInfo(), llvm::TargetMachine::getRelocationModel(), llvm::TargetMachine::getSubtarget(), GlobalBaseReg, MBBI, llvm::Reloc::PIC_, RegInfo, and TII.


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