LLVM API Documentation
#include <PIC16InstrInfo.h>
Public Member Functions | |
| PIC16InstrInfo (PIC16TargetMachine &TM) | |
| virtual const PIC16RegisterInfo & | getRegisterInfo () const |
| virtual unsigned | isLoadFromStackSlot (const MachineInstr *MI, int &FrameIndex) const |
| virtual unsigned | isStoreToStackSlot (const MachineInstr *MI, int &FrameIndex) const |
| virtual void | storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, const TargetRegisterClass *RC) const |
| virtual void | loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, int FrameIndex, const TargetRegisterClass *RC) const |
| virtual bool | copyRegToReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const |
| virtual bool | isMoveInstr (const MachineInstr &MI, unsigned &SrcReg, unsigned &DstReg, unsigned &SrcSubIdx, unsigned &DstSubIdx) const |
Definition at line 24 of file PIC16InstrInfo.h.
| PIC16InstrInfo::PIC16InstrInfo | ( | PIC16TargetMachine & | TM | ) | [explicit] |
Definition at line 29 of file PIC16InstrInfo.cpp.
| virtual const PIC16RegisterInfo& llvm::PIC16InstrInfo::getRegisterInfo | ( | ) | const [inline, virtual] |
Definition at line 31 of file PIC16InstrInfo.h.
Referenced by llvm::PIC16TargetMachine::getRegisterInfo().
| unsigned PIC16InstrInfo::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.
isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the dest reg along with the FrameIndex of the 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 56 of file PIC16InstrInfo.cpp.
References llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isSymbol().
| unsigned PIC16InstrInfo::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.
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 40 of file PIC16InstrInfo.cpp.
References llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isSymbol().
| void PIC16InstrInfo::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 68 of file PIC16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), FuncName, llvm::MachineFunction::getFunction(), llvm::Value::getName(), and llvm::MachineBasicBlock::getParent().
| void PIC16InstrInfo::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 95 of file PIC16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), FuncName, llvm::MachineFunction::getFunction(), llvm::Value::getName(), and llvm::MachineBasicBlock::getParent().
| bool PIC16InstrInfo::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 121 of file PIC16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), and llvm::BuildMI().
| bool PIC16InstrInfo::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 140 of file PIC16InstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().