LLVM 20.0.0git
|
#include "Target/Mips/Mips16InstrInfo.h"
Static Public Member Functions | |
static bool | validImmediate (unsigned Opcode, unsigned Reg, int64_t Amount) |
static bool | validSpImm8 (int offset) |
Static Public Member Functions inherited from llvm::MipsInstrInfo | |
static const MipsInstrInfo * | create (MipsSubtarget &STI) |
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 } |
Protected Attributes inherited from llvm::MipsInstrInfo | |
const MipsSubtarget & | Subtarget |
unsigned | UncondBrOpc |
Definition at line 27 of file Mips16InstrInfo.h.
|
explicit |
Definition at line 42 of file Mips16InstrInfo.cpp.
const MCInstrDesc & Mips16InstrInfo::AddiuSpImm | ( | int64_t | Imm | ) | const |
Definition at line 453 of file Mips16InstrInfo.cpp.
References llvm::get(), and validSpImm8().
Referenced by BuildAddiuSpImm().
|
overridevirtual |
Adjust SP by Amount bytes.
Implements llvm::MipsInstrInfo.
Definition at line 306 of file Mips16InstrInfo.cpp.
References BuildAddiuSpImm(), I, and MBB.
void Mips16InstrInfo::BuildAddiuSpImm | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | I, | ||
int64_t | Imm | ||
) | const |
Definition at line 460 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), AddiuSpImm(), llvm::BuildMI(), DL, I, and MBB.
Referenced by adjustStackPtr(), makeFrame(), and restoreFrame().
|
override |
Definition at line 69 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), contains(), llvm::RegState::Define, DL, llvm::get(), llvm::getKillRegState(), I, and MBB.
Referenced by loadImmediate().
|
override |
Definition at line 142 of file Mips16InstrInfo.cpp.
References llvm::MachineBasicBlock::erase(), MBB, and MI.
GetOppositeBranchOpc - Return the inverse of the specified opcode, e.g.
turning BEQ to BNE.
Implements llvm::MipsInstrInfo.
Definition at line 158 of file Mips16InstrInfo.cpp.
References llvm_unreachable.
|
overridevirtual |
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).
Implements llvm::MipsInstrInfo.
Definition at line 45 of file Mips16InstrInfo.cpp.
|
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.
Definition at line 100 of file Mips16InstrInfo.cpp.
References 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 54 of file Mips16InstrInfo.cpp.
|
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 64 of file Mips16InstrInfo.cpp.
unsigned Mips16InstrInfo::loadImmediate | ( | unsigned | FrameReg, |
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.
Definition at line 320 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), Available, llvm::RegScavenger::backward(), llvm::BuildMI(), copyPhysReg(), DL, llvm::RegScavenger::enterBasicBlockEnd(), llvm::BitVector::find_first(), llvm::get(), llvm::RegScavenger::getRegsAvailable(), II, llvm::RegState::Kill, MBB, and llvm::BitVector::reset().
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 124 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), assert(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOLoad, and llvm::Offset.
void Mips16InstrInfo::makeFrame | ( | unsigned | SP, |
int64_t | FrameSize, | ||
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | I | ||
) | const |
Definition at line 210 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), addSaveRestoreRegs(), llvm::sampleprof::Base, BuildAddiuSpImm(), llvm::BuildMI(), DL, llvm::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), llvm::MipsRegisterInfo::getReservedRegs(), I, MBB, and llvm::Reserved.
void Mips16InstrInfo::restoreFrame | ( | unsigned | SP, |
int64_t | FrameSize, | ||
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | I | ||
) | const |
Definition at line 240 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), addSaveRestoreRegs(), llvm::sampleprof::Base, BuildAddiuSpImm(), llvm::BuildMI(), llvm::RegState::Define, DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), llvm::MipsRegisterInfo::getReservedRegs(), I, MBB, and llvm::Reserved.
|
overridevirtual |
Implements llvm::MipsInstrInfo.
Definition at line 106 of file Mips16InstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::get(), llvm::getKillRegState(), llvm::MipsInstrInfo::GetMemOperand(), I, MBB, llvm::MachineMemOperand::MOStore, and llvm::Offset.
Definition at line 470 of file Mips16InstrInfo.cpp.
References llvm_unreachable.
|
inlinestatic |
Definition at line 94 of file Mips16InstrInfo.h.
Referenced by AddiuSpImm().