|
LLVM
4.0.0
|
#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 (MipsSubtarget &STI) |
Protected Member Functions | |
| bool | isZeroImm (const MachineOperand &op) const |
| MachineMemOperand * | GetMemOperand (MachineBasicBlock &MBB, int FI, MachineMemOperand::Flags Flags) const |
Protected Attributes | |
| const MipsSubtarget & | Subtarget |
| unsigned | UncondBrOpc |
Definition at line 32 of file MipsInstrInfo.h.
| Enumerator | |
|---|---|
| BT_None | |
| BT_NoBranch | |
| BT_Uncond | |
| BT_Cond | |
| BT_CondUncond | |
| BT_Indirect | |
Definition at line 39 of file MipsInstrInfo.h.
|
explicit |
Definition at line 32 of file MipsInstrInfo.cpp.
|
pure virtual |
Implemented in llvm::Mips16InstrInfo, and llvm::MipsSEInstrInfo.
Referenced by llvm::MipsFrameLowering::eliminateCallFramePseudoInstr().
|
override |
Branch Analysis.
Definition at line 87 of file MipsInstrInfo.cpp.
References 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 187 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::MachineInstr::isUnconditionalBranch(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::MachineBasicBlock::rbegin(), and llvm::MachineBasicBlock::rend().
|
static |
Definition at line 36 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 428 of file MipsInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addOperand(), llvm::BuildMI(), llvm::MachineInstrBuilder::copyImplicitOps(), E, I, llvm::MachineInstr::RemoveOperand(), and llvm::MachineInstrBuilder::setMemRefs().
| unsigned MipsInstrInfo::getEquivalentCompactForm | ( | const MachineBasicBlock::iterator | I | ) | const |
Determine the opcode of a non-delay slot form for a branch if one exists.
Return the corresponding compact (no delay slot) form of a branch.
Definition at line 271 of file MipsInstrInfo.cpp.
References B, llvm::MipsSubtarget::getABI(), llvm::MipsABIInfo::GetZeroReg(), llvm::MipsSubtarget::hasMips32r6(), llvm::MipsSubtarget::inMicroMipsMode(), and Subtarget.
|
override |
Return the number of bytes of code the specified instruction may be.
Definition at line 411 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::ISD::INLINEASM.
|
protected |
Definition at line 58 of file MipsInstrInfo.cpp.
References 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::MipsSEInstrInfo::storeRegToStack(), and llvm::Mips16InstrInfo::storeRegToStack().
Implemented in llvm::Mips16InstrInfo, and llvm::MipsSEInstrInfo.
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::Mips16InstrInfo, and llvm::MipsSEInstrInfo.
| bool MipsInstrInfo::HasForbiddenSlot | ( | const MachineInstr & | MI | ) | const |
Predicate to determine if an instruction has a forbidden slot.
Predicate for distingushing instructions that have forbidden slots.
Definition at line 406 of file MipsInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MipsII::HasForbiddenSlot, and llvm::MCInstrDesc::TSFlags.
|
override |
Definition at line 116 of file MipsInstrInfo.cpp.
References llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::size(), and UncondBrOpc.
|
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().
|
protected |
Definition at line 43 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::Mips16InstrInfo, and llvm::MipsSEInstrInfo.
Referenced by loadRegFromStackSlot().
|
inlineoverride |
Definition at line 107 of file MipsInstrInfo.h.
References loadRegFromStack().
|
override |
Definition at line 150 of file MipsInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::erase(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getReverse(), I, llvm::MachineBasicBlock::rbegin(), and llvm::MachineBasicBlock::rend().
|
override |
reverseBranchCondition - Return the inverse opcode of the specified Branch instruction.
Definition at line 179 of file MipsInstrInfo.cpp.
References assert(), getOppositeBranchOpc(), and llvm::SmallVectorTemplateCommon< T >::size().
| bool MipsInstrInfo::SafeInForbiddenSlot | ( | const MachineInstr & | MI | ) | const |
Predicate to determine if an instruction can go in a forbidden slot.
Predicate for distingushing between control transfer instructions and all other instructions for handling forbidden slots.
Consider inline assembly as unsafe as well.
Definition at line 397 of file MipsInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MipsII::IsCTI, llvm::MachineInstr::isInlineAsm(), and llvm::MCInstrDesc::TSFlags.
|
pure virtual |
Implemented in llvm::Mips16InstrInfo, and llvm::MipsSEInstrInfo.
Referenced by storeRegToStackSlot().
|
inlineoverride |
Definition at line 99 of file MipsInstrInfo.h.
References storeRegToStack().
|
protected |
|
protected |
Definition at line 36 of file MipsInstrInfo.h.
Referenced by insertBranch().
1.8.6