LLVM 20.0.0git
|
#include "Target/M68k/M68kInstrInfo.h"
Static Public Member Functions | |
static const M68kInstrInfo * | create (M68kSubtarget &STI) |
Protected Attributes | |
const M68kSubtarget & | Subtarget |
const M68kRegisterInfo | RI |
Definition at line 237 of file M68kInstrInfo.h.
|
explicit |
Definition at line 43 of file M68kInstrInfo.cpp.
void M68kInstrInfo::AddSExt | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | I, | ||
DebugLoc | DL, | ||
unsigned | Reg, | ||
MVT | From, | ||
MVT | To | ||
) | const |
Add appropriate SExt nodes.
Definition at line 313 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, From, llvm::get(), I, MBB, and RI.
Referenced by ExpandMOVSZX_RM(), and ExpandMOVSZX_RR().
void M68kInstrInfo::AddZExt | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | I, | ||
DebugLoc | DL, | ||
unsigned | Reg, | ||
MVT | From, | ||
MVT | To | ||
) | const |
Add appropriate ZExt nodes.
Definition at line 330 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::And, llvm::BuildMI(), DL, From, llvm::get(), I, and MBB.
Referenced by ExpandMOVSZX_RM(), and ExpandMOVSZX_RR().
|
override |
Definition at line 249 of file M68kInstrInfo.cpp.
References AnalyzeBranchImpl(), Cond, MBB, and TBB.
bool M68kInstrInfo::AnalyzeBranchImpl | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock *& | TBB, | ||
MachineBasicBlock *& | FBB, | ||
SmallVectorImpl< MachineOperand > & | Cond, | ||
bool | AllowModify | ||
) | const |
Definition at line 83 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), Cond, llvm::M68k::COND_INVALID, llvm::MachineOperand::CreateImm(), llvm::get(), GetCondBranchFromCond(), llvm::M68k::GetCondFromBranchOpc(), GetOppositeBranchCondition(), llvm::MachineBasicBlock::insert(), llvm::MachineBasicBlock::isLayoutSuccessor(), llvm::make_scope_exit(), MBB, llvm::MachineBasicBlock::push_back(), llvm::MachineBasicBlock::rbegin(), llvm::MachineBasicBlock::rend(), llvm::MachineBasicBlock::rfindDebugLoc(), and TBB.
Referenced by analyzeBranch().
|
override |
Definition at line 663 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), contains(), llvm::dbgs(), DL, llvm::get(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), LLVM_DEBUG, llvm_unreachable, MBB, MI, and RI.
|
static |
|
override |
Definition at line 837 of file M68kInstrInfo.cpp.
bool M68kInstrInfo::ExpandCCR | ( | MachineInstrBuilder & | MIB, |
bool | IsToCCR | ||
) | const |
Moves to/from CCR.
Definition at line 525 of file M68kInstrInfo.cpp.
References llvm::get(), llvm::MachineInstr::getOperand(), getRegisterInfo(), llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setReg().
bool M68kInstrInfo::ExpandMOVEM | ( | MachineInstrBuilder & | MIB, |
const MCInstrDesc & | Desc, | ||
bool | IsRM | ||
) | const |
Expand all MOVEM pseudos into real MOVEMs.
Definition at line 542 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::sampleprof::Base, llvm::BuildMI(), llvm::MachineInstrBuilder::copyImplicitOps(), DL, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::MachineInstrBuilder::getInstr(), llvm::M68kRegisterInfo::getMatchingMegaReg(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::M68kRegisterInfo::getSpillRegisterOrder(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, MBB, MI, llvm::Offset, and RI.
bool M68kInstrInfo::ExpandMOVI | ( | MachineInstrBuilder & | MIB, |
MVT | MVTSize | ||
) | const |
Move immediate to register.
Definition at line 351 of file M68kInstrInfo.cpp.
References assert(), llvm::dbgs(), llvm::get(), llvm::MachineOperand::getImm(), llvm::MachineInstrBuilder::getInstr(), llvm::M68kRegisterInfo::getMatchingMegaReg(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), LLVM_DEBUG, RI, llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setReg().
bool M68kInstrInfo::ExpandMOVSZX_RM | ( | MachineInstrBuilder & | MIB, |
bool | IsSigned, | ||
const MCInstrDesc & | Desc, | ||
MVT | MVTDst, | ||
MVT | MVTSrc | ||
) | const |
Move from memory and extend.
Definition at line 472 of file M68kInstrInfo.cpp.
References AddSExt(), AddZExt(), assert(), llvm::dbgs(), DL, llvm::MachineInstr::getDebugLoc(), llvm::MachineInstrBuilder::getInstr(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), I, LLVM_DEBUG, MBB, RI, llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setReg().
bool M68kInstrInfo::ExpandMOVSZX_RR | ( | MachineInstrBuilder & | MIB, |
bool | IsSigned, | ||
MVT | MVTDst, | ||
MVT | MVTSrc | ||
) | const |
Move from register and extend.
Expand SExt MOVE pseudos into a MOV and a EXT if the operands are two different registers or just EXT if it is the same register.
Definition at line 422 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), AddSExt(), AddZExt(), assert(), llvm::BuildMI(), llvm::dbgs(), DL, llvm::MachineInstr::eraseFromParent(), llvm::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstrBuilder::getInstr(), llvm::M68kRegisterInfo::getMatchingMegaReg(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegisterInfo(), LLVM_DEBUG, MBB, RI, and TRI.
bool M68kInstrInfo::ExpandMOVX_RR | ( | MachineInstrBuilder & | MIB, |
MVT | MVTDst, | ||
MVT | MVTSrc | ||
) | const |
Move across register classes without extension.
Definition at line 383 of file M68kInstrInfo.cpp.
References assert(), llvm::dbgs(), DL, llvm::MachineInstr::eraseFromParent(), llvm::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstrBuilder::getInstr(), llvm::M68kRegisterInfo::getMatchingMegaReg(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), getRegisterInfo(), LLVM_DEBUG, RI, llvm::MachineInstr::setDesc(), llvm::MachineOperand::setReg(), and TRI.
|
override |
Definition at line 611 of file M68kInstrInfo.cpp.
References Expand2AddrUndef(), ExpandPUSH_POP(), llvm::get(), and MI.
bool M68kInstrInfo::ExpandPUSH_POP | ( | MachineInstrBuilder & | MIB, |
const MCInstrDesc & | Desc, | ||
bool | IsPush | ||
) | const |
Push/Pop to/from stack.
Definition at line 509 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstrBuilder::getInstr(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::M68kRegisterInfo::getStackRegister(), I, MBB, and RI.
Referenced by expandPostRAPseudo().
unsigned M68kInstrInfo::getGlobalBaseReg | ( | MachineFunction * | MF | ) | const |
Return a virtual register initialized with the global base register value.
Output instructions required to initialize the register in the function entry block, if necessary.
Output instructions required to initialize the register in the function entry block, if necessary.
TODO Move this function to M68kMachineFunctionInfo.
Definition at line 815 of file M68kInstrInfo.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::M68kMachineFunctionInfo::getGlobalBaseReg(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), and llvm::M68kMachineFunctionInfo::setGlobalBaseReg().
|
inline |
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).
Definition at line 252 of file M68kInstrInfo.h.
References RI.
Referenced by ExpandCCR(), ExpandMOVSZX_RR(), ExpandMOVX_RR(), and llvm::M68kSubtarget::getRegisterInfo().
|
override |
Definition at line 842 of file M68kInstrInfo.cpp.
|
override |
Definition at line 768 of file M68kInstrInfo.cpp.
References llvm::Offset, and Size.
|
override |
Definition at line 280 of file M68kInstrInfo.cpp.
References llvm::MachineInstrBuilder::addMBB(), assert(), llvm::BuildMI(), CC, Cond, DL, llvm::get(), GetCondBranchFromCond(), MBB, and TBB.
|
override |
Definition at line 638 of file M68kInstrInfo.cpp.
References assert(), llvm::MachineOperand::getOperandNo(), llvm::MachineOperand::getParent(), llvm::MachineOperand::isReg(), llvm::Regex::match(), and MI.
|
override |
Definition at line 794 of file M68kInstrInfo.cpp.
References llvm::M68k::addFrameReference(), assert(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::findDebugLoc(), llvm::get(), llvm::MachineFunction::getFrameInfo(), getLoadRegOpcode(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), MBB, MI, Subtarget, and TRI.
|
override |
Definition at line 257 of file M68kInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::M68k::COND_INVALID, llvm::MachineBasicBlock::end(), getCondFromBranchOpc(), I, and MBB.
|
override |
Definition at line 778 of file M68kInstrInfo.cpp.
References llvm::M68k::addFrameReference(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::findDebugLoc(), llvm::get(), llvm::MachineFunction::getFrameInfo(), llvm::getKillRegState(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), getStoreRegOpcode(), MBB, MI, Subtarget, and TRI.
|
protected |
Definition at line 242 of file M68kInstrInfo.h.
Referenced by AddSExt(), copyPhysReg(), ExpandMOVEM(), ExpandMOVI(), ExpandMOVSZX_RM(), ExpandMOVSZX_RR(), ExpandMOVX_RR(), ExpandPUSH_POP(), and getRegisterInfo().
|
protected |
Definition at line 241 of file M68kInstrInfo.h.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().