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

#include "Target/M68k/M68kRegisterInfo.h"

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

Public Member Functions

 M68kRegisterInfo (const M68kSubtarget &Subtarget)
 
const MCPhysReggetCalleeSavedRegs (const MachineFunction *MF) const override
 
const uint32_tgetCallPreservedMask (const MachineFunction &MF, CallingConv::ID) const override
 
const TargetRegisterClassgetRegsForTailCall (const MachineFunction &MF) const
 Returns a register class with registers that can be used in forming tail calls. More...
 
unsigned getMatchingMegaReg (unsigned Reg, const TargetRegisterClass *RC) const
 Return a mega-register of the specified register Reg so its sub-register of index SubIdx is Reg, its super(or mega) Reg. More...
 
const TargetRegisterClassgetMaximalPhysRegClass (unsigned reg, MVT VT) const
 Returns the Register Class of a physical register of the given type, picking the biggest register class of the right type that contains this physreg. More...
 
int getRegisterOrder (unsigned Reg, const TargetRegisterClass &TRC) const
 Return index of a register within a register class, otherwise return -1. More...
 
int getSpillRegisterOrder (unsigned Reg) const
 Return spill order index of a register, if there is none then trap. More...
 
BitVector getReservedRegs (const MachineFunction &MF) const override
 
bool requiresRegisterScavenging (const MachineFunction &MF) const override
 
bool trackLivenessAfterRegAlloc (const MachineFunction &MF) const override
 
void eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
 FrameIndex represent objects inside a abstract stack. More...
 
bool hasBasePointer (const MachineFunction &MF) const
 
bool canRealignStack (const MachineFunction &MF) const override
 True if the stack can be realigned for the target. More...
 
Register getFrameRegister (const MachineFunction &MF) const override
 
unsigned getStackRegister () const
 
unsigned getBaseRegister () const
 
unsigned getGlobalBaseRegister () const
 
const TargetRegisterClassintRegClass (unsigned Size) const
 

Protected Attributes

const M68kSubtargetSubtarget
 

Detailed Description

Definition at line 30 of file M68kRegisterInfo.h.

Constructor & Destructor Documentation

◆ M68kRegisterInfo()

M68kRegisterInfo::M68kRegisterInfo ( const M68kSubtarget Subtarget)

Definition at line 44 of file M68kRegisterInfo.cpp.

Member Function Documentation

◆ canRealignStack()

bool M68kRegisterInfo::canRealignStack ( const MachineFunction MF) const
override

◆ eliminateFrameIndex()

void M68kRegisterInfo::eliminateFrameIndex ( MachineBasicBlock::iterator  II,
int  SPAdj,
unsigned  FIOperandNum,
RegScavenger RS = nullptr 
) const
override

◆ getBaseRegister()

unsigned llvm::M68kRegisterInfo::getBaseRegister ( ) const
inline

◆ getCalleeSavedRegs()

const MCPhysReg * M68kRegisterInfo::getCalleeSavedRegs ( const MachineFunction MF) const
override

Definition at line 59 of file M68kRegisterInfo.cpp.

◆ getCallPreservedMask()

const uint32_t * M68kRegisterInfo::getCallPreservedMask ( const MachineFunction MF,
CallingConv::ID   
) const
override

Definition at line 64 of file M68kRegisterInfo.cpp.

Referenced by getReservedRegs().

◆ getFrameRegister()

Register M68kRegisterInfo::getFrameRegister ( const MachineFunction MF) const
override

◆ getGlobalBaseRegister()

unsigned llvm::M68kRegisterInfo::getGlobalBaseRegister ( ) const
inline

Definition at line 102 of file M68kRegisterInfo.h.

◆ getMatchingMegaReg()

unsigned M68kRegisterInfo::getMatchingMegaReg ( unsigned  Reg,
const TargetRegisterClass RC 
) const

Return a mega-register of the specified register Reg so its sub-register of index SubIdx is Reg, its super(or mega) Reg.

In other words it will return a register that is not direct super register but still shares physical register with Reg. NOTE not sure about the term though.

Definition at line 75 of file M68kRegisterInfo.cpp.

References llvm::TargetRegisterClass::contains(), llvm::MCRegisterInfo::DiffListIterator::isValid(), and Reg.

Referenced by llvm::M68kInstrInfo::ExpandMOVEM(), llvm::M68kInstrInfo::ExpandMOVSZX_RR(), and llvm::M68kInstrInfo::ExpandMOVX_RR().

◆ getMaximalPhysRegClass()

const TargetRegisterClass * M68kRegisterInfo::getMaximalPhysRegClass ( unsigned  reg,
MVT  VT 
) const

Returns the Register Class of a physical register of the given type, picking the biggest register class of the right type that contains this physreg.

Definition at line 84 of file M68kRegisterInfo.cpp.

References assert(), llvm::TargetRegisterClass::contains(), E, llvm::TargetRegisterClass::getNumRegs(), llvm::TargetRegisterClass::hasSubClass(), I, llvm::Register::isPhysicalRegister(), and llvm::MVT::Other.

◆ getRegisterOrder()

int M68kRegisterInfo::getRegisterOrder ( unsigned  Reg,
const TargetRegisterClass TRC 
) const

Return index of a register within a register class, otherwise return -1.

Definition at line 105 of file M68kRegisterInfo.cpp.

References llvm::TargetRegisterClass::getNumRegs(), llvm::TargetRegisterClass::getRegister(), i, and Reg.

Referenced by getSpillRegisterOrder().

◆ getRegsForTailCall()

const TargetRegisterClass * M68kRegisterInfo::getRegsForTailCall ( const MachineFunction MF) const

Returns a register class with registers that can be used in forming tail calls.

Definition at line 70 of file M68kRegisterInfo.cpp.

◆ getReservedRegs()

BitVector M68kRegisterInfo::getReservedRegs ( const MachineFunction MF) const
override

◆ getSpillRegisterOrder()

int M68kRegisterInfo::getSpillRegisterOrder ( unsigned  Reg) const

Return spill order index of a register, if there is none then trap.

Definition at line 115 of file M68kRegisterInfo.cpp.

References assert(), getRegClass(), getRegisterOrder(), and Reg.

Referenced by llvm::M68kInstrInfo::ExpandMOVEM().

◆ getStackRegister()

unsigned llvm::M68kRegisterInfo::getStackRegister ( ) const
inline

◆ hasBasePointer()

bool M68kRegisterInfo::hasBasePointer ( const MachineFunction MF) const

◆ intRegClass()

const TargetRegisterClass * M68kRegisterInfo::intRegClass ( unsigned  Size) const

Definition at line 265 of file M68kRegisterInfo.cpp.

◆ requiresRegisterScavenging()

bool M68kRegisterInfo::requiresRegisterScavenging ( const MachineFunction MF) const
override

Definition at line 212 of file M68kRegisterInfo.cpp.

◆ trackLivenessAfterRegAlloc()

bool M68kRegisterInfo::trackLivenessAfterRegAlloc ( const MachineFunction MF) const
override

Definition at line 217 of file M68kRegisterInfo.cpp.

Member Data Documentation

◆ Subtarget

const M68kSubtarget& llvm::M68kRegisterInfo::Subtarget
protected

Definition at line 48 of file M68kRegisterInfo.h.


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