LLVM  14.0.0git
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::M68kInstrInfo Class Reference

#include "Target/M68k/M68kInstrInfo.h"

Inheritance diagram for llvm::M68kInstrInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::M68kInstrInfo:
Collaboration graph
[legend]

Public Member Functions

 M68kInstrInfo (const M68kSubtarget &STI)
 
const M68kRegisterInfogetRegisterInfo () const
 TargetInstrInfo is a superset of MRegister info. More...
 
bool analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const override
 
bool AnalyzeBranchImpl (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify) const
 
unsigned removeBranch (MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
 
unsigned insertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
 
void copyPhysReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, MCRegister DestReg, MCRegister SrcReg, bool KillSrc) const override
 
bool getStackSlotRange (const TargetRegisterClass *RC, unsigned SubIdx, unsigned &Size, unsigned &Offset, const MachineFunction &MF) const override
 
void storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register SrcReg, bool IsKill, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
 
void loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, Register DestReg, int FrameIndex, const TargetRegisterClass *RC, const TargetRegisterInfo *TRI) const override
 
bool expandPostRAPseudo (MachineInstr &MI) const override
 
bool isPCRelRegisterOperandLegal (const MachineOperand &MO) const override
 
void AddSExt (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned Reg, MVT From, MVT To) const
 Add appropriate SExt nodes. More...
 
void AddZExt (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, DebugLoc DL, unsigned Reg, MVT From, MVT To) const
 Add appropriate ZExt nodes. More...
 
bool ExpandMOVX_RR (MachineInstrBuilder &MIB, MVT MVTDst, MVT MVTSrc) const
 Move across register classes without extension. More...
 
bool ExpandMOVSZX_RR (MachineInstrBuilder &MIB, bool IsSigned, MVT MVTDst, MVT MVTSrc) const
 Move from register and extend. More...
 
bool ExpandMOVSZX_RM (MachineInstrBuilder &MIB, bool IsSigned, const MCInstrDesc &Desc, MVT MVTDst, MVT MVTSrc) const
 Move from memory and extend. More...
 
bool ExpandPUSH_POP (MachineInstrBuilder &MIB, const MCInstrDesc &Desc, bool IsPush) const
 Push/Pop to/from stack. More...
 
bool ExpandCCR (MachineInstrBuilder &MIB, bool IsToCCR) const
 Moves to/from CCR. More...
 
bool ExpandMOVEM (MachineInstrBuilder &MIB, const MCInstrDesc &Desc, bool IsRM) const
 Expand all MOVEM pseudos into real MOVEMs. More...
 
unsigned getGlobalBaseReg (MachineFunction *MF) const
 Return a virtual register initialized with the the global base register value. More...
 
std::pair< unsigned, unsigned > decomposeMachineOperandsTargetFlags (unsigned TF) const override
 
ArrayRef< std::pair< unsigned, const char * > > getSerializableDirectMachineOperandTargetFlags () const override
 

Static Public Member Functions

static const M68kInstrInfocreate (M68kSubtarget &STI)
 

Protected Attributes

const M68kSubtargetSubtarget
 
const M68kRegisterInfo RI
 

Detailed Description

Definition at line 237 of file M68kInstrInfo.h.

Constructor & Destructor Documentation

◆ M68kInstrInfo()

M68kInstrInfo::M68kInstrInfo ( const M68kSubtarget STI)
explicit

Definition at line 42 of file M68kInstrInfo.cpp.

Member Function Documentation

◆ AddSExt()

void M68kInstrInfo::AddSExt ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  Reg,
MVT  From,
MVT  To 
) const

Add appropriate SExt nodes.

Definition at line 312 of file M68kInstrInfo.cpp.

References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), DL, From, get, I, llvm::MVT::i32, llvm::MVT::i8, MBB, Reg, and RI.

Referenced by ExpandMOVSZX_RM(), and ExpandMOVSZX_RR().

◆ AddZExt()

void M68kInstrInfo::AddZExt ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  I,
DebugLoc  DL,
unsigned  Reg,
MVT  From,
MVT  To 
) const

◆ analyzeBranch()

bool M68kInstrInfo::analyzeBranch ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const
override

Definition at line 248 of file M68kInstrInfo.cpp.

References AnalyzeBranchImpl(), Cond, and MBB.

◆ AnalyzeBranchImpl()

bool M68kInstrInfo::AnalyzeBranchImpl ( MachineBasicBlock MBB,
MachineBasicBlock *&  TBB,
MachineBasicBlock *&  FBB,
SmallVectorImpl< MachineOperand > &  Cond,
bool  AllowModify 
) const

◆ copyPhysReg()

