LLVM API Documentation
#include <MipsInstrInfo.h>
Public Types | |
enum | BranchType { BT_None, BT_NoBranch, BT_Uncond, BT_Cond, BT_CondUncond, BT_Indirect } |
Static Public Member Functions | |
static const MipsInstrInfo * | create (MipsTargetMachine &TM) |
Protected Member Functions | |
bool | isZeroImm (const MachineOperand &op) const |
MachineMemOperand * | GetMemOperand (MachineBasicBlock &MBB, int FI, unsigned Flag) const |
Protected Attributes | |
MipsTargetMachine & | TM |
unsigned | UncondBrOpc |
Definition at line 29 of file MipsInstrInfo.h.
Enumerator | |
---|---|
BT_None | |
BT_NoBranch | |
BT_Uncond | |
BT_Cond | |
BT_CondUncond | |
BT_Indirect |
Definition at line 36 of file MipsInstrInfo.h.
|
explicit |
Definition at line 33 of file MipsInstrInfo.cpp.
|
virtual |
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 184 of file MipsInstrInfo.cpp.
References llvm::SmallVectorTemplateCommon< T >::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< T >::value >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineBasicBlock::rbegin(), llvm::MachineBasicBlock::rend(), and UncondBrOpc.
|
static |
Definition at line 37 of file MipsInstrInfo.cpp.
References llvm::createMips16InstrInfo(), llvm::createMipsSEInstrInfo(), llvm::MipsTargetMachine::getSubtargetImpl(), and llvm::MipsSubtarget::inMips16Mode().
Referenced by llvm::MipsTargetMachine::setHelperClassesMips16(), and llvm::MipsTargetMachine::setHelperClassesMipsSE().
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 285 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 268 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.
|
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().
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by ReverseBranchCondition().
|
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.
|
virtual |
Definition at line 117 of file MipsInstrInfo.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::BuildMI(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::size(), and UncondBrOpc.
|
virtual |
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().
|
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().
|
pure virtual |
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by loadRegFromStackSlot().
|
inlinevirtual |
Definition at line 94 of file MipsInstrInfo.h.
References loadRegFromStack().
|
virtual |
Definition at line 149 of file MipsInstrInfo.cpp.
References llvm::MachineBasicBlock::erase(), I, llvm::MachineBasicBlock::rbegin(), and llvm::MachineBasicBlock::rend().
|
virtual |
ReverseBranchCondition - Return the inverse opcode of the specified Branch instruction.
Definition at line 175 of file MipsInstrInfo.cpp.
References getOppositeBranchOpc(), and llvm::SmallVectorTemplateCommon< T >::size().
|
pure virtual |
Implemented in llvm::MipsSEInstrInfo, and llvm::Mips16InstrInfo.
Referenced by storeRegToStackSlot().
|
inlinevirtual |
Definition at line 86 of file MipsInstrInfo.h.
References storeRegToStack().
|
protected |
Definition at line 32 of file MipsInstrInfo.h.
Referenced by llvm::MipsSEInstrInfo::adjustStackPtr(), and llvm::MipsSEInstrInfo::loadImmediate().
|
protected |
Definition at line 33 of file MipsInstrInfo.h.
Referenced by AnalyzeBranch(), and InsertBranch().