LLVM 20.0.0git
|
#include "Target/X86/X86RegisterInfo.h"
Definition at line 24 of file X86RegisterInfo.h.
Definition at line 54 of file X86RegisterInfo.cpp.
References llvm::X86_MC::initLLVMToSEHAndCVRegMapping().
|
override |
Definition at line 736 of file X86RegisterInfo.cpp.
References assert().
|
override |
Definition at line 784 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterInfo::canRealignStack(), CantUseSP(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getRegInfo(), and MRI.
Referenced by llvm::X86InstrInfo::loadRegFromStackSlot(), and llvm::X86InstrInfo::storeRegToStackSlot().
void X86RegisterInfo::eliminateFrameIndex | ( | MachineBasicBlock::iterator | II, |
unsigned | FIOperandNum, | ||
Register | BaseReg, | ||
int | FIOffset | ||
) | const |
Definition at line 850 of file X86RegisterInfo.cpp.
References assert(), llvm::MachineOperand::ChangeToImmediate(), II, MI, and llvm::Offset.
|
override |
Definition at line 890 of file X86RegisterInfo.cpp.
References assert(), llvm::MachineOperand::ChangeToImmediate(), contains(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::StackOffset::getFixed(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReferenceSP(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), llvm::X86FrameLowering::getWin64EHFrameIndexRef(), llvm::getX86SubSuperRegister(), II, llvm::X86FrameLowering::Is64Bit, llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::MachineFrameInfo::isFixedObjectIndex(), isFuncletReturnInstr(), MBB, MBBI, MI, llvm::Offset, and tryOptimizeLEAtoMOV().
|
inlineoverride |
Process frame indices in forwards block order because X86InstrInfo::getSPAdjust relies on it when searching for the ADJCALLSTACKUP pseudo following a call.
TODO: Fix this and return true like all other targets.
Definition at line 153 of file X86RegisterInfo.h.
unsigned X86RegisterInfo::findDeadCallerSavedReg | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator & | MBBI | ||
) | const |
findDeadCallerSavedReg - Return a caller-saved register that isn't live when it reaches the "return" instruction.
We can then pop a stack object to this register without worry about clobbering it.
Definition at line 970 of file X86RegisterInfo.cpp.
References llvm::MachineFunction::callsEHReturn(), llvm::MachineBasicBlock::end(), getGPRsForTailCall(), llvm::MachineBasicBlock::getParent(), llvm::MCRegAliasIterator::isValid(), MBB, MBBI, and Uses.
Referenced by llvm::X86FrameLowering::emitSPUpdate().
|
inline |
Definition at line 166 of file X86RegisterInfo.h.
Referenced by llvm::X86FrameLowering::determineCalleeSaves(), llvm::X86FrameLowering::emitPrologue(), llvm::X86FrameLowering::getFrameIndexReference(), getReservedRegs(), llvm::X86FrameLowering::restoreWin32EHStackPointers(), and llvm::X86FrameLowering::spillFPBP().
|
override |
getCalleeSavedRegs - Return a null-terminated list of all of the callee-save registers on this target.
Definition at line 288 of file X86RegisterInfo.cpp.
References llvm::CallingConv::AnyReg, assert(), llvm::MachineFunction::callsEHReturn(), CC, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::Cold, llvm::CallingConv::CXX_FAST_TLS, F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::X86Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::Function::hasFnAttribute(), llvm::X86Subtarget::hasSSE1(), llvm::CallingConv::HiPE, llvm::CallingConv::Intel_OCL_BI, llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::X86TargetLowering::supportSwiftError(), llvm::CallingConv::SwiftTail, llvm::CallingConv::Win64, llvm::CallingConv::X86_64_SysV, llvm::CallingConv::X86_INTR, and llvm::CallingConv::X86_RegCall.
const MCPhysReg * X86RegisterInfo::getCalleeSavedRegsViaCopy | ( | const MachineFunction * | MF | ) | const |
Definition at line 417 of file X86RegisterInfo.cpp.
References assert(), llvm::CallingConv::CXX_FAST_TLS, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and llvm::X86MachineFunctionInfo::isSplitCSR().
|
override |
Definition at line 427 of file X86RegisterInfo.cpp.
References llvm::CallingConv::AnyReg, assert(), CC, llvm::CallingConv::CFGuard_Check, llvm::CallingConv::Cold, llvm::CallingConv::CXX_FAST_TLS, F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::X86Subtarget::getTargetLowering(), llvm::CallingConv::GHC, llvm::X86Subtarget::hasAVX(), llvm::X86Subtarget::hasAVX512(), llvm::X86Subtarget::hasSSE1(), llvm::CallingConv::HiPE, llvm::CallingConv::Intel_OCL_BI, llvm::CallingConv::PreserveAll, llvm::CallingConv::PreserveMost, llvm::CallingConv::PreserveNone, llvm::X86TargetLowering::supportSwiftError(), llvm::CallingConv::SwiftTail, llvm::CallingConv::Win64, llvm::CallingConv::X86_64_SysV, llvm::CallingConv::X86_INTR, and llvm::CallingConv::X86_RegCall.
Referenced by getReservedRegs().
|
override |
getCrossCopyRegClass - Returns a legal register class to copy a register in the specified class to or from.
Returns NULL if it is possible to copy between a two registers of the specified class.
Definition at line 257 of file X86RegisterInfo.cpp.
Definition at line 538 of file X86RegisterInfo.cpp.
|
inline |
Returns physical register used as frame pointer.
This will always returns the frame pointer register, contrary to getFrameRegister() which returns the "base pointer" in situations involving a stack, frame and base pointer.
Definition at line 171 of file X86RegisterInfo.h.
Referenced by llvm::X86FrameLowering::getFrameIndexReference().
|
override |
Definition at line 1018 of file X86RegisterInfo.cpp.
References llvm::X86FrameLowering::hasFP().
Referenced by llvm::X86FrameLowering::assignCalleeSavedSpillSlots(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86FrameLowering::emitCalleeSavedFrameMovesFullCFA(), llvm::X86FrameLowering::emitEpilogue(), llvm::X86FrameLowering::emitPrologue(), llvm::X86FrameLowering::getFrameIndexReference(), getPtrSizedFrameRegister(), llvm::X86FrameLowering::restoreWin32EHStackPointers(), and llvm::X86FrameLowering::spillFPBP().
const TargetRegisterClass * X86RegisterInfo::getGPRsForTailCall | ( | const MachineFunction & | MF | ) | const |
getGPRsForTailCall - Returns a register class with registers that can be used in forming tail calls.
Definition at line 243 of file X86RegisterInfo.cpp.
References F, llvm::MachineFunction::getFunction(), llvm::CallingConv::HiPE, and llvm::CallingConv::Win64.
Referenced by findDeadCallerSavedReg(), and getPointerRegClass().
|
override |
Definition at line 116 of file X86RegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::TargetRegisterClass::getSuperClasses(), llvm::X86Subtarget::hasAVX512(), and I.
|
override |
getMatchingSuperRegClass - Return a subclass of the specified register class A so that each register in it has a sub-register of the specified sub-register index which is in the specified register class B.
Definition at line 103 of file X86RegisterInfo.cpp.
Definition at line 534 of file X86RegisterInfo.cpp.
|
override |
Return the number of registers for the function.
Definition at line 646 of file X86RegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget().
|
override |
getPointerRegClass - Returns a TargetRegisterClass used for pointer values.
Definition at line 187 of file X86RegisterInfo.cpp.
References getGPRsForTailCall(), llvm::MachineFunction::getSubtarget(), llvm::X86FrameLowering::hasFP(), llvm::X86Subtarget::isTarget64BitLP64(), llvm_unreachable, and llvm::X86FrameLowering::Uses64BitFramePtr.
unsigned X86RegisterInfo::getPtrSizedFrameRegister | ( | const MachineFunction & | MF | ) | const |
Definition at line 1024 of file X86RegisterInfo.cpp.
References getFrameRegister(), llvm::MachineFunction::getSubtarget(), llvm::getX86SubSuperRegister(), and llvm::X86Subtarget::isTarget64BitILP32().
Referenced by llvm::X86TargetLowering::getRegisterByName().
unsigned X86RegisterInfo::getPtrSizedStackRegister | ( | const MachineFunction & | MF | ) | const |
Definition at line 1033 of file X86RegisterInfo.cpp.
References getStackRegister(), llvm::MachineFunction::getSubtarget(), llvm::getX86SubSuperRegister(), and llvm::X86Subtarget::isTarget64BitILP32().
|
override |
Definition at line 1079 of file X86RegisterInfo.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::TargetRegisterClass::contains(), llvm::SmallSet< T, N, C >::count(), llvm::dbgs(), DisableRegAllocNDDHints, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::format_hex(), llvm::TargetRegisterClass::getID(), llvm::X86::getNonNDVariant(), llvm::VirtRegMap::getPhys(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), getTileShape(), llvm::SmallSet< T, N, C >::insert(), llvm::is_contained(), llvm::Register::isPhysicalRegister(), LLVM_DEBUG, Matrix, MI, MRI, llvm::MCRegister::NoRegister, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and TRI.
|
override |
Definition at line 268 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterClass::getID(), and llvm::X86FrameLowering::hasFP().
|
override |
getReservedRegs - Returns a bitset indexed by physical register number indicating if a register is a special register that has particular uses and should be considered unavailable at all times, e.g.
SP, RA. This is used by register scavenger to determine what registers are free.
Definition at line 542 of file X86RegisterInfo.cpp.
References assert(), CC, llvm::MachineOperand::clobbersPhysReg(), getBaseRegister(), llvm::Function::getCallingConv(), getCallPreservedMask(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::getX86SubSuperRegister(), llvm::CallingConv::GRAAL, llvm::X86Subtarget::hasAVX512(), hasBasePointer(), llvm::X86FrameLowering::hasFP(), llvm::MCRegAliasIterator::isValid(), llvm::report_fatal_error(), llvm::Reserved, and SubReg.
int X86RegisterInfo::getSEHRegNum | ( | unsigned | i | ) | const |
Definition at line 86 of file X86RegisterInfo.cpp.
|
inline |
Definition at line 173 of file X86RegisterInfo.h.
Referenced by llvm::X86AsmPrinter::emitInstruction(), llvm::X86FrameLowering::getInitialCFAOffset(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::X86MachineFunctionInfo::setRestoreBasePointer(), and llvm::X86FrameLowering::X86FrameLowering().
|
inline |
Definition at line 165 of file X86RegisterInfo.h.
Referenced by llvm::X86FrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReferenceSP(), getPtrSizedStackRegister(), llvm::X86FrameLowering::getWin64EHFrameIndexRef(), llvm::X86FrameLowering::X86FrameLowering(), and llvm::X86TargetLowering::X86TargetLowering().
|
override |
Definition at line 91 of file X86RegisterInfo.cpp.
References Idx.
bool X86RegisterInfo::hasBasePointer | ( | const MachineFunction & | MF | ) | const |
Definition at line 760 of file X86RegisterInfo.cpp.
References CantUseSP(), EnableBasePointer, llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::X86MachineFunctionInfo::getStackPtrSaveMI(), and llvm::X86MachineFunctionInfo::hasPreallocatedCall().
Referenced by llvm::X86FrameLowering::canSimplifyCallFramePseudos(), llvm::X86FrameLowering::determineCalleeSaves(), llvm::X86FrameLowering::emitPrologue(), llvm::X86FrameLowering::getFrameIndexReference(), getReservedRegs(), and llvm::X86FrameLowering::spillFPBP().
|
override |
isArgumentReg - Returns true if Reg can be used as an argument to a function.
Definition at line 676 of file X86RegisterInfo.cpp.
References llvm::any_of(), CC, llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), TRI, llvm::CallingConv::Win64, and llvm::CallingConv::X86_64_SysV.
|
override |
Returns true if PhysReg is a fixed register.
Definition at line 715 of file X86RegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::X86FrameLowering::hasFP(), and TRI.
bool X86RegisterInfo::isTileRegisterClass | ( | const TargetRegisterClass * | RC | ) | const |
Return true if it is tile register class.
Definition at line 732 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterClass::getID().
|
override |
Definition at line 803 of file X86RegisterInfo.cpp.
References llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::TargetRegisterInfo::shouldRealignStack(), and llvm::CallingConv::X86_INTR.
|
override |
Definition at line 227 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterClass::hasSuperClassEq(), and llvm::TargetRegisterInfo::shouldRewriteCopySrc().