LLVM 22.0.0git
SIRegisterInfo.cpp File Reference

SI implementation of the TargetRegisterInfo class. More...

Go to the source code of this file.

Classes

struct  llvm::SGPRSpillBuilder
struct  llvm::SGPRSpillBuilder::PerVGPRData

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define GET_REGINFO_TARGET_DESC

Functions

static void emitUnsupportedError (const Function &Fn, const MachineInstr &MI, const Twine &ErrMsg)
static bool isFIPlusImmOrVGPR (const SIRegisterInfo &TRI, const MachineInstr &MI)
static unsigned getNumSubRegsForSpillOp (const MachineInstr &MI, const SIInstrInfo *TII)
static int getOffsetMUBUFStore (unsigned Opc)
static int getOffsetMUBUFLoad (unsigned Opc)
static int getOffenMUBUFStore (unsigned Opc)
static int getOffenMUBUFLoad (unsigned Opc)
static MachineInstrBuilder spillVGPRtoAGPR (const GCNSubtarget &ST, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, int Index, unsigned Lane, unsigned ValueReg, bool IsKill)
static bool buildMUBUFOffsetLoadStore (const GCNSubtarget &ST, MachineFrameInfo &MFI, MachineBasicBlock::iterator MI, int Index, int64_t Offset)
static unsigned getFlatScratchSpillOpcode (const SIInstrInfo *TII, unsigned LoadStoreOp, unsigned EltSize)
static const TargetRegisterClassgetAnyVGPRClassForBitWidth (unsigned BitWidth)
static const TargetRegisterClassgetAlignedVGPRClassForBitWidth (unsigned BitWidth)
static const TargetRegisterClassgetAnyAGPRClassForBitWidth (unsigned BitWidth)
static const TargetRegisterClassgetAlignedAGPRClassForBitWidth (unsigned BitWidth)
static const TargetRegisterClassgetAnyVectorSuperClassForBitWidth (unsigned BitWidth)
static const TargetRegisterClassgetAlignedVectorSuperClassForBitWidth (unsigned BitWidth)

Variables

static cl::opt< boolEnableSpillSGPRToVGPR ("amdgpu-spill-sgpr-to-vgpr", cl::desc("Enable spilling SGPRs to VGPRs"), cl::ReallyHidden, cl::init(true))
static const std::array< unsigned, 17 > SubRegFromChannelTableWidthMap

Detailed Description

SI implementation of the TargetRegisterInfo class.

Definition in file SIRegisterInfo.cpp.

Macro Definition Documentation

◆ GET_REGINFO_TARGET_DESC

#define GET_REGINFO_TARGET_DESC

Definition at line 29 of file SIRegisterInfo.cpp.

Function Documentation

◆ buildMUBUFOffsetLoadStore()

◆ emitUnsupportedError()

void emitUnsupportedError ( const Function & Fn,
const MachineInstr & MI,
const Twine & ErrMsg )
static

◆ getAlignedAGPRClassForBitWidth()

const TargetRegisterClass * getAlignedAGPRClassForBitWidth ( unsigned BitWidth)
static

◆ getAlignedVectorSuperClassForBitWidth()

const TargetRegisterClass * getAlignedVectorSuperClassForBitWidth ( unsigned BitWidth)
static

◆ getAlignedVGPRClassForBitWidth()

const TargetRegisterClass * getAlignedVGPRClassForBitWidth ( unsigned BitWidth)
static

◆ getAnyAGPRClassForBitWidth()

const TargetRegisterClass * getAnyAGPRClassForBitWidth ( unsigned BitWidth)
static

Definition at line 3395 of file SIRegisterInfo.cpp.

References llvm::BitWidth.

Referenced by llvm::SIRegisterInfo::getAGPRClassForBitWidth().

◆ getAnyVectorSuperClassForBitWidth()

const TargetRegisterClass * getAnyVectorSuperClassForBitWidth ( unsigned BitWidth)
static

Definition at line 3469 of file SIRegisterInfo.cpp.

References llvm::BitWidth.

Referenced by llvm::SIRegisterInfo::getVectorSuperClassForBitWidth().

◆ getAnyVGPRClassForBitWidth()

const TargetRegisterClass * getAnyVGPRClassForBitWidth ( unsigned BitWidth)
static

Definition at line 3285 of file SIRegisterInfo.cpp.

References llvm::BitWidth.

Referenced by llvm::SIRegisterInfo::getVGPRClassForBitWidth().

◆ getFlatScratchSpillOpcode()

◆ getNumSubRegsForSpillOp()

unsigned getNumSubRegsForSpillOp ( const MachineInstr & MI,
const SIInstrInfo * TII )
static

Definition at line 1129 of file SIRegisterInfo.cpp.

References llvm_unreachable, MI, llvm::popcount(), and TII.

Referenced by llvm::SIRegisterInfo::eliminateFrameIndex().

◆ getOffenMUBUFLoad()

int getOffenMUBUFLoad ( unsigned Opc)
static

Definition at line 1358 of file SIRegisterInfo.cpp.

References Opc.

Referenced by llvm::SIRegisterInfo::buildSpillLoadStore().

◆ getOffenMUBUFStore()

int getOffenMUBUFStore ( unsigned Opc)
static

Definition at line 1335 of file SIRegisterInfo.cpp.

References Opc.

Referenced by llvm::SIRegisterInfo::buildSpillLoadStore().

◆ getOffsetMUBUFLoad()

int getOffsetMUBUFLoad ( unsigned Opc)
static

Definition at line 1300 of file SIRegisterInfo.cpp.

References Opc.

Referenced by buildMUBUFOffsetLoadStore().

◆ getOffsetMUBUFStore()

int getOffsetMUBUFStore ( unsigned Opc)
static

Definition at line 1277 of file SIRegisterInfo.cpp.

References Opc.

Referenced by buildMUBUFOffsetLoadStore().

◆ isFIPlusImmOrVGPR()

◆ spillVGPRtoAGPR()

Variable Documentation

◆ EnableSpillSGPRToVGPR

cl::opt< bool > EnableSpillSGPRToVGPR("amdgpu-spill-sgpr-to-vgpr", cl::desc("Enable spilling SGPRs to VGPRs"), cl::ReallyHidden, cl::init(true)) ( "amdgpu-spill-sgpr-to-vgpr" ,
cl::desc("Enable spilling SGPRs to VGPRs") ,
cl::ReallyHidden ,
cl::init(true)  )
static

◆ SubRegFromChannelTableWidthMap

const std::array<unsigned, 17> SubRegFromChannelTableWidthMap
static
Initial value:
= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 9}

Definition at line 45 of file SIRegisterInfo.cpp.

Referenced by llvm::SIRegisterInfo::getSubRegFromChannel(), and llvm::SIRegisterInfo::SIRegisterInfo().