LLVM 20.0.0git
|
#include "Target/X86/X86RegisterInfo.h"
Definition at line 26 of file X86RegisterInfo.h.
Definition at line 57 of file X86RegisterInfo.cpp.
References llvm::X86_MC::initLLVMToSEHAndCVRegMapping().
|
override |
Definition at line 743 of file X86RegisterInfo.cpp.
References assert().
|
override |
Definition at line 791 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 857 of file X86RegisterInfo.cpp.
References assert(), llvm::MachineOperand::ChangeToImmediate(), II, MI, and llvm::Offset.
|
override |
Definition at line 897 of file X86RegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), assert(), llvm::RegScavenger::backward(), llvm::BuildMI(), llvm::MachineOperand::ChangeToImmediate(), contains(), DL, llvm::MachineBasicBlock::end(), llvm::RegScavenger::enterBasicBlockEnd(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::StackOffset::getFixed(), llvm::X86FrameLowering::getFrameIndexReference(), llvm::X86FrameLowering::getFrameIndexReferenceSP(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), llvm::X86FrameLowering::getWin64EHFrameIndexRef(), llvm::getX86SubSuperRegister(), II, llvm::X86FrameLowering::Is64Bit, llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::MachineFrameInfo::isFixedObjectIndex(), isFuncletReturnInstr(), MBB, MBBI, MI, llvm::Offset, llvm::RegScavenger::scavengeRegisterBackwards(), llvm::RegScavenger::setRegUsed(), TII, 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 155 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 1001 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 168 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 291 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 420 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 430 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.
|
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 260 of file X86RegisterInfo.cpp.
Definition at line 541 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 173 of file X86RegisterInfo.h.
Referenced by llvm::X86FrameLowering::getFrameIndexReference().
|
override |
Definition at line 1049 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 246 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 119 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 106 of file X86RegisterInfo.cpp.
Definition at line 537 of file X86RegisterInfo.cpp.
|
override |
Return the number of registers for the function.
Definition at line 653 of file X86RegisterInfo.cpp.
References llvm::MachineFunction::getSubtarget().
|
override |
getPointerRegClass - Returns a TargetRegisterClass used for pointer values.
Definition at line 190 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 1055 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 1064 of file X86RegisterInfo.cpp.
References getStackRegister(), llvm::MachineFunction::getSubtarget(), llvm::getX86SubSuperRegister(), and llvm::X86Subtarget::isTarget64BitILP32().
|
override |
Definition at line 1110 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 271 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 545 of file X86RegisterInfo.cpp.
References assert(), getBaseRegister(), llvm::X86MachineFunctionInfo::getBPClobberedByInvoke(), llvm::Function::getCallingConv(), llvm::MachineFunction::getContext(), llvm::X86MachineFunctionInfo::getFPClobberedByInvoke(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getSubtarget(), llvm::getX86SubSuperRegister(), llvm::CallingConv::GRAAL, llvm::X86Subtarget::hasAVX512(), hasBasePointer(), llvm::X86FrameLowering::hasFP(), llvm::MCRegAliasIterator::isValid(), llvm::MCContext::reportError(), llvm::Reserved, and SubReg.
int X86RegisterInfo::getSEHRegNum | ( | unsigned | i | ) | const |
Definition at line 89 of file X86RegisterInfo.cpp.
|
inline |
Definition at line 175 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 167 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 94 of file X86RegisterInfo.cpp.
References Idx.
bool X86RegisterInfo::hasBasePointer | ( | const MachineFunction & | MF | ) | const |
Definition at line 767 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 683 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 722 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 739 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterClass::getID().
|
inlineoverride |
Definition at line 182 of file X86RegisterInfo.h.
References llvm::MachineFrameInfo::estimateStackSize(), and llvm::MachineFunction::getFrameInfo().
|
override |
Definition at line 810 of file X86RegisterInfo.cpp.
References llvm::Function::getCallingConv(), llvm::MachineFunction::getFunction(), llvm::TargetRegisterInfo::shouldRealignStack(), and llvm::CallingConv::X86_INTR.
|
override |
Definition at line 230 of file X86RegisterInfo.cpp.
References llvm::TargetRegisterClass::hasSuperClassEq(), and llvm::TargetRegisterInfo::shouldRewriteCopySrc().