void M68kInstrInfo::copyPhysReg ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
const DebugLoc DL,
MCRegister  DestReg,
MCRegister  SrcReg,
bool  KillSrc 
) const
override

◆ create()

static const M68kInstrInfo* llvm::M68kInstrInfo::create ( M68kSubtarget STI)
static

◆ decomposeMachineOperandsTargetFlags()

std::pair< unsigned, unsigned > M68kInstrInfo::decomposeMachineOperandsTargetFlags ( unsigned  TF) const
override

Definition at line 811 of file M68kInstrInfo.cpp.

◆ ExpandCCR()

bool M68kInstrInfo::ExpandCCR ( MachineInstrBuilder MIB,
bool  IsToCCR 
) const

◆ ExpandMOVEM()

bool M68kInstrInfo::ExpandMOVEM ( MachineInstrBuilder MIB,
const MCInstrDesc Desc,
bool  IsRM 
) const

◆ ExpandMOVSZX_RM()

bool M68kInstrInfo::ExpandMOVSZX_RM ( MachineInstrBuilder MIB,
bool  IsSigned,
const MCInstrDesc Desc,
MVT  MVTDst,
MVT  MVTSrc 
) const

◆ ExpandMOVSZX_RR()

bool M68kInstrInfo::ExpandMOVSZX_RR ( MachineInstrBuilder MIB,
bool  IsSigned,
MVT  MVTDst,
MVT  MVTSrc 
) const

◆ ExpandMOVX_RR()

bool M68kInstrInfo::ExpandMOVX_RR ( MachineInstrBuilder MIB,
MVT  MVTDst,
MVT  MVTSrc 
) const

◆ expandPostRAPseudo()

bool M68kInstrInfo::expandPostRAPseudo ( MachineInstr MI) const
override

Definition at line 574 of file M68kInstrInfo.cpp.

References Expand2AddrUndef(), ExpandPUSH_POP(), get, and MI.

◆ ExpandPUSH_POP()

bool M68kInstrInfo::ExpandPUSH_POP ( MachineInstrBuilder MIB,
const MCInstrDesc Desc,
bool  IsPush 
) const

◆ getGlobalBaseReg()

unsigned M68kInstrInfo::getGlobalBaseReg ( MachineFunction MF) const

Return a virtual register initialized with the 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 789 of file M68kInstrInfo.cpp.

References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::M68kMachineFunctionInfo::getGlobalBaseReg(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), llvm::PPCISD::GlobalBaseReg, and llvm::M68kMachineFunctionInfo::setGlobalBaseReg().

◆ getRegisterInfo()

const M68kRegisterInfo& llvm::M68kInstrInfo::getRegisterInfo ( ) const
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().

◆ getSerializableDirectMachineOperandTargetFlags()

ArrayRef< std::pair< unsigned, const char * > > M68kInstrInfo::getSerializableDirectMachineOperandTargetFlags ( ) const
override

◆ getStackSlotRange()

bool M68kInstrInfo::getStackSlotRange ( const TargetRegisterClass RC,
unsigned  SubIdx,
unsigned &  Size,
unsigned &  Offset,
const MachineFunction MF 
) const
override

Definition at line 745 of file M68kInstrInfo.cpp.

References Offset, and llvm::Check::Size.

◆ insertBranch()

unsigned M68kInstrInfo::insertBranch ( MachineBasicBlock MBB,
MachineBasicBlock TBB,
MachineBasicBlock FBB,
ArrayRef< MachineOperand Cond,
const DebugLoc DL,
int BytesAdded = nullptr 
) const
override

◆ isPCRelRegisterOperandLegal()

bool M68kInstrInfo::isPCRelRegisterOperandLegal ( const MachineOperand MO) const
override

◆ loadRegFromStackSlot()

void M68kInstrInfo::loadRegFromStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
Register  DestReg,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const
override

◆ removeBranch()

unsigned M68kInstrInfo::removeBranch ( MachineBasicBlock MBB,
int BytesRemoved = nullptr 
) const
override

◆ storeRegToStackSlot()

void M68kInstrInfo::storeRegToStackSlot ( MachineBasicBlock MBB,
MachineBasicBlock::iterator  MI,
Register  SrcReg,
bool  IsKill,
int  FrameIndex,
const TargetRegisterClass RC,
const TargetRegisterInfo TRI 
) const
override

Member Data Documentation

◆ RI

const M68kRegisterInfo llvm::M68kInstrInfo::RI
protected

◆ Subtarget

const M68kSubtarget& llvm::M68kInstrInfo::Subtarget
protected

Definition at line 241 of file M68kInstrInfo.h.

Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().


The documentation for this class was generated from the following files: