LLVM 22.0.0git
llvm::ARMBaseRegisterInfo Class Reference

#include "Target/ARM/ARMBaseRegisterInfo.h"

Inheritance diagram for llvm::ARMBaseRegisterInfo:
[legend]

Public Member Functions

const MCPhysReggetCalleeSavedRegs (const MachineFunction *MF) const override
 Code Generation virtual methods...
const MCPhysReggetCalleeSavedRegsViaCopy (const MachineFunction *MF) const
const uint32_tgetCallPreservedMask (const MachineFunction &MF, CallingConv::ID) const override
const uint32_tgetNoPreservedMask () const override
const uint32_tgetTLSCallPreservedMask (const MachineFunction &MF) const
const uint32_tgetSjLjDispatchPreservedMask (const MachineFunction &MF) const
const uint32_tgetThisReturnPreservedMask (const MachineFunction &MF, CallingConv::ID) const
 getThisReturnPreservedMask - Returns a call preserved mask specific to the case that 'returned' is on an i32 first argument if the calling convention is one that can (partially) model this attribute with a preserved mask (i.e.
ArrayRef< MCPhysReggetIntraCallClobberedRegs (const MachineFunction *MF) const override
BitVector getReservedRegs (const MachineFunction &MF) const override
bool isAsmClobberable (const MachineFunction &MF, MCRegister PhysReg) const override
bool isInlineAsmReadOnlyReg (const MachineFunction &MF, MCRegister PhysReg) const override
const TargetRegisterClassgetPointerRegClass (const MachineFunction &MF, unsigned Kind=0) const override
const TargetRegisterClassgetCrossCopyRegClass (const TargetRegisterClass *RC) const override
const TargetRegisterClassgetLargestLegalSuperClass (const TargetRegisterClass *RC, const MachineFunction &MF) const override
unsigned getRegPressureLimit (const TargetRegisterClass *RC, MachineFunction &MF) const override
bool getRegAllocationHints (Register VirtReg, ArrayRef< MCPhysReg > Order, SmallVectorImpl< MCPhysReg > &Hints, const MachineFunction &MF, const VirtRegMap *VRM, const LiveRegMatrix *Matrix) const override
void updateRegAllocHint (Register Reg, Register NewReg, MachineFunction &MF) const override
bool hasBasePointer (const MachineFunction &MF) const
bool canRealignStack (const MachineFunction &MF) const override
int64_t getFrameIndexInstrOffset (const MachineInstr *MI, int Idx) const override
bool needsFrameBaseReg (MachineInstr *MI, int64_t Offset) const override
 needsFrameBaseReg - Returns true if the instruction's frame index reference would be better served by a base register other than FP or SP.
Register materializeFrameBaseRegister (MachineBasicBlock *MBB, int FrameIdx, int64_t Offset) const override
 materializeFrameBaseRegister - Insert defining instruction(s) for BaseReg to be a pointer to FrameIdx at the beginning of the basic block.
void resolveFrameIndex (MachineInstr &MI, Register BaseReg, int64_t Offset) const override
bool isFrameOffsetLegal (const MachineInstr *MI, Register BaseReg, int64_t Offset) const override
bool cannotEliminateFrame (const MachineFunction &MF) const
Register getFrameRegister (const MachineFunction &MF) const override
Register getBaseRegister () const
virtual void emitLoadConstPool (MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, const DebugLoc &dl, Register DestReg, unsigned SubIdx, int Val, ARMCC::CondCodes Pred=ARMCC::AL, Register PredReg=Register(), unsigned MIFlags=MachineInstr::NoFlags) const
 emitLoadConstPool - Emits a load from constpool to materialize the specified immediate.
bool requiresRegisterScavenging (const MachineFunction &MF) const override
 Code Generation virtual methods...
bool requiresFrameIndexScavenging (const MachineFunction &MF) const override
bool requiresVirtualBaseRegisters (const MachineFunction &MF) const override
bool eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
bool shouldCoalesce (MachineInstr *MI, const TargetRegisterClass *SrcRC, unsigned SubReg, const TargetRegisterClass *DstRC, unsigned DstSubReg, const TargetRegisterClass *NewRC, LiveIntervals &LIS) const override
 SrcRC and DstRC will be morphed into NewRC if this returns true.
bool shouldRewriteCopySrc (const TargetRegisterClass *DefRC, unsigned DefSubReg, const TargetRegisterClass *SrcRC, unsigned SrcSubReg) const override
int getSEHRegNum (unsigned i) const

Protected Member Functions

 ARMBaseRegisterInfo ()

Protected Attributes

unsigned BasePtr = ARM::R6
 BasePtr - ARM physical register used as a base ptr in complex stack frames.

Detailed Description

Definition at line 52 of file ARMBaseRegisterInfo.h.

Constructor & Destructor Documentation

◆ ARMBaseRegisterInfo()

ARMBaseRegisterInfo::ARMBaseRegisterInfo ( )
explicitprotected

Definition at line 57 of file ARMBaseRegisterInfo.cpp.

References llvm::ARM_MC::initLLVMToCVRegMapping().

Member Function Documentation

◆ cannotEliminateFrame()

◆ canRealignStack()

◆ eliminateFrameIndex()

◆ emitLoadConstPool()

◆ getBaseRegister()

Register llvm::ARMBaseRegisterInfo::getBaseRegister ( ) const
inline

Definition at line 131 of file ARMBaseRegisterInfo.h.

References BasePtr.

◆ getCalleeSavedRegs()

◆ getCalleeSavedRegsViaCopy()

◆ getCallPreservedMask()

◆ getCrossCopyRegClass()

const TargetRegisterClass * ARMBaseRegisterInfo::getCrossCopyRegClass ( const TargetRegisterClass * RC) const
override

Definition at line 319 of file ARMBaseRegisterInfo.cpp.

◆ getFrameIndexInstrOffset()

◆ getFrameRegister()

Register ARMBaseRegisterInfo::getFrameRegister ( const MachineFunction & MF) const
override

◆ getIntraCallClobberedRegs()

ArrayRef< MCPhysReg > ARMBaseRegisterInfo::getIntraCallClobberedRegs ( const MachineFunction * MF) const
override

Definition at line 219 of file ARMBaseRegisterInfo.cpp.

References llvm::ArrayRef().

◆ getLargestLegalSuperClass()

◆ getNoPreservedMask()

const uint32_t * ARMBaseRegisterInfo::getNoPreservedMask ( ) const
override

Definition at line 180 of file ARMBaseRegisterInfo.cpp.

◆ getPointerRegClass()

const TargetRegisterClass * ARMBaseRegisterInfo::getPointerRegClass ( const MachineFunction & MF,
unsigned Kind = 0 ) const
override

◆ getRegAllocationHints()

◆ getRegPressureLimit()

◆ getReservedRegs()

◆ getSEHRegNum()

int llvm::ARMBaseRegisterInfo::getSEHRegNum ( unsigned i) const
inline

Definition at line 167 of file ARMBaseRegisterInfo.h.

◆ getSjLjDispatchPreservedMask()

const uint32_t * ARMBaseRegisterInfo::getSjLjDispatchPreservedMask ( const MachineFunction & MF) const

◆ getThisReturnPreservedMask()

const uint32_t * ARMBaseRegisterInfo::getThisReturnPreservedMask ( const MachineFunction & MF,
CallingConv::ID CC ) const

getThisReturnPreservedMask - Returns a call preserved mask specific to the case that 'returned' is on an i32 first argument if the calling convention is one that can (partially) model this attribute with a preserved mask (i.e.

it is a calling convention that uses the same register for the first i32 argument and an i32 return value)

Should return NULL in the case that the calling convention does not have this property

Definition at line 201 of file ARMBaseRegisterInfo.cpp.

References llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, and llvm::ARMSubtarget::isTargetDarwin().

◆ getTLSCallPreservedMask()

const uint32_t * ARMBaseRegisterInfo::getTLSCallPreservedMask ( const MachineFunction & MF) const

◆ hasBasePointer()

◆ isAsmClobberable()

bool ARMBaseRegisterInfo::isAsmClobberable ( const MachineFunction & MF,
MCRegister PhysReg ) const
override

Definition at line 261 of file ARMBaseRegisterInfo.cpp.

References getReservedRegs(), and llvm::BitVector::test().

◆ isFrameOffsetLegal()

◆ isInlineAsmReadOnlyReg()

bool ARMBaseRegisterInfo::isInlineAsmReadOnlyReg ( const MachineFunction & MF,
MCRegister PhysReg ) const
override

◆ materializeFrameBaseRegister()

Register ARMBaseRegisterInfo::materializeFrameBaseRegister ( MachineBasicBlock * MBB,
int FrameIdx,
int64_t Offset ) const
override

◆ needsFrameBaseReg()

bool ARMBaseRegisterInfo::needsFrameBaseReg ( MachineInstr * MI,
int64_t Offset ) const
override

needsFrameBaseReg - Returns true if the instruction's frame index reference would be better served by a base register other than FP or SP.

Used by LocalStackFrameAllocation to determine which frame index references it should create new base registers for.

Definition at line 612 of file ARMBaseRegisterInfo.cpp.

References assert(), canRealignStack(), llvm::MachineFunction::getFrameInfo(), getFrameRegister(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getLocalFrameMaxAlign(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::TargetFrameLowering::getStackAlign(), llvm::TargetFrameLowering::hasFP(), llvm::MachineFrameInfo::hasVarSizedObjects(), isFrameOffsetLegal(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumbFunction(), MI, llvm::Offset, and Opc.

◆ requiresFrameIndexScavenging()

bool ARMBaseRegisterInfo::requiresFrameIndexScavenging ( const MachineFunction & MF) const
override

Definition at line 549 of file ARMBaseRegisterInfo.cpp.

◆ requiresRegisterScavenging()

bool ARMBaseRegisterInfo::requiresRegisterScavenging ( const MachineFunction & MF) const
override

Code Generation virtual methods...

Definition at line 544 of file ARMBaseRegisterInfo.cpp.

◆ requiresVirtualBaseRegisters()

bool ARMBaseRegisterInfo::requiresVirtualBaseRegisters ( const MachineFunction & MF) const
override

Definition at line 554 of file ARMBaseRegisterInfo.cpp.

◆ resolveFrameIndex()

◆ shouldCoalesce()

bool ARMBaseRegisterInfo::shouldCoalesce ( MachineInstr * MI,
const TargetRegisterClass * SrcRC,
unsigned SubReg,
const TargetRegisterClass * DstRC,
unsigned DstSubReg,
const TargetRegisterClass * NewRC,
LiveIntervals & LIS ) const
override

SrcRC and DstRC will be morphed into NewRC if this returns true.

Definition at line 906 of file ARMBaseRegisterInfo.cpp.

References llvm::dbgs(), llvm::ARMFunctionInfo::getCoalescedWeight(), LLVM_DEBUG, MBB, MI, MRI, and SubReg.

◆ shouldRewriteCopySrc()

bool ARMBaseRegisterInfo::shouldRewriteCopySrc ( const TargetRegisterClass * DefRC,
unsigned DefSubReg,
const TargetRegisterClass * SrcRC,
unsigned SrcSubReg ) const
override

◆ updateRegAllocHint()

void ARMBaseRegisterInfo::updateRegAllocHint ( Register Reg,
Register NewReg,
MachineFunction & MF ) const
override

Member Data Documentation

◆ BasePtr

unsigned llvm::ARMBaseRegisterInfo::BasePtr = ARM::R6
protected

BasePtr - ARM physical register used as a base ptr in complex stack frames.

I.e., when we need a 3rd base, not just SP and FP, due to variable size stack objects.

Definition at line 57 of file ARMBaseRegisterInfo.h.

Referenced by canRealignStack(), getBaseRegister(), getReservedRegs(), and isInlineAsmReadOnlyReg().


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