LLVM 20.0.0git
|
#include "Target/AArch64/AArch64RegisterInfo.h"
Definition at line 26 of file AArch64RegisterInfo.h.
Definition at line 42 of file AArch64RegisterInfo.cpp.
References llvm::AArch64_MC::initLLVMToCVRegMapping().
bool AArch64RegisterInfo::cannotEliminateFrame | ( | const MachineFunction & | MF | ) | const |
Definition at line 730 of file AArch64RegisterInfo.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::AArch64FrameLowering::determineCalleeSaves().
|
override |
Definition at line 915 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameOffsetCanUpdate, llvm::AArch64FrameOffsetIsLegal, llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineOperand::ChangeToImmediate(), createScratchRegisterForInstruction(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::emitFrameOffset(), llvm::StackOffset::getFixed(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::AArch64FrameLowering::getNonLocalFrameIndexReference(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::AArch64FunctionInfo::getTaggedBasePointerOffset(), llvm::MachineFrameInfo::hasVarSizedObjects(), II, llvm::isAArch64FrameOffsetLegal(), llvm::RegScavenger::isScavengingFrameIndex(), MBB, MI, llvm::AArch64II::MO_TAGGED, llvm::Offset, llvm::AArch64FrameLowering::resolveFrameIndexReference(), llvm::rewriteAArch64FrameIndex(), and TII.
void AArch64RegisterInfo::emitReservedArgRegCallError | ( | const MachineFunction & | MF | ) | const |
Definition at line 535 of file AArch64RegisterInfo.cpp.
References F, and llvm::MachineFunction::getFunction().
|
override |
Definition at line 400 of file AArch64RegisterInfo.cpp.
References llvm::AArch64InstPrinter::getRegisterName(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::AArch64Subtarget::isWindowsArm64EC(), and llvm::MCRegisterInfo::regsOverlap().
unsigned AArch64RegisterInfo::getBaseRegister | ( | ) | const |
Definition at line 571 of file AArch64RegisterInfo.cpp.
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), and getLocalAddressRegister().
|
override |
Code Generation virtual methods...
Definition at line 71 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::AnyReg, llvm::CallingConv::ARM64EC_Thunk_X64, assert(), llvm::CallingConv::CFGuard_Check, llvm::Function::getAttributes(), llvm::Function::getCallingConv(), getDarwinCalleeSavedRegs(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::AttributeList::hasAttrSomewhere(), llvm::AArch64FunctionInfo::isSVECC(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::AArch64Subtarget::isTargetWindows(), llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::report_fatal_error(), llvm::AArch64TargetLowering::supportSwiftError(), llvm::CallingConv::SwiftTail, and llvm::CallingConv::Win64.
Referenced by UpdateCustomCalleeSavedRegs().
const MCPhysReg * AArch64RegisterInfo::getCalleeSavedRegsViaCopy | ( | const MachineFunction * | MF | ) | const |
Definition at line 203 of file AArch64RegisterInfo.cpp.
References assert(), llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and llvm::AArch64FunctionInfo::isSplitCSR().
|
override |
Definition at line 279 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::AnyReg, CC, llvm::CallingConv::CFGuard_Check, llvm::Function::getAttributes(), getDarwinCallPreservedMask(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::AttributeList::hasAttrSomewhere(), llvm::Function::hasFnAttribute(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::report_fatal_error(), llvm::AArch64TargetLowering::supportSwiftError(), and llvm::CallingConv::SwiftTail.
|
override |
Definition at line 565 of file AArch64RegisterInfo.cpp.
|
inlineoverride |
Definition at line 56 of file AArch64RegisterInfo.h.
|
override |
Definition at line 331 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget(), and llvm::AArch64Subtarget::isTargetLinux().
const MCPhysReg * AArch64RegisterInfo::getDarwinCalleeSavedRegs | ( | const MachineFunction * | MF | ) | const |
Definition at line 149 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, assert(), llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::AttributeList::hasAttrSomewhere(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::report_fatal_error(), llvm::AArch64TargetLowering::supportSwiftError(), llvm::CallingConv::SwiftTail, and llvm::CallingConv::Win64.
Referenced by getCalleeSavedRegs().
const uint32_t * AArch64RegisterInfo::getDarwinCallPreservedMask | ( | const MachineFunction & | MF, |
CallingConv::ID | CC | ||
) | const |
Definition at line 243 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, assert(), CC, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getAttributes(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::AttributeList::hasAttrSomewhere(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::report_fatal_error(), llvm::AArch64TargetLowering::supportSwiftError(), and llvm::CallingConv::SwiftTail.
Referenced by getCallPreservedMask().
|
override |
Definition at line 691 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameLowering::hasFP().
Referenced by getLocalAddressRegister().
unsigned AArch64RegisterInfo::getLocalAddressRegister | ( | const MachineFunction & | MF | ) | const |
Definition at line 1055 of file AArch64RegisterInfo.cpp.
References getBaseRegister(), llvm::MachineFunction::getFrameInfo(), getFrameRegister(), and llvm::MachineFunction::hasEHFunclets().
Definition at line 375 of file AArch64RegisterInfo.cpp.
|
override |
Definition at line 888 of file AArch64RegisterInfo.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::DIExpression::appendOffset(), assert(), getDwarfRegNum(), llvm::Offset, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
override |
Definition at line 559 of file AArch64RegisterInfo.cpp.
|
override |
Definition at line 1008 of file AArch64RegisterInfo.cpp.
References llvm::TargetRegisterClass::getID(), llvm::AArch64Subtarget::getNumXRegisterReserved(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::AArch64FrameLowering::hasFP(), and llvm::Triple::isOSDarwin().
|
override |
Definition at line 496 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineFunction::getProperties(), getStrictlyReservedRegs(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunctionProperties::hasProperty(), llvm::AArch64Subtarget::isLRReservedForRA(), llvm::AArch64Subtarget::isXRegisterReservedForRA(), llvm::MachineFunctionProperties::NoVRegs, and llvm::Reserved.
Referenced by isReservedReg().
|
inline |
Definition at line 33 of file AArch64RegisterInfo.h.
Definition at line 366 of file AArch64RegisterInfo.cpp.
BitVector AArch64RegisterInfo::getStrictlyReservedRegs | ( | const MachineFunction & | MF | ) | const |
Definition at line 427 of file AArch64RegisterInfo.cpp.
References assert(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GRAAL, hasBasePointer(), llvm::Function::hasFnAttribute(), llvm::AArch64FrameLowering::hasFP(), llvm::Triple::isOSDarwin(), llvm::AArch64Subtarget::isWindowsArm64EC(), llvm::AArch64Subtarget::isXRegisterReserved(), llvm::Reserved, and SubReg.
Referenced by getReservedRegs(), and isStrictlyReservedReg().
|
override |
Definition at line 230 of file AArch64RegisterInfo.cpp.
References Idx.
const uint32_t * AArch64RegisterInfo::getThisReturnPreservedMask | ( | const MachineFunction & | MF, |
CallingConv::ID | CC | ||
) | const |
getThisReturnPreservedMask - Returns a call preserved mask specific to the case that 'returned' is on an i64 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 i64 argument and an i64 return value)
Should return NULL in the case that the calling convention does not have this property
Definition at line 380 of file AArch64RegisterInfo.cpp.
References assert(), CC, llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, and llvm::AArch64Subtarget::isTargetDarwin().
Definition at line 339 of file AArch64RegisterInfo.cpp.
References assert(), llvm::Triple::isOSBinFormatELF(), and llvm::Triple::isOSDarwin().
Stack probing calls preserve different CSRs to the normal CC.
Definition at line 395 of file AArch64RegisterInfo.cpp.
bool AArch64RegisterInfo::hasBasePointer | ( | const MachineFunction & | MF | ) | const |
Definition at line 573 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::AArch64FunctionInfo::getStackSizeSVE(), llvm::MachineFunction::getSubtarget(), llvm::AArch64FunctionInfo::hasCalculatedStackSizeSVE(), llvm::MachineFunction::hasEHFunclets(), and llvm::MachineFrameInfo::hasVarSizedObjects().
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), explainReservedReg(), getRegPressureLimit(), and getStrictlyReservedRegs().
bool AArch64RegisterInfo::isAnyArgRegReserved | ( | const MachineFunction & | MF | ) | const |
Definition at line 529 of file AArch64RegisterInfo.cpp.
References llvm::any_of(), and isStrictlyReservedReg().
|
override |
Definition at line 610 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X0, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X1, llvm::CallingConv::AArch64_SME_ABI_Support_Routines_PreserveMost_From_X2, llvm::CallingConv::AArch64_SVE_VectorCall, llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::C, CC, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::CXX_FAST_TLS, llvm::CallingConv::Fast, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::CallingConv::GHC, llvm::is_contained(), llvm::AArch64Subtarget::isCallingConvWin64(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::AArch64Subtarget::isTargetILP32(), llvm::AArch64Subtarget::isTargetWindows(), llvm::Function::isVarArg(), llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::report_fatal_error(), llvm::CallingConv::Swift, llvm::CallingConv::SwiftTail, llvm::CallingConv::Tail, and llvm::CallingConv::Win64.
|
override |
Definition at line 542 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::getFunction(), llvm::Function::hasFnAttribute(), isReservedReg(), and llvm::MCRegisterInfo::regsOverlap().
|
override |
Definition at line 805 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameOffsetIsLegal, assert(), llvm::StackOffset::getFixed(), llvm::isAArch64FrameOffsetLegal(), MI, and llvm::Offset.
Referenced by needsFrameBaseReg().
bool AArch64RegisterInfo::isReservedReg | ( | const MachineFunction & | MF, |
MCRegister | Reg | ||
) | const |
Definition at line 519 of file AArch64RegisterInfo.cpp.
References getReservedRegs().
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), and isAsmClobberable().
bool AArch64RegisterInfo::isStrictlyReservedReg | ( | const MachineFunction & | MF, |
MCRegister | Reg | ||
) | const |
Definition at line 524 of file AArch64RegisterInfo.cpp.
References getStrictlyReservedRegs().
Referenced by isAnyArgRegReserved().
|
override |
Insert defining instruction(s) for BaseReg to be a pointer to FrameIdx at the beginning of the basic block.
Definition at line 816 of file AArch64RegisterInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::AArch64_AM::getShifterImm(), llvm::MachineFunction::getSubtarget(), llvm::AArch64_AM::LSL, MBB, MRI, llvm::Offset, 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 741 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::AArch64FrameLowering::hasFP(), isFrameOffsetLegal(), MI, and llvm::Offset.
Return whether the register needs a CFI entry.
Not all unwinders may know about SVE registers, so we assume the lowest common denominator, i.e. the callee-saves required by the base ABI. For the SVE registers z8-z15 only the lower 64-bits (d8-d15) need to be saved. The lower 64-bits subreg is returned in RegToUseForCFI
.
Definition at line 52 of file AArch64RegisterInfo.cpp.
References contains(), and I.
|
override |
Definition at line 724 of file AArch64RegisterInfo.cpp.
|
override |
Definition at line 696 of file AArch64RegisterInfo.cpp.
|
override |
Definition at line 701 of file AArch64RegisterInfo.cpp.
|
override |
Definition at line 840 of file AArch64RegisterInfo.cpp.
References assert(), llvm::Done, llvm::StackOffset::getFixed(), llvm::MachineFunction::getSubtarget(), MI, llvm::Offset, llvm::rewriteAArch64FrameIndex(), and TII.
|
override |
Definition at line 1116 of file AArch64RegisterInfo.cpp.
|
override |
SrcRC and DstRC will be morphed into NewRC if this returns true.
Definition at line 1066 of file AArch64RegisterInfo.cpp.
References llvm::any_of(), llvm::TargetRegisterClass::getID(), MI, MRI, and SubReg.
Definition at line 371 of file AArch64RegisterInfo.cpp.
void AArch64RegisterInfo::UpdateCustomCalleeSavedRegs | ( | MachineFunction & | MF | ) | const |
Definition at line 212 of file AArch64RegisterInfo.cpp.
References getCalleeSavedRegs(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::AArch64Subtarget::isXRegCustomCalleeSaved(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::MachineRegisterInfo::setCalleeSavedRegs().
void AArch64RegisterInfo::UpdateCustomCallPreservedMask | ( | MachineFunction & | MF, |
const uint32_t ** | Mask | ||
) | const |
Definition at line 347 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::allocateRegMask(), llvm::MachineOperand::getRegMaskSize(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::isXRegCustomCalleeSaved(), and SubReg.
|
override |