LLVM: llvm::SIRegisterInfo Class Reference (original) (raw)

#include "[Target/AMDGPU/SIRegisterInfo.h](SIRegisterInfo%5F8h%5Fsource.html)"

Public Member Functions
SIRegisterInfo (const GCNSubtarget &ST)
bool spillSGPRToVGPR () const
MCRegister getAlignedHighSGPRForRC (const MachineFunction &MF, const unsigned Align, const TargetRegisterClass *RC) const
Return the largest available SGPR aligned to Align for the register class RC.
MCRegister reservedPrivateSegmentBufferReg (const MachineFunction &MF) const
Return the end register initially reserved for the scratch buffer in case spilling is needed.
BitVector getReservedRegs (const MachineFunction &MF) const override
bool isAsmClobberable (const MachineFunction &MF, MCRegister PhysReg) const override
const MCPhysReg * getCalleeSavedRegs (const MachineFunction *MF) const override
const MCPhysReg * getCalleeSavedRegsViaCopy (const MachineFunction *MF) const
const uint32_t * getCallPreservedMask (const MachineFunction &MF, CallingConv::ID) const override
const uint32_t * getNoPreservedMask () const override
unsigned getCSRFirstUseCost () const override
void addImplicitUsesForBlockCSRLoad (MachineInstrBuilder &MIB, Register BlockReg) const
const TargetRegisterClass * getLargestLegalSuperClass (const TargetRegisterClass *RC, const MachineFunction &MF) const override
Register getFrameRegister (const MachineFunction &MF) const override
bool hasBasePointer (const MachineFunction &MF) const
Register getBaseRegister () const
bool shouldRealignStack (const MachineFunction &MF) const override
bool requiresRegisterScavenging (const MachineFunction &Fn) const override
bool requiresFrameIndexScavenging (const MachineFunction &MF) const override
bool requiresFrameIndexReplacementScavenging (const MachineFunction &MF) const override
bool requiresVirtualBaseRegisters (const MachineFunction &Fn) const override
int64_t getScratchInstrOffset (const MachineInstr *MI) const
int64_t getFrameIndexInstrOffset (const MachineInstr *MI, int Idx) const override
bool needsFrameBaseReg (MachineInstr *MI, int64_t Offset) const override
Register materializeFrameBaseRegister (MachineBasicBlock *MBB, int FrameIdx, int64_t Offset) const override
void resolveFrameIndex (MachineInstr &MI, Register BaseReg, int64_t Offset) const override
bool isFrameOffsetLegal (const MachineInstr *MI, Register BaseReg, int64_t Offset) const override
const TargetRegisterClass * getPointerRegClass (unsigned Kind=0) const override
const TargetRegisterClass * getCrossCopyRegClass (const TargetRegisterClass *RC) const override
Returns a legal register class to copy a register in the specified class to or from.
const TargetRegisterClass * getRegClassForBlockOp (const MachineFunction &MF) const
void buildVGPRSpillLoadStore (SGPRSpillBuilder &SB, int Index, int Offset, bool IsLoad, bool IsKill=true) const
bool spillSGPR (MachineBasicBlock::iterator MI, int FI, RegScavenger *RS, SlotIndexes *Indexes=nullptr, LiveIntervals *LIS=nullptr, bool OnlyToVGPR=false, bool SpillToPhysVGPRLane=false) const
If OnlyToVGPR is true, this will only succeed if this manages to find a free VGPR lane to spill.
bool restoreSGPR (MachineBasicBlock::iterator MI, int FI, RegScavenger *RS, SlotIndexes *Indexes=nullptr, LiveIntervals *LIS=nullptr, bool OnlyToVGPR=false, bool SpillToPhysVGPRLane=false) const
bool spillEmergencySGPR (MachineBasicBlock::iterator MI, MachineBasicBlock &RestoreMBB, Register SGPR, RegScavenger *RS) const
bool eliminateFrameIndex (MachineBasicBlock::iterator MI, int SPAdj, unsigned FIOperandNum, RegScavenger *RS) const override
bool eliminateSGPRToVGPRSpillFrameIndex (MachineBasicBlock::iterator MI, int FI, RegScavenger *RS, SlotIndexes *Indexes=nullptr, LiveIntervals *LIS=nullptr, bool SpillToPhysVGPRLane=false) const
Special case of eliminateFrameIndex.
StringRef getRegAsmName (MCRegister Reg) const override
unsigned getHWRegIndex (MCRegister Reg) const
LLVM_READONLY const TargetRegisterClass * getVGPRClassForBitWidth (unsigned BitWidth) const
LLVM_READONLY const TargetRegisterClass * getAlignedLo256VGPRClassForBitWidth (unsigned BitWidth) const
LLVM_READONLY const TargetRegisterClass * getAGPRClassForBitWidth (unsigned BitWidth) const
LLVM_READONLY const TargetRegisterClass * getVectorSuperClassForBitWidth (unsigned BitWidth) const
LLVM_READONLY const TargetRegisterClass * getDefaultVectorSuperClassForBitWidth (unsigned BitWidth) const
bool isSGPRClassID (unsigned RCID) const
bool isSGPRReg (const MachineRegisterInfo &MRI, Register Reg) const
bool isSGPRPhysReg (Register Reg) const
bool isVGPRPhysReg (Register Reg) const
bool isVectorSuperClass (const TargetRegisterClass *RC) const
bool isVSSuperClass (const TargetRegisterClass *RC) const
const TargetRegisterClass * getEquivalentVGPRClass (const TargetRegisterClass *SRC) const
const TargetRegisterClass * getEquivalentAGPRClass (const TargetRegisterClass *SRC) const
const TargetRegisterClass * getEquivalentAVClass (const TargetRegisterClass *SRC) const
const TargetRegisterClass * getEquivalentSGPRClass (const TargetRegisterClass *VRC) const
const TargetRegisterClass * getCompatibleSubRegClass (const TargetRegisterClass *SuperRC, const TargetRegisterClass *SubRC, unsigned SubIdx) const
Returns a register class which is compatible with SuperRC, such that a subregister exists with class SubRC with subregister index SubIdx.
bool opCanUseLiteralConstant (unsigned OpType) const
bool opCanUseInlineConstant (unsigned OpType) const
MCRegister findUnusedRegister (const MachineRegisterInfo &MRI, const TargetRegisterClass *RC, const MachineFunction &MF, bool ReserveHighestVGPR=false) const
Returns a lowest register that is not used at any point in the function.
const TargetRegisterClass * getRegClassForReg (const MachineRegisterInfo &MRI, Register Reg) const
const TargetRegisterClass * getRegClassForOperandReg (const MachineRegisterInfo &MRI, const MachineOperand &MO) const
bool isVGPR (const MachineRegisterInfo &MRI, Register Reg) const
bool isAGPR (const MachineRegisterInfo &MRI, Register Reg) const
bool isVectorRegister (const MachineRegisterInfo &MRI, Register Reg) const
bool isDivergentRegClass (const TargetRegisterClass *RC) const override
bool isUniformReg (const MachineRegisterInfo &MRI, const RegisterBankInfo &RBI, Register Reg) const override
ArrayRef< int16_t > getRegSplitParts (const TargetRegisterClass *RC, unsigned EltSize) const
unsigned getRegPressureLimit (const TargetRegisterClass *RC, MachineFunction &MF) const override
unsigned getRegPressureSetLimit (const MachineFunction &MF, unsigned Idx) const override
bool getRegAllocationHints (Register VirtReg, ArrayRef< MCPhysReg > Order, SmallVectorImpl< MCPhysReg > &Hints, const MachineFunction &MF, const VirtRegMap *VRM, const LiveRegMatrix *Matrix) const override
const int * getRegUnitPressureSets (MCRegUnit RegUnit) const override
MCRegister getReturnAddressReg (const MachineFunction &MF) const
const TargetRegisterClass * getRegClassForSizeOnBank (unsigned Size, const RegisterBank &Bank) const
const TargetRegisterClass * getRegClassForTypeOnBank (LLT Ty, const RegisterBank &Bank) const
const TargetRegisterClass * getConstrainedRegClassForOperand (const MachineOperand &MO, const MachineRegisterInfo &MRI) const override
const TargetRegisterClass * getBoolRC () const
const TargetRegisterClass * getWaveMaskRegClass () const
const TargetRegisterClass * getVGPR64Class () const
MCRegister getVCC () const
MCRegister getExec () const
MachineInstr * findReachingDef (Register Reg, unsigned SubReg, MachineInstr &Use, MachineRegisterInfo &MRI, LiveIntervals *LIS) const
const uint32_t * getAllVGPRRegMask () const
const uint32_t * getAllAGPRRegMask () const
const uint32_t * getAllVectorRegMask () const
const uint32_t * getAllAllocatableSRegMask () const
unsigned getChannelFromSubReg (unsigned SubReg) const
unsigned getNumChannelsFromSubReg (unsigned SubReg) const
MCPhysReg get32BitRegister (MCPhysReg Reg) const
bool isProperlyAlignedRC (const TargetRegisterClass &RC) const
ArrayRef< MCPhysReg > getAllSGPR128 (const MachineFunction &MF) const
Return all SGPR128 which satisfy the waves per execution unit requirement of the subtarget.
ArrayRef< MCPhysReg > getAllSGPR64 (const MachineFunction &MF) const
Return all SGPR64 which satisfy the waves per execution unit requirement of the subtarget.
ArrayRef< MCPhysReg > getAllSGPR32 (const MachineFunction &MF) const
Return all SGPR32 which satisfy the waves per execution unit requirement of the subtarget.
void buildSpillLoadStore (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, unsigned LoadStoreOp, int Index, Register ValueReg, bool ValueIsKill, MCRegister ScratchOffsetReg, int64_t InstrOffset, MachineMemOperand *MMO, RegScavenger *RS, LiveRegUnits *LiveUnits=nullptr) const
unsigned getRegClassAlignmentNumBits (const TargetRegisterClass *RC) const
bool isRegClassAligned (const TargetRegisterClass *RC, unsigned AlignNumBits) const
unsigned getSubRegAlignmentNumBits (const TargetRegisterClass *RC, unsigned SubReg) const
unsigned getNumUsedPhysRegs (const MachineRegisterInfo &MRI, const TargetRegisterClass &RC, bool IncludeCalls=true) const
std::optional< uint8_t > getVRegFlagValue (StringRef Name) const override
SmallVector< StringLiteral > getVRegFlagsOfReg (Register Reg, const MachineFunction &MF) const override
float getSpillWeightScaleFactor (const TargetRegisterClass *RC) const override
Static Public Member Functions
static unsigned getSubRegFromChannel (unsigned Channel, unsigned NumRegs=1)
static bool isChainScratchRegister (Register VGPR)
static LLVM_READONLY const TargetRegisterClass * getSGPRClassForBitWidth (unsigned BitWidth)
static bool isSGPRClass (const TargetRegisterClass *RC)
static bool isVGPRClass (const TargetRegisterClass *RC)
static bool isAGPRClass (const TargetRegisterClass *RC)
static bool hasVGPRs (const TargetRegisterClass *RC)
static bool hasAGPRs (const TargetRegisterClass *RC)
static bool hasSGPRs (const TargetRegisterClass *RC)
static bool hasVectorRegisters (const TargetRegisterClass *RC)
static unsigned getNumCoveredRegs (LaneBitmask LM)

