LLVM 20.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]

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.
 
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.
 
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.
 
int getRegisterOrder (unsigned Reg, const TargetRegisterClass &TRC) const
 Return index of a register within a register class, otherwise return -1.
 
int getSpillRegisterOrder (unsigned Reg) const
 Return spill order index of a register, if there is none then trap.
 
BitVector getReservedRegs (const MachineFunction &MF) const override
 
bool requiresRegisterScavenging (const MachineFunction &MF) const override
 
bool trackLivenessAfterRegAlloc (const MachineFunction &MF) const override
 
bool eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
 FrameIndex represent objects inside a abstract stack.
 
bool hasBasePointer (const MachineFunction &MF) const
 
bool canRealignStack (const MachineFunction &MF) const override
 True if the stack can be realigned for the target.
 
Register getFrameRegister (const MachineFunction &MF) const override
 
const TargetRegisterClassgetCrossCopyRegClass (const TargetRegisterClass *RC) 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 45 of file M68kRegisterInfo.cpp.

Member Function Documentation

◆ canRealignStack()

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

True if the stack can be realigned for the target.

Definition at line 243 of file M68kRegisterInfo.cpp.

References llvm::TargetRegisterInfo::canRealignStack(), CantUseSP(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getRegInfo(), and MRI.

◆ eliminateFrameIndex()

bool 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 60 of file M68kRegisterInfo.cpp.

◆ getCallPreservedMask()

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

Definition at line 65 of file M68kRegisterInfo.cpp.

Referenced by getReservedRegs().

◆ getCrossCopyRegClass()

const TargetRegisterClass * llvm::M68kRegisterInfo::getCrossCopyRegClass ( const TargetRegisterClass RC) const
inlineoverride

Definition at line 102 of file M68kRegisterInfo.h.

◆ getFrameRegister()

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

◆ getGlobalBaseRegister()

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

Definition at line 110 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 76 of file M68kRegisterInfo.cpp.

References llvm::TargetRegisterClass::contains().

Referenced by llvm::M68kInstrInfo::ExpandMOVEM(), llvm::M68kInstrInfo::ExpandMOVI(), 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 85 of file M68kRegisterInfo.cpp.

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

◆ 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 106 of file M68kRegisterInfo.cpp.

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

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 71 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 116 of file M68kRegisterInfo.cpp.

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

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 267 of file M68kRegisterInfo.cpp.

◆ requiresRegisterScavenging()

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

Definition at line 214 of file M68kRegisterInfo.cpp.

◆ trackLivenessAfterRegAlloc()

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

Definition at line 219 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: