LLVM API Documentation
#include <MipsSEInstrInfo.h>
Definition at line 22 of file MipsSEInstrInfo.h.
MipsSEInstrInfo::MipsSEInstrInfo | ( | const MipsSubtarget & | STI | ) | [explicit] |
Definition at line 27 of file MipsSEInstrInfo.cpp.
void MipsSEInstrInfo::adjustStackPtr | ( | unsigned | SP, |
int64_t | Amount, | ||
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | I | ||
) | const |
Adjust SP by Amount bytes.
Definition at line 359 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::MipsSubtarget::isABI_N64(), llvm::isInt< 16 >(), llvm::RegState::Kill, loadImmediate(), and llvm::MipsInstrInfo::Subtarget.
Referenced by llvm::MipsSEFrameLowering::eliminateCallFramePseudoInstr().
void MipsSEInstrInfo::copyPhysReg | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
DebugLoc | DL, | ||
unsigned | DestReg, | ||
unsigned | SrcReg, | ||
bool | KillSrc | ||
) | const [override] |
Definition at line 81 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::RegState::Define, llvm::getKillRegState(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::MipsSubtarget::inMicroMipsMode(), llvm::MipsISD::MFHI, llvm::MipsISD::MFLO, and llvm::MipsInstrInfo::Subtarget.
bool MipsSEInstrInfo::expandPostRAPseudo | ( | MachineBasicBlock::iterator | MI | ) | const [override] |
Definition at line 265 of file MipsSEInstrInfo.cpp.
References llvm::MipsISD::BuildPairF64, llvm::MachineBasicBlock::erase(), llvm::MipsISD::ExtractElementF64, llvm::MachineBasicBlock::getParent(), llvm::MipsSubtarget::inMicroMipsMode(), llvm::MipsISD::MFHI, llvm::MipsISD::MFLO, and llvm::MipsInstrInfo::Subtarget.
unsigned MipsSEInstrInfo::getOppositeBranchOpc | ( | unsigned | Opc | ) | const [override, virtual] |
getOppositeBranchOpc - Return the inverse of the specified opcode, e.g. turning BEQ to BNE.
Implements llvm::MipsInstrInfo.
Definition at line 338 of file MipsSEInstrInfo.cpp.
References llvm_unreachable.
const MipsRegisterInfo & MipsSEInstrInfo::getRegisterInfo | ( | ) | const [override, 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).
Implements llvm::MipsInstrInfo.
Definition at line 32 of file MipsSEInstrInfo.cpp.
unsigned MipsSEInstrInfo::isLoadFromStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [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 42 of file MipsSEInstrInfo.cpp.
References llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), llvm::MipsInstrInfo::isZeroImm(), and llvm::AArch64DB::LD.
unsigned MipsSEInstrInfo::isStoreToStackSlot | ( | const MachineInstr * | MI, |
int & | FrameIndex | ||
) | const [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 65 of file MipsSEInstrInfo.cpp.
References llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), and llvm::MipsInstrInfo::isZeroImm().
unsigned MipsSEInstrInfo::loadImmediate | ( | int64_t | Imm, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | II, | ||
DebugLoc | DL, | ||
unsigned * | NewImm | ||
) | const |
Emit a series of instructions to load an immediate. If NewImm is a non-NULL parameter, the last instruction is not emitted, but instead its immediate operand is returned in NewImm.
This function generates the sequence of instructions needed to get the result of adding register REG and immediate IMM.
Definition at line 378 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::MipsAnalyzeImmediate::Analyze(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MipsSubtarget::isABI_N64(), llvm::RegState::Kill, llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MipsInstrInfo::Subtarget.
Referenced by adjustStackPtr().
void MipsSEInstrInfo::loadRegFromStack | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | DestReg, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI, | ||
int64_t | Offset | ||
) | const [override, virtual] |
Implements llvm::MipsInstrInfo.
Definition at line 225 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::MipsInstrInfo::GetMemOperand(), llvm::TargetRegisterClass::hasType(), llvm::AArch64DB::LD, llvm::MachineMemOperand::MOLoad, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8f16, and llvm::MVT::v8i16.
void MipsSEInstrInfo::storeRegToStack | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
unsigned | SrcReg, | ||
bool | isKill, | ||
int | FrameIndex, | ||
const TargetRegisterClass * | RC, | ||
const TargetRegisterInfo * | TRI, | ||
int64_t | Offset | ||
) | const [override, virtual] |
Implements llvm::MipsInstrInfo.
Definition at line 182 of file MipsSEInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::getKillRegState(), llvm::MipsInstrInfo::GetMemOperand(), llvm::TargetRegisterClass::hasType(), llvm::MachineMemOperand::MOStore, llvm::MVT::v16i8, llvm::MVT::v2f64, llvm::MVT::v2i64, llvm::MVT::v4f32, llvm::MVT::v4i32, llvm::MVT::v8f16, and llvm::MVT::v8i16.