LLVM API Documentation
#include <MipsInstrInfo.h>
Definition at line 33 of file MipsInstrInfo.h.
Definition at line 40 of file MipsInstrInfo.h.
MipsInstrInfo::MipsInstrInfo | ( | const MipsSubtarget & | STI, |
unsigned | UncondBrOpc | ||
) | [explicit] |
Definition at line 33 of file MipsInstrInfo.cpp.
bool MipsInstrInfo::AnalyzeBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock *& | TBB, | ||
MachineBasicBlock *& | FBB, | ||
SmallVectorImpl< MachineOperand > & | Cond, | ||
bool | AllowModify | ||
) | const [override] |
Branch Analysis.
Definition at line 86 of file MipsInstrInfo.cpp.
References llvm::X86ISD::BT, BT_Indirect, and BT_None.
MipsInstrInfo::BranchType MipsInstrInfo::AnalyzeBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock *& | TBB, | ||
MachineBasicBlock *& | FBB, | ||
SmallVectorImpl< MachineOperand > & | Cond, | ||
bool | AllowModify, | ||
SmallVectorImpl< MachineInstr * > & | BranchInstrs | ||
) | const |
Definition at line 178 of file MipsInstrInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), BT_Cond, BT_CondUncond, BT_Indirect, BT_NoBranch, BT_None, BT_Uncond, llvm::MachineInstr::eraseFromParent(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), I, llvm::SmallVectorImpl< T >::insert(), llvm::MachineInstr::isIndirectBranch(), llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::MachineBasicBlock::rbegin(), llvm::MachineBasicBlock::rend(), and UncondBrOpc.
const MipsInstrInfo * MipsInstrInfo::create | ( | MipsSubtarget & | STI | ) | [static] |
Definition at line 37 of file MipsInstrInfo.cpp.
References llvm::createMips16InstrInfo(), llvm::createMipsSEInstrInfo(), and llvm::MipsSubtarget::inMips16Mode().
MachineInstrBuilder MipsInstrInfo::genInstrWithNewOpc | ( | unsigned | NewOpc, |
MachineBasicBlock::iterator | I | ||
) | const |
Create an instruction which has the same operands and memory operands as MI but has a new opcode.
Definition at line 279 of file MipsInstrInfo.cpp.
References llvm::MachineInstrBuilder::addOperand(), llvm::BuildMI(), I, and llvm::MachineInstrBuilder::setMemRefs().
unsigned MipsInstrInfo::GetInstSizeInBytes | ( | const MachineInstr * | MI | ) | const |
Return the number of bytes of code the specified instruction may be.
Definition at line 262 of file MipsInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MCInstrDesc::getSize(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), and llvm::TargetOpcode::INLINEASM.
MachineMemOperand * MipsInstrInfo::GetMemOperand | ( | MachineBasicBlock & | MBB, |
int | FI, | ||
unsigned | Flag | ||
) | const [protected] |
Definition at line 57 of file MipsInstrInfo.cpp.
References Align(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), and llvm::MachineBasicBlock::getParent().
Referenced by llvm::Mips16InstrInfo::loadRegFromStack(), llvm::MipsSEInstrInfo::loadRegFromStack(), llvm::Mips16InstrInfo::storeRegToStack(), and llvm::MipsSEInstrInfo::storeRegToStack().
virtual unsigned llvm::MipsInstrInfo::getOppositeBranchOpc | ( | unsigned | Opc | ) | const [pure virtual] |
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by ReverseBranchCondition().
virtual const MipsRegisterInfo& llvm::MipsInstrInfo::getRegisterInfo | ( | ) | const [pure 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).
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
unsigned MipsInstrInfo::InsertBranch | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock * | TBB, | ||
MachineBasicBlock * | FBB, | ||
const SmallVectorImpl< MachineOperand > & | Cond, | ||
DebugLoc | DL | ||
) | const [override] |
Definition at line 116 of file MipsInstrInfo.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::BuildMI(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::size(), and UncondBrOpc.
void MipsInstrInfo::insertNoop | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI | ||
) | const [override] |
Insert nop instruction when hazard condition is found.
insertNoop - If data hazard condition is found insert the target nop instruction.
Definition at line 51 of file MipsInstrInfo.cpp.
References llvm::BuildMI().
bool MipsInstrInfo::isZeroImm | ( | const MachineOperand & | op | ) | const [protected] |
Definition at line 44 of file MipsInstrInfo.cpp.
References llvm::MachineOperand::getImm(), and llvm::MachineOperand::isImm().
Referenced by llvm::MipsSEInstrInfo::isLoadFromStackSlot(), and llvm::MipsSEInstrInfo::isStoreToStackSlot().
virtual void llvm::MipsInstrInfo::loadRegFromStack | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | DestReg, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI, | ||
int64_t | Offset | ||
) | const [pure virtual] |
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by loadRegFromStackSlot().
void llvm::MipsInstrInfo::loadRegFromStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | DestReg, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [inline, override] |
Definition at line 98 of file MipsInstrInfo.h.
References loadRegFromStack().
unsigned MipsInstrInfo::RemoveBranch | ( | MachineBasicBlock & | MBB | ) | const [override] |
Definition at line 146 of file MipsInstrInfo.cpp.
References llvm::MachineBasicBlock::erase(), I, llvm::MachineBasicBlock::rbegin(), and llvm::MachineBasicBlock::rend().
bool MipsInstrInfo::ReverseBranchCondition | ( | SmallVectorImpl< MachineOperand > & | Cond | ) | const [override] |
ReverseBranchCondition - Return the inverse opcode of the specified Branch instruction.
Definition at line 170 of file MipsInstrInfo.cpp.
References getOppositeBranchOpc(), and llvm::SmallVectorTemplateCommon< T >::size().
virtual void llvm::MipsInstrInfo::storeRegToStack | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | SrcReg, | ||
bool | isKill, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI, | ||
int64_t | Offset | ||
) | const [pure virtual] |
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by storeRegToStackSlot().
void llvm::MipsInstrInfo::storeRegToStackSlot | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MBBI, | ||
unsigned | SrcReg, | ||
bool | isKill, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI | ||
) | const [inline, override] |
Definition at line 90 of file MipsInstrInfo.h.
References storeRegToStack().
const MipsSubtarget& llvm::MipsInstrInfo::Subtarget [protected] |
Definition at line 36 of file MipsInstrInfo.h.
Referenced by llvm::MipsSEInstrInfo::adjustStackPtr(), llvm::MipsSEInstrInfo::copyPhysReg(), llvm::MipsSEInstrInfo::expandPostRAPseudo(), and llvm::MipsSEInstrInfo::loadImmediate().
unsigned llvm::MipsInstrInfo::UncondBrOpc [protected] |
Definition at line 37 of file MipsInstrInfo.h.
Referenced by AnalyzeBranch(), and InsertBranch().