|
LLVM 22.0.0git
|
#include "Target/Mips/MipsSEInstrInfo.h"
Protected Member Functions | |
| std::optional< DestSourcePair > | isCopyInstrImpl (const MachineInstr &MI) const override |
| If the specific machine instruction is a instruction that moves/copies value from one register to another register return destination and source registers as machine operands. | |
| Protected Member Functions inherited from llvm::MipsInstrInfo | |
| bool | isZeroImm (const MachineOperand &op) const |
| MachineMemOperand * | GetMemOperand (MachineBasicBlock &MBB, int FI, MachineMemOperand::Flags Flags) const |
Additional Inherited Members | |
| Public Types inherited from llvm::MipsInstrInfo | |
| enum | BranchType { BT_None , BT_NoBranch , BT_Uncond , BT_Cond , BT_CondUncond , BT_Indirect } |
| Static Public Member Functions inherited from llvm::MipsInstrInfo | |
| static const MipsInstrInfo * | create (MipsSubtarget &STI) |
| Protected Attributes inherited from llvm::MipsInstrInfo | |
| const MipsSubtarget & | Subtarget |
| unsigned | UncondBrOpc |
Definition at line 21 of file MipsSEInstrInfo.h.
|
explicit |
Definition at line 30 of file MipsSEInstrInfo.cpp.
References getUnconditionalBranch(), and llvm::MipsInstrInfo::MipsInstrInfo().
|
overridevirtual |
Adjust SP by Amount bytes.
Implements llvm::MipsInstrInfo.
Definition at line 556 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::get(), I, llvm::isInt(), llvm::RegState::Kill, loadImmediate(), MBB, Opc, and llvm::MipsInstrInfo::Subtarget.
|
override |
Definition at line 76 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), contains(), llvm::RegState::Define, DL, llvm::get(), llvm::getKillRegState(), I, llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, isMicroMips(), MBB, Opc, and llvm::MipsInstrInfo::Subtarget.
|
override |
Definition at line 370 of file MipsSEInstrInfo.cpp.
References isMicroMips(), MBB, MI, Opc, and llvm::MipsInstrInfo::Subtarget.
getOppositeBranchOpc - Return the inverse of the specified opcode, e.g.
turning BEQ to BNE.
Implements llvm::MipsInstrInfo.
Definition at line 469 of file MipsSEInstrInfo.cpp.
References llvm_unreachable, and Opc.
|
inline |
Definition at line 27 of file MipsSEInstrInfo.h.
isBranchWithImm - Return true if the branch contains an immediate operand (
Reimplemented from llvm::MipsInstrInfo.
Definition at line 455 of file MipsSEInstrInfo.cpp.
References Opc.
|
overrideprotected |
If the specific machine instruction is a instruction that moves/copies value from one register to another register return destination and source registers as machine operands.
We check for the common case of 'or', as it's MIPS' preferred instruction for GPRs but we have to check the operands to ensure that is the case.
Other move instructions for MIPS are directly identifiable.
Definition at line 201 of file MipsSEInstrInfo.cpp.
References isORCopyInst(), and MI.
|
override |
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.
Definition at line 38 of file MipsSEInstrInfo.cpp.
References llvm::MipsInstrInfo::isZeroImm(), MI, and Opc.
|
override |
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.
Definition at line 60 of file MipsSEInstrInfo.cpp.
References llvm::MipsInstrInfo::isZeroImm(), MI, and Opc.
| unsigned MipsSEInstrInfo::loadImmediate | ( | int64_t | Imm, |
| MachineBasicBlock & | MBB, | ||
| MachineBasicBlock::iterator | II, | ||
| const DebugLoc & | DL, | ||
| unsigned * | NewImm ) const |
Emit a series of instructions to load an immediate.
This function generates the sequence of instructions needed to get the result of adding register REG and immediate IMM.
If NewImm is a non-NULL parameter, the last instruction is not emitted, but instead its immediate operand is returned in NewImm.
Definition at line 584 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MipsAnalyzeImmediate::Analyze(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::BuildMI(), DL, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::get(), II, llvm::MipsSubtarget::isABI_N64(), llvm::RegState::Kill, MBB, llvm::SignExtend64(), Size, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MipsInstrInfo::Subtarget.
Referenced by adjustStackPtr().
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 283 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::get(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOLoad, llvm::Offset, Opc, and llvm::MipsInstrInfo::Subtarget.
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 208 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::get(), llvm::getKillRegState(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOStore, llvm::Offset, and Opc.