LLVM API Documentation

llvm::SparcInstrInfo Class Reference

#include <SparcInstrInfo.h>

Inheritance diagram for llvm::SparcInstrInfo:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SparcInstrInfo (SparcSubtarget &ST)
virtual const MRegisterInfogetRegisterInfo () const
virtual bool isMoveInstr (const MachineInstr &MI, unsigned &SrcReg, unsigned &DstReg) const
virtual unsigned isLoadFromStackSlot (MachineInstr *MI, int &FrameIndex) const
virtual unsigned isStoreToStackSlot (MachineInstr *MI, int &FrameIndex) const

Detailed Description

Definition at line 34 of file SparcInstrInfo.h.


Constructor & Destructor Documentation

SparcInstrInfo::SparcInstrInfo ( SparcSubtarget ST  ) 

Definition at line 20 of file SparcInstrInfo.cpp.


Member Function Documentation

virtual const MRegisterInfo& llvm::SparcInstrInfo::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 43 of file SparcInstrInfo.h.

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

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

Return true if the instruction is a register to register move and leave the source and dest operands in the passed parameters.

Reimplemented from llvm::TargetInstrInfo.

Definition at line 32 of file SparcInstrInfo.cpp.

References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isRegister(), isZeroImm(), and MI.

unsigned SparcInstrInfo::isLoadFromStackSlot ( 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 67 of file SparcInstrInfo.cpp.

References llvm::MachineOperand::getFrameIndex(), llvm::MachineOperand::getImmedValue(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFrameIndex(), llvm::MachineOperand::isImmediate(), and MI.

unsigned SparcInstrInfo::isStoreToStackSlot ( 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 86 of file SparcInstrInfo.cpp.

References llvm::MachineOperand::getFrameIndex(), llvm::MachineOperand::getImmedValue(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFrameIndex(), llvm::MachineOperand::isImmediate(), and MI.


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