LLVM 20.0.0git
|
#include "Target/ARM/ARMBaseRegisterInfo.h"
Protected Member Functions | |
ARMBaseRegisterInfo () | |
Protected Attributes | |
unsigned | BasePtr = ARM::R6 |
BasePtr - ARM physical register used as a base ptr in complex stack frames. | |
Definition at line 127 of file ARMBaseRegisterInfo.h.
|
explicitprotected |
Definition at line 57 of file ARMBaseRegisterInfo.cpp.
References llvm::ARM_MC::initLLVMToCVRegMapping().
bool ARMBaseRegisterInfo::cannotEliminateFrame | ( | const MachineFunction & | MF | ) | const |
Definition at line 475 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineFrameInfo::adjustsStack(), llvm::TargetOptions::DisableFramePointerElim(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::MachineFrameInfo::isFrameAddressTaken(), and llvm::TargetMachine::Options.
Referenced by llvm::ARMFrameLowering::determineCalleeSaves().
|
override |
Definition at line 453 of file ARMBaseRegisterInfo.cpp.
References BasePtr, llvm::TargetRegisterInfo::canRealignStack(), llvm::ARMSubtarget::getFramePointerReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::ARMFrameLowering::hasReservedCallFrame(), and MRI.
Referenced by checkNumAlignedDPRCS2Regs(), and needsFrameBaseReg().
|
inlineoverride |
Definition at line 257 of file ARMBaseRegisterInfo.h.
|
override |
Definition at line 790 of file ARMBaseRegisterInfo.cpp.
References llvm::ARMII::AddrMode4, llvm::ARMII::AddrMode6, llvm::ARMII::AddrModeMask, llvm::ARMII::AddrModeT2_i7, llvm::ARMII::AddrModeT2_i7s2, llvm::ARMII::AddrModeT2_i7s4, llvm::ARMCC::AL, assert(), llvm::TargetRegisterClass::contains(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::Done, llvm::emitARMRegPlusImmediate(), llvm::emitT2RegPlusImmediate(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::ARMFrameLowering::hasReservedCallFrame(), llvm::MachineFrameInfo::hasVarSizedObjects(), II, llvm::RegScavenger::isScavengingFrameIndex(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumb2Function(), llvm::ARMFunctionInfo::isThumbFunction(), llvm::Register::isVirtual(), MBB, MI, llvm::Offset, llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::rewriteARMFrameIndex(), llvm::rewriteT2FrameIndex(), and TII.
Referenced by llvm::ThumbRegisterInfo::eliminateFrameIndex().
|
virtual |
emitLoadConstPool - Emits a load from constpool to materialize the specified immediate.
Reimplemented in llvm::ThumbRegisterInfo.
Definition at line 496 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addConstantPoolIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::CallingConv::C, llvm::MachineFunction::getConstantPool(), llvm::Function::getContext(), llvm::getDefRegState(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::Type::getInt32Ty(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), Idx, MBB, MBBI, llvm::predOps(), llvm::MachineInstrBuilder::setMIFlags(), and TII.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks().
|
inline |
Definition at line 206 of file ARMBaseRegisterInfo.h.
References BasePtr.
Referenced by llvm::ARMFrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), and llvm::ARMFrameLowering::ResolveFrameIndexReference().
|
override |
Code Generation virtual methods...
Definition at line 63 of file ARMBaseRegisterInfo.cpp.
References llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CXX_FAST_TLS, F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::ARMSubtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::ARMSubtarget::isMClass(), llvm::ARMFunctionInfo::isSplitCSR(), llvm::ARMSubtarget::isTargetDarwin(), llvm::ARMSubtarget::splitFramePointerPush(), llvm::ARMSubtarget::splitFramePushPop(), llvm::ARMTargetLowering::supportSwiftError(), and llvm::CallingConv::SwiftTail.
Referenced by llvm::ARMFrameLowering::determineCalleeSaves().
const MCPhysReg * ARMBaseRegisterInfo::getCalleeSavedRegsViaCopy | ( | const MachineFunction * | MF | ) | const |
Definition at line 121 of file ARMBaseRegisterInfo.cpp.
References assert(), llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and llvm::ARMFunctionInfo::isSplitCSR().
|
override |
Definition at line 131 of file ARMBaseRegisterInfo.cpp.
References CC, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getAttributes(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::ARMSubtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::AttributeList::hasAttrSomewhere(), llvm::ARMSubtarget::isTargetDarwin(), llvm::ARMTargetLowering::supportSwiftError(), and llvm::CallingConv::SwiftTail.
|
override |
Definition at line 292 of file ARMBaseRegisterInfo.cpp.
|
override |
Definition at line 530 of file ARMBaseRegisterInfo.cpp.
References llvm::ARMII::AddrMode2, llvm::ARMII::AddrMode3, llvm::ARMII::AddrMode5, llvm::ARMII::AddrMode_i12, llvm::ARMII::AddrModeMask, llvm::ARMII::AddrModeT1_s, llvm::ARMII::AddrModeT2_i12, llvm::ARMII::AddrModeT2_i8, llvm::ARMII::AddrModeT2_i8neg, llvm::ARMII::AddrModeT2_i8pos, llvm::ARM_AM::getAM2Offset(), llvm::ARM_AM::getAM2Op(), llvm::ARM_AM::getAM3Offset(), llvm::ARM_AM::getAM3Op(), llvm::ARM_AM::getAM5Offset(), llvm::ARM_AM::getAM5Op(), llvm::MachineOperand::getImm(), Idx, llvm_unreachable, MI, and llvm::ARM_AM::sub.
Referenced by isFrameOffsetLegal().
|
override |
Definition at line 485 of file ARMBaseRegisterInfo.cpp.
References llvm::ARMSubtarget::getFramePointerReg(), and llvm::MachineFunction::getSubtarget().
Referenced by llvm::ARMFrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), needsFrameBaseReg(), llvm::ARMFrameLowering::ResolveFrameIndexReference(), llvm::Thumb1FrameLowering::restoreCalleeSavedRegisters(), and llvm::Thumb1FrameLowering::spillCalleeSavedRegisters().
|
override |
Definition at line 193 of file ARMBaseRegisterInfo.cpp.
|
override |
Definition at line 256 of file ARMBaseRegisterInfo.cpp.
References llvm::TargetRegisterClass::getID(), llvm::MachineFunction::getSubtarget(), llvm::TargetRegisterClass::getSuperClasses(), and I.
Referenced by llvm::ThumbRegisterInfo::getLargestLegalSuperClass().
|
inlineoverride |
Definition at line 245 of file ARMBaseRegisterInfo.h.
Definition at line 154 of file ARMBaseRegisterInfo.cpp.
|
override |
Definition at line 286 of file ARMBaseRegisterInfo.cpp.
Referenced by llvm::ThumbRegisterInfo::getPointerRegClass().
|
override |
Definition at line 336 of file ARMBaseRegisterInfo.cpp.
References getPairedGPR(), llvm::VirtRegMap::getPhys(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineFunction::getRegInfo(), llvm::VirtRegMap::hasPhys(), llvm::is_contained(), llvm::Register::isPhysical(), MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ARMRI::RegLR, llvm::ARMRI::RegPairEven, and llvm::ARMRI::RegPairOdd.
|
override |
|
override |
Definition at line 199 of file ARMBaseRegisterInfo.cpp.
References assert(), BasePtr, llvm::ARM::D16, llvm::ARMSubtarget::getFramePointerReg(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::ARMSubtarget::isR9Reserved(), and llvm::Reserved.
Referenced by isAsmClobberable().
|
inline |
Definition at line 242 of file ARMBaseRegisterInfo.h.
const uint32_t * ARMBaseRegisterInfo::getSjLjDispatchPreservedMask | ( | const MachineFunction & | MF | ) | const |
Definition at line 166 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::ARMSubtarget::hasVFP2Base(), and llvm::ARMSubtarget::isThumb1Only().
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 175 of file ARMBaseRegisterInfo.cpp.
References CC, llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, and llvm::ARMSubtarget::isTargetDarwin().
const uint32_t * ARMBaseRegisterInfo::getTLSCallPreservedMask | ( | const MachineFunction & | MF | ) | const |
Definition at line 159 of file ARMBaseRegisterInfo.cpp.
References assert(), llvm::MachineFunction::getSubtarget(), and llvm::ARMSubtarget::isTargetDarwin().
bool ARMBaseRegisterInfo::hasBasePointer | ( | const MachineFunction & | MF | ) | const |
Definition at line 416 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), and llvm::ARMFunctionInfo::isThumb2Function().
Referenced by llvm::ARMFrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::emitPrologue(), llvm::Thumb1FrameLowering::emitPrologue(), getReservedRegs(), isInlineAsmReadOnlyReg(), and llvm::ARMFrameLowering::ResolveFrameIndexReference().
|
override |
Definition at line 235 of file ARMBaseRegisterInfo.cpp.
References getReservedRegs(), and llvm::BitVector::test().
|
override |
Definition at line 721 of file ARMBaseRegisterInfo.cpp.
References llvm::ARMII::AddrMode2, llvm::ARMII::AddrMode3, llvm::ARMII::AddrMode4, llvm::ARMII::AddrMode5, llvm::ARMII::AddrMode6, llvm::ARMII::AddrMode_i12, llvm::ARMII::AddrModeMask, llvm::ARMII::AddrModeT1_s, llvm::ARMII::AddrModeT2_i12, llvm::ARMII::AddrModeT2_i8, llvm::ARMII::AddrModeT2_i8neg, llvm::ARMII::AddrModeT2_i8pos, assert(), getFrameIndexInstrOffset(), isSigned(), llvm_unreachable, MI, and llvm::Offset.
Referenced by needsFrameBaseReg().
|
override |
Definition at line 240 of file ARMBaseRegisterInfo.cpp.
References assert(), BasePtr, llvm::ARMSubtarget::getFramePointerReg(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), and llvm::Reserved.
|
override |
materializeFrameBaseRegister - Insert defining instruction(s) for BaseReg to be a pointer to FrameIdx at the beginning of the basic block.
Definition at line 665 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::ARMCC::AL, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::condCodeOp(), DL, llvm::MachineBasicBlock::end(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumbFunction(), MBB, MRI, llvm::Offset, llvm::predOps(), and TII.
|
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 583 of file ARMBaseRegisterInfo.cpp.
References assert(), canRealignStack(), llvm::MachineFunction::getFrameInfo(), getFrameRegister(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getLocalFrameMaxAlign(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::TargetFrameLowering::getStackAlign(), llvm::ARMFrameLowering::hasFP(), llvm::MachineFrameInfo::hasVarSizedObjects(), isFrameOffsetLegal(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumbFunction(), MI, and llvm::Offset.
|
override |
Definition at line 520 of file ARMBaseRegisterInfo.cpp.
|
override |
Code Generation virtual methods...
Definition at line 515 of file ARMBaseRegisterInfo.cpp.
|
override |
Definition at line 525 of file ARMBaseRegisterInfo.cpp.
|
override |
Definition at line 693 of file ARMBaseRegisterInfo.cpp.
References assert(), llvm::Done, llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), llvm::ARMFunctionInfo::isThumb1OnlyFunction(), llvm::ARMFunctionInfo::isThumb2Function(), llvm::ARMFunctionInfo::isThumbFunction(), MBB, MI, llvm::Offset, llvm::rewriteARMFrameIndex(), llvm::rewriteT2FrameIndex(), and TII.
Referenced by llvm::ThumbRegisterInfo::resolveFrameIndex().
|
override |
SrcRC and DstRC will be morphed into NewRC if this returns true.
Definition at line 877 of file ARMBaseRegisterInfo.cpp.
References llvm::dbgs(), llvm::ARMFunctionInfo::getCoalescedWeight(), llvm::MachineBasicBlock::getParent(), LLVM_DEBUG, MBB, MI, MRI, and llvm::MachineBasicBlock::size().
|
override |
Definition at line 936 of file ARMBaseRegisterInfo.cpp.
References llvm::TargetRegisterInfo::shouldRewriteCopySrc().
|
override |
Definition at line 391 of file ARMBaseRegisterInfo.cpp.
References llvm::MachineFunction::getRegInfo(), llvm::Register::isVirtual(), MRI, llvm::ARMRI::RegPairEven, and llvm::ARMRI::RegPairOdd.
|
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 132 of file ARMBaseRegisterInfo.h.
Referenced by canRealignStack(), getBaseRegister(), getReservedRegs(), and isInlineAsmReadOnlyReg().