Definition at line 40 of file SIRegisterInfo.h.

addImplicitUsesForBlockCSRLoad()

buildSpillLoadStore()

void SIRegisterInfo::buildSpillLoadStore ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator MI,
const DebugLoc & DL,
unsigned LoadStoreOp,
int Index,
Register ValueReg,
bool ValueIsKill,
MCRegister ScratchOffsetReg,
int64_t InstrOffset,
MachineMemOperand * MMO,
RegScavenger * RS,
LiveRegUnits * LiveUnits = nullptr ) const

Definition at line 1512 of file SIRegisterInfo.cpp.

References llvm::Add, llvm::MachineInstrBuilder::addImm(), addImplicitUsesForBlockCSRLoad(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::LiveRegUnits::available(), llvm::BuildMI(), llvm::commonAlignment(), llvm::RegState::Define, DL, llvm::SIInstrFlags::FlatScratch, llvm::getDefRegState(), llvm::MachineMemOperand::getFlags(), llvm::AMDGPU::getFlatScratchInstSTfromSS(), llvm::AMDGPU::getFlatScratchInstSVfromSS(), getFlatScratchSpillOpcode(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::getKillRegState(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectOffset(), getOffenMUBUFLoad(), getOffenMUBUFStore(), llvm::MachineMemOperand::getPointerInfo(), llvm::AMDGPU::getRegBitWidth(), getRegClassForReg(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), getSubRegFromChannel(), llvm::SIMachineFunctionInfo::getVGPRForAGPRCopy(), llvm::MachinePointerInfo::getWithOffset(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, isAGPRClass(), llvm::AMDGPUMachineFunction::isBottomOfStack(), llvm::MachineRegisterInfo::isReserved(), llvm::RegState::Kill, MBB, MI, llvm::MOLastUse, llvm::Offset, Opc, llvm::AMDGPUAS::PRIVATE_ADDRESS, Register, llvm::MachineInstr::ReloadReuse, llvm::report_fatal_error(), llvm::MachineInstr::setAsmPrinterFlag(), Size, spillVGPRtoAGPR(), llvm::Sub, SubReg, llvm::AMDGPU::CPol::TH_LU, and TII.

Referenced by buildVGPRSpillLoadStore(), and eliminateFrameIndex().

buildVGPRSpillLoadStore()

void SIRegisterInfo::buildVGPRSpillLoadStore ( SGPRSpillBuilder & SB,
int Index,
int Offset,
bool IsLoad,
bool IsKill = true ) const

Definition at line 1964 of file SIRegisterInfo.cpp.

References llvm::SIMachineFunctionInfo::addToSpilledVGPRs(), assert(), buildSpillLoadStore(), llvm::SGPRSpillBuilder::DL, llvm::SGPRSpillBuilder::EltSize, getBaseRegister(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), getFrameRegister(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getStackID(), hasBasePointer(), llvm::MachineFrameInfo::isFixedObjectIndex(), llvm::SGPRSpillBuilder::MBB, llvm::SGPRSpillBuilder::MF, llvm::SGPRSpillBuilder::MFI, llvm::SGPRSpillBuilder::MI, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOStore, llvm::Offset, Opc, llvm::SGPRSpillBuilder::RS, llvm::TargetStackID::SGPRSpill, and llvm::SGPRSpillBuilder::TmpVGPR.

eliminateFrameIndex()

Definition at line 2321 of file SIRegisterInfo.cpp.

References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::Add, llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::SIMachineFunctionInfo::addToSpilledVGPRs(), assert(), llvm::BuildMI(), buildMUBUFOffsetLoadStore(), buildSpillLoadStore(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), DL, llvm::SIInstrFlags::FlatScratch, getBaseRegister(), llvm::AMDGPU::getFlatScratchInstSTfromSS(), llvm::AMDGPU::getFlatScratchInstSVfromSVS(), llvm::MachineFunction::getFrameInfo(), getFrameRegister(), llvm::MachineOperand::getImm(), llvm::MachineFunction::getInfo(), getNumSubRegsForSpillOp(), llvm::MachineInstr::getOpcode(), llvm::DstOp::getReg(), llvm::MachineInstrBuilder::getReg(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), llvm::SIMachineFunctionInfo::getSGPRForEXECCopy(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), hasBasePointer(), llvm::AMDGPU::hasNamedOperand(), I, llvm::AMDGPUMachineFunction::isBottomOfStack(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), llvm::AMDGPU::isInlinableIntLiteral(), llvm::AMDGPU::isInlinableLiteral32(), llvm::MachineOperand::isKill(), llvm::Register::isPhysical(), llvm::MachineOperand::isReg(), llvm::MachineRegisterInfo::isReserved(), isSGPRClass(), llvm::isUInt(), llvm::MachineOperand::isUndef(), llvm::Register::isValid(), isVGPRClass(), llvm::SIInstrInfo::isVOP3(), llvm::RegState::Kill, MBB, MI, llvm::Offset, Opc, llvm::AMDGPUAS::PRIVATE_ADDRESS, llvm::RegState::Renamable, llvm::report_fatal_error(), restoreSGPR(), llvm::MachineOperand::setImm(), llvm::MachineOperand::setIsKill(), llvm::MachineOperand::setIsRenamable(), llvm::MachineInstrBuilder::setOperandDead(), llvm::MachineOperand::setReg(), spillSGPR(), std::swap(), and TII.

eliminateSGPRToVGPRSpillFrameIndex()

findReachingDef()

Definition at line 3919 of file SIRegisterInfo.cpp.

References assert(), llvm::LiveIntervals::getDomTree(), llvm::LiveIntervals::getInstructionFromIndex(), llvm::LiveIntervals::getInstructionIndex(), llvm::LiveIntervals::getInterval(), llvm::LiveIntervals::getRegUnit(), llvm::LiveRange::getVNInfoAt(), llvm::LiveIntervals::hasInterval(), llvm::LiveInterval::hasSubRanges(), llvm::SlotIndex::isValid(), MRI, llvm::LiveInterval::subranges(), and SubReg.

findUnusedRegister()

Returns a lowest register that is not used at any point in the function.

If all registers are used, then this function will return AMDGPU::NoRegister. If ReserveHighestRegister = true, then return highest unused register.

Definition at line 3690 of file SIRegisterInfo.cpp.

References MRI, and llvm::reverse().

get32BitRegister()

getAGPRClassForBitWidth()

getAlignedHighSGPRForRC()

getAlignedLo256VGPRClassForBitWidth()

getAllAGPRRegMask()

getAllAllocatableSRegMask()

const uint32_t * SIRegisterInfo::getAllAllocatableSRegMask ( ) const

getAllSGPR128()

getAllSGPR32()

getAllSGPR64()

getAllVectorRegMask()

getAllVGPRRegMask()

getBaseRegister()

Register SIRegisterInfo::getBaseRegister ( ) const

getBoolRC()

getCalleeSavedRegs()

getCalleeSavedRegsViaCopy()

getCallPreservedMask()

getChannelFromSubReg()

unsigned llvm::SIRegisterInfo::getChannelFromSubReg ( unsigned SubReg) const inline

getCompatibleSubRegClass()

Returns a register class which is compatible with SuperRC, such that a subregister exists with class SubRC with subregister index SubIdx.

If this is impossible (e.g., an unaligned subregister index within a register tuple), return null.

Definition at line 3662 of file SIRegisterInfo.cpp.

References llvm::TargetRegisterClass::hasSubClassEq().

getConstrainedRegClassForOperand()

getCrossCopyRegClass()

Returns a legal register class to copy a register in the specified class to or from.

If it is possible to copy the register directly without using a cross register class copy, return the specified RC. Returns NULL if it is not possible to copy between two registers of the specified class.

Definition at line 1123 of file SIRegisterInfo.cpp.

getCSRFirstUseCost()

unsigned llvm::SIRegisterInfo::getCSRFirstUseCost ( ) const inlineoverride

getDefaultVectorSuperClassForBitWidth()

getEquivalentAGPRClass()

getEquivalentAVClass()

getEquivalentSGPRClass()

getEquivalentVGPRClass()

getExec()

getFrameIndexInstrOffset()

int64_t SIRegisterInfo::getFrameIndexInstrOffset ( const MachineInstr * MI, int Idx ) const override

getFrameRegister()

getHWRegIndex()

getLargestLegalSuperClass()

getNoPreservedMask()

const uint32_t * SIRegisterInfo::getNoPreservedMask ( ) const override

getNumChannelsFromSubReg()

unsigned llvm::SIRegisterInfo::getNumChannelsFromSubReg ( unsigned SubReg) const inline

getNumCoveredRegs()

getNumUsedPhysRegs()

getPointerRegClass()

getRegAllocationHints()

Definition at line 3800 of file SIRegisterInfo.cpp.

References assert(), contains(), llvm::VirtRegMap::getPhys(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::MachineFunction::getRegInfo(), llvm::VirtRegMap::hasPhys(), llvm::AMDGPU::isHi16Reg(), llvm::Register::isPhysical(), Matrix, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SIRegisterInfo(), llvm::AMDGPURI::Size16, llvm::AMDGPURI::Size32, and TRI.

getRegAsmName()

getRegClassAlignmentNumBits()

getRegClassForBlockOp()

getRegClassForOperandReg()

getRegClassForReg()

getRegClassForSizeOnBank()

getRegClassForTypeOnBank()

getRegPressureLimit()

getRegPressureSetLimit()

getRegSplitParts()

getRegUnitPressureSets()

const int * SIRegisterInfo::getRegUnitPressureSets ( MCRegUnit RegUnit) const override

getReservedRegs()

Definition at line 578 of file SIRegisterInfo.cpp.

References assert(), llvm::divideCeil(), llvm::BitVector::empty(), llvm::SIMachineFunctionInfo::getAGPRSpillVGPRs(), getBaseRegister(), llvm::SIMachineFunctionInfo::getFrameOffsetReg(), llvm::MachineFunction::getFunction(), getHWRegIndex(), llvm::MachineFunction::getInfo(), llvm::SIMachineFunctionInfo::getLongBranchReservedReg(), llvm::SIMachineFunctionInfo::getNonWWMRegMask(), llvm::SIMachineFunctionInfo::getScratchRSrcReg(), llvm::SIMachineFunctionInfo::getSGPRForEXECCopy(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), llvm::SIMachineFunctionInfo::getVGPRForAGPRCopy(), llvm::SIMachineFunctionInfo::getVGPRSpillAGPRs(), llvm::SIMachineFunctionInfo::getWWMReservedRegs(), hasBasePointer(), isAGPRClass(), isSGPRClass(), isVGPRClass(), llvm::Reserved, and llvm::BitVector::test().

getReturnAddressReg()

getScratchInstrOffset()

getSGPRClassForBitWidth()

getSpillWeightScaleFactor()

getSubRegAlignmentNumBits()

getSubRegFromChannel()

getVCC()

getVectorSuperClassForBitWidth()

getVGPR64Class()

getVGPRClassForBitWidth()

getVRegFlagsOfReg()

getVRegFlagValue()

std::optional< uint8_t > llvm::SIRegisterInfo::getVRegFlagValue ( StringRef Name) const inlineoverride

getWaveMaskRegClass()

hasAGPRs()

hasBasePointer()

hasSGPRs()

hasVectorRegisters()

hasVGPRs()

isAGPR()

isAGPRClass()

isAsmClobberable()

isChainScratchRegister()

bool SIRegisterInfo::isChainScratchRegister ( Register VGPR) static

isDivergentRegClass()

isFrameOffsetLegal()

isProperlyAlignedRC()

isRegClassAligned()

isSGPRClass()

Returns

true if this class contains only SGPR registers

Definition at line 226 of file SIRegisterInfo.h.

References hasAGPRs(), hasSGPRs(), and hasVGPRs().

Referenced by eliminateFrameIndex(), llvm::SITargetLowering::getRegForInlineAsmConstraint(), getReservedRegs(), isDivergentRegClass(), llvm::GCNRPTarget::isSaveBeneficial(), isSGPRClassID(), isSGPRPhysReg(), isSGPRReg(), and llvm::SITargetLowering::requiresUniformRegister().

isSGPRClassID()

bool llvm::SIRegisterInfo::isSGPRClassID ( unsigned RCID) const inline

isSGPRPhysReg()

bool llvm::SIRegisterInfo::isSGPRPhysReg ( Register Reg) const inline

isSGPRReg()

isUniformReg()

isVectorRegister()

isVectorSuperClass()

isVGPR()

isVGPRClass()

isVGPRPhysReg()

bool llvm::SIRegisterInfo::isVGPRPhysReg ( Register Reg) const inline

isVSSuperClass()

materializeFrameBaseRegister()

Register SIRegisterInfo::materializeFrameBaseRegister ( MachineBasicBlock * MBB, int FrameIdx, int64_t Offset ) const override

Definition at line 905 of file SIRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::MachineFunction::getRegInfo(), llvm::RegState::Kill, MBB, MRI, llvm::Offset, llvm::MachineInstrBuilder::setOperandDead(), and TII.

needsFrameBaseReg()

bool SIRegisterInfo::needsFrameBaseReg ( MachineInstr * MI, int64_t Offset ) const override

opCanUseInlineConstant()

bool SIRegisterInfo::opCanUseInlineConstant ( unsigned OpType ) const

Returns

True if operands defined with this operand type can accept an inline constant. i.e. An integer value in the range (-16, 64) or -4.0f, -2.0f, -1.0f, -0.5f, 0.0f, 0.5f, 1.0f, 2.0f, 4.0f.

Definition at line 3671 of file SIRegisterInfo.cpp.

References llvm::AMDGPU::OPERAND_REG_INLINE_AC_FIRST, llvm::AMDGPU::OPERAND_REG_INLINE_AC_LAST, llvm::AMDGPU::OPERAND_SRC_FIRST, and llvm::AMDGPU::OPERAND_SRC_LAST.

opCanUseLiteralConstant()

bool SIRegisterInfo::opCanUseLiteralConstant ( unsigned OpType ) const

requiresFrameIndexReplacementScavenging()

requiresFrameIndexScavenging()

requiresRegisterScavenging()

requiresVirtualBaseRegisters()

reservedPrivateSegmentBufferReg()

resolveFrameIndex()

void SIRegisterInfo::resolveFrameIndex ( MachineInstr & MI, Register BaseReg, int64_t Offset ) const override

Definition at line 958 of file SIRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineOperand::ChangeToRegister(), llvm::SIInstrFlags::FlatScratch, llvm::MachineOperand::getImm(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineOperand::isFI(), llvm::MachineOperand::isImm(), isSGPRReg(), llvm_unreachable, MBB, MI, MRI, llvm::Offset, llvm::AMDGPUAS::PRIVATE_ADDRESS, llvm::MachineOperand::setImm(), std::swap(), and TII.

restoreSGPR()

Definition at line 2128 of file SIRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::SGPRSpillBuilder::DL, llvm::ArrayRef< T >::empty(), llvm::getKillRegState(), llvm::SGPRSpillBuilder::getPerVGPRData(), llvm::SIMachineFunctionInfo::getSGPRSpillToPhysicalVGPRLanes(), llvm::SIMachineFunctionInfo::getSGPRSpillToVirtualVGPRLanes(), llvm::RegState::ImplicitDefine, llvm::SlotIndexes::insertMachineInstrInMaps(), llvm::SGPRSpillBuilder::MBB, llvm::SGPRSpillBuilder::MFI, MI, llvm::SGPRSpillBuilder::NumSubRegs, llvm::Offset, llvm::SGPRSpillBuilder::prepare(), llvm::SGPRSpillBuilder::readWriteTmpVGPR(), Register, llvm::LiveIntervals::removeAllRegUnitsForPhysReg(), llvm::SlotIndexes::replaceMachineInstrInMaps(), llvm::SGPRSpillBuilder::restore(), llvm::SGPRSpillBuilder::SplitParts, SubReg, llvm::SGPRSpillBuilder::SuperReg, llvm::SGPRSpillBuilder::TII, and llvm::SGPRSpillBuilder::TmpVGPR.

Referenced by eliminateFrameIndex(), and eliminateSGPRToVGPRSpillFrameIndex().

shouldRealignStack()

spillEmergencySGPR()

Definition at line 2208 of file SIRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::SIMachineFunctionInfo::addToSpilledSGPRs(), assert(), llvm::BuildMI(), llvm::SGPRSpillBuilder::DL, llvm::MachineBasicBlock::end(), llvm::getKillRegState(), llvm::SGPRSpillBuilder::getPerVGPRData(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::SGPRSpillBuilder::IsKill, llvm::SGPRSpillBuilder::MBB, llvm::SGPRSpillBuilder::MFI, MI, llvm::SGPRSpillBuilder::NumSubRegs, llvm::Offset, llvm::SGPRSpillBuilder::prepare(), Register, llvm::SGPRSpillBuilder::restore(), llvm::SGPRSpillBuilder::setMI(), llvm::SGPRSpillBuilder::SplitParts, SubReg, llvm::SGPRSpillBuilder::SuperReg, llvm::SGPRSpillBuilder::TII, llvm::SGPRSpillBuilder::TmpVGPR, and llvm::RegState::Undef.

spillSGPR()

If OnlyToVGPR is true, this will only succeed if this manages to find a free VGPR lane to spill.

Definition at line 1997 of file SIRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::SIMachineFunctionInfo::addToSpilledSGPRs(), assert(), llvm::BuildMI(), llvm::SGPRSpillBuilder::DL, llvm::ArrayRef< T >::empty(), llvm::SIMachineFunctionInfo::getFrameOffsetReg(), llvm::getKillRegState(), llvm::SGPRSpillBuilder::getPerVGPRData(), llvm::SIMachineFunctionInfo::getSGPRSpillToPhysicalVGPRLanes(), llvm::SIMachineFunctionInfo::getSGPRSpillToVirtualVGPRLanes(), llvm::SIMachineFunctionInfo::getStackPtrOffsetReg(), llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::SlotIndexes::insertMachineInstrInMaps(), llvm::SGPRSpillBuilder::IsKill, llvm::SGPRSpillBuilder::MBB, llvm::SGPRSpillBuilder::MFI, MI, llvm::SGPRSpillBuilder::NumSubRegs, llvm::Offset, llvm::SGPRSpillBuilder::prepare(), llvm::SGPRSpillBuilder::readWriteTmpVGPR(), Register, llvm::LiveIntervals::removeAllRegUnitsForPhysReg(), llvm::SlotIndexes::replaceMachineInstrInMaps(), llvm::SGPRSpillBuilder::restore(), llvm::ArrayRef< T >::size(), llvm::SGPRSpillBuilder::SplitParts, SubReg, llvm::SGPRSpillBuilder::SuperReg, llvm::SGPRSpillBuilder::TII, llvm::SGPRSpillBuilder::TmpVGPR, and llvm::RegState::Undef.

Referenced by eliminateFrameIndex(), and eliminateSGPRToVGPRSpillFrameIndex().

spillSGPRToVGPR()

bool llvm::SIRegisterInfo::spillSGPRToVGPR ( ) const inline

The documentation for this class was generated from the following files: