LLVM
8.0.1
|
#include "Target/AArch64/AArch64RegisterInfo.h"
Definition at line 27 of file AArch64RegisterInfo.h.
Definition at line 38 of file AArch64RegisterInfo.cpp.
References llvm::AArch64_MC::initLLVMToCVRegMapping().
bool AArch64RegisterInfo::cannotEliminateFrame | ( | const MachineFunction & | MF | ) | const |
Definition at line 319 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(), and getCSRFirstUseCost().
|
override |
Definition at line 440 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::emitFrameOffset(), llvm::ISD::FrameIndex, llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineInstr::isDebugValue(), llvm::RegScavenger::isScavengingFrameIndex(), MI, llvm::AArch64FrameLowering::resolveFrameIndexReference(), llvm::rewriteAArch64FrameIndex(), and TII.
Referenced by getCSRFirstUseCost().
void AArch64RegisterInfo::emitReservedArgRegCallError | ( | const MachineFunction & | MF | ) | const |
Definition at line 228 of file AArch64RegisterInfo.cpp.
References llvm::LLVMContext::diagnose(), F(), llvm::Function::getContext(), and llvm::MachineFunction::getFunction().
Referenced by getCompareCC(), getSEHRegNum(), and mayTailCallThisCC().
unsigned AArch64RegisterInfo::getBaseRegister | ( | ) | const |
Definition at line 257 of file AArch64RegisterInfo.cpp.
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), getCSRFirstUseCost(), LowerMUL(), and llvm::AArch64FrameLowering::resolveFrameIndexReference().
|
override |
Code Generation virtual methods...
Definition at line 44 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::AnyReg, assert(), llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::AttributeList::hasAttrSomewhere(), llvm::AArch64FunctionInfo::isSplitCSR(), llvm::AArch64Subtarget::isTargetWindows(), llvm::CallingConv::PreserveMost, llvm::AArch64TargetLowering::supportSwiftError(), and llvm::Attribute::SwiftError.
Referenced by getSEHRegNum(), and UpdateCustomCalleeSavedRegs().
const MCPhysReg * AArch64RegisterInfo::getCalleeSavedRegsViaCopy | ( | const MachineFunction * | MF | ) | const |
Definition at line 71 of file AArch64RegisterInfo.cpp.
References assert(), llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), and llvm::MachineFunction::getInfo().
Referenced by getSEHRegNum(), llvm::AArch64TargetLowering::insertCopiesSplitCSR(), and mayTailCallThisCC().
|
override |
Definition at line 111 of file AArch64RegisterInfo.cpp.
References llvm::CallingConv::AArch64_VectorCall, llvm::CallingConv::AnyReg, llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getAttributes(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::AttributeList::hasAttrSomewhere(), llvm::Function::hasFnAttribute(), llvm::CallingConv::PreserveMost, llvm::Attribute::ShadowCallStack, llvm::AArch64TargetLowering::supportSwiftError(), and llvm::Attribute::SwiftError.
Referenced by getSEHRegNum(), and mayTailCallThisCC().
|
override |
Definition at line 251 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
inlineoverride |
Definition at line 53 of file AArch64RegisterInfo.h.
References cannotEliminateFrame(), eliminateFrameIndex(), getBaseRegister(), getCrossCopyRegClass(), getFrameRegister(), getNoPreservedMask(), getPointerRegClass(), getRegPressureLimit(), getReservedRegs(), getSubClassWithSubReg(), getThisReturnPreservedMask(), getTLSCallPreservedMask(), getWindowsStackProbePreservedMask(), hasBasePointer(), isAsmClobberable(), isConstantPhysReg(), isFrameOffsetLegal(), Kind, materializeFrameBaseRegister(), MI, needsFrameBaseReg(), requiresFrameIndexScavenging(), requiresRegisterScavenging(), requiresVirtualBaseRegisters(), resolveFrameIndex(), and useFPForScavengingIndex().
|
override |
Definition at line 287 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameLowering::hasFP().
Referenced by getCSRFirstUseCost(), LowerMUL(), and llvm::AArch64FrameLowering::resolveFrameIndexReference().
Definition at line 164 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 245 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 491 of file AArch64RegisterInfo.cpp.
References llvm::TargetRegisterClass::getID(), llvm::AArch64Subtarget::getNumXRegisterReserved(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::AArch64FrameLowering::hasFP(), and llvm::Triple::isOSDarwin().
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 187 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::Function::hasFnAttribute(), llvm::AArch64FrameLowering::hasFP(), llvm::Triple::isOSDarwin(), llvm::AArch64Subtarget::isXRegisterReserved(), and llvm::Attribute::SpeculativeLoadHardening.
Referenced by getCSRFirstUseCost(), and isReservedReg().
|
inline |
Definition at line 34 of file AArch64RegisterInfo.h.
References emitReservedArgRegCallError(), getCalleeSavedRegs(), getCalleeSavedRegsViaCopy(), getCallPreservedMask(), isAnyArgRegReserved(), isReservedReg(), llvm::BitmaskEnumDetail::Mask(), Reg, UpdateCustomCalleeSavedRegs(), and UpdateCustomCallPreservedMask().
|
override |
Definition at line 98 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
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 169 of file AArch64RegisterInfo.cpp.
References assert(), and llvm::CallingConv::GHC.
Referenced by getCSRFirstUseCost(), and mayTailCallThisCC().
Definition at line 136 of file AArch64RegisterInfo.cpp.
References assert(), llvm::Triple::isOSBinFormatELF(), and llvm::Triple::isOSDarwin().
Referenced by getCSRFirstUseCost(), and mayTailCallThisCC().
Stack probing calls preserve different CSRs to the normal CC.
Definition at line 182 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost(), and getReductionSDNode().
bool AArch64RegisterInfo::hasBasePointer | ( | const MachineFunction & | MF | ) | const |
Definition at line 259 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::MachineFunction::hasEHFunclets(), and llvm::MachineFrameInfo::hasVarSizedObjects().
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), getCSRFirstUseCost(), getRegPressureLimit(), getReservedRegs(), LowerMUL(), and llvm::AArch64FrameLowering::resolveFrameIndexReference().
bool AArch64RegisterInfo::isAnyArgRegReserved | ( | const MachineFunction & | MF | ) | const |
Definition at line 219 of file AArch64RegisterInfo.cpp.
References llvm::any_of(), llvm::sys::path::begin(), llvm::sys::path::end(), GPRArgRegs, and isReservedReg().
Referenced by getCompareCC(), getSEHRegNum(), and mayTailCallThisCC().
|
override |
Definition at line 235 of file AArch64RegisterInfo.cpp.
References isReservedReg().
Referenced by getCSRFirstUseCost().
Definition at line 240 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 390 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameOffsetIsLegal, assert(), and llvm::isAArch64FrameOffsetLegal().
Referenced by getCSRFirstUseCost(), and needsFrameBaseReg().
bool AArch64RegisterInfo::isReservedReg | ( | const MachineFunction & | MF, |
unsigned | Reg | ||
) | const |
Definition at line 214 of file AArch64RegisterInfo.cpp.
References getReservedRegs(), and Reg.
Referenced by llvm::AArch64FrameLowering::determineCalleeSaves(), getSEHRegNum(), isAnyArgRegReserved(), isAsmClobberable(), and llvm::AArch64InstrInfo::isMBBSafeToOutlineFrom().
|
override |
Insert defining instruction(s) for BaseReg to be a pointer to FrameIdx at the beginning of the basic block.
Definition at line 401 of file AArch64RegisterInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::AArch64_AM::getShifterImm(), llvm::MachineFunction::getSubtarget(), llvm::MipsISD::Ins, llvm::AArch64_AM::LSL, MRI, and TII.
Referenced by getCSRFirstUseCost().
|
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 330 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameSize(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::AArch64FrameLowering::hasFP(), llvm::MachineOperand::isFI(), isFrameOffsetLegal(), llvm::MachineInstr::mayLoad(), and llvm::MachineInstr::mayStore().
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 313 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 292 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 297 of file AArch64RegisterInfo.cpp.
Referenced by getCSRFirstUseCost().
|
override |
Definition at line 423 of file AArch64RegisterInfo.cpp.
References assert(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::isFI(), llvm::rewriteAArch64FrameIndex(), and TII.
Referenced by getCSRFirstUseCost().
|
inlineoverride |
Definition at line 122 of file AArch64RegisterInfo.h.
void AArch64RegisterInfo::UpdateCustomCalleeSavedRegs | ( | MachineFunction & | MF | ) | const |
Definition at line 80 of file AArch64RegisterInfo.cpp.
References getCalleeSavedRegs(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::AArch64Subtarget::isXRegCustomCalleeSaved(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::MachineRegisterInfo::setCalleeSavedRegs().
Referenced by llvm::AArch64TargetLowering::CCAssignFnForReturn(), getSEHRegNum(), and llvm::AArch64CallLowering::lowerFormalArguments().
void AArch64RegisterInfo::UpdateCustomCallPreservedMask | ( | MachineFunction & | MF, |
const uint32_t ** | Mask | ||
) | const |
Definition at line 144 of file AArch64RegisterInfo.cpp.
References llvm::MachineFunction::allocateRegMask(), llvm::MachineOperand::getRegMaskSize(), llvm::MachineFunction::getSubtarget(), llvm::AArch64Subtarget::isXRegCustomCalleeSaved(), llvm::Intrinsic::memcpy, and SubReg.
Referenced by getReductionSDNode(), getSEHRegNum(), and mayTailCallThisCC().
|
override |
Definition at line 303 of file AArch64RegisterInfo.cpp.
References llvm::AArch64FrameLowering::hasFP().
Referenced by getCSRFirstUseCost().