26#define DEBUG_TYPE "amdgpu-reserve-wwm-regs"
41 return "AMDGPU Reserve WWM Registers";
53 "AMDGPU Reserve WWM Registers",
false,
false)
55char AMDGPUReserveWWMRegs::
ID = 0;
65 unsigned Opc =
MI.getOpcode();
66 if (Opc != AMDGPU::SI_SPILL_S32_TO_VGPR &&
67 Opc != AMDGPU::SI_RESTORE_S32_FROM_VGPR)
71 ?
MI.getOperand(0).getReg()
72 :
MI.getOperand(1).getReg();
75 "All WWM registers should have been allocated by now.");
88 MO.setIsRenamable(
false);
unsigned const MachineRegisterInfo * MRI
Provides AMDGPU specific target descriptions.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
virtual bool runOnMachineFunction(MachineFunction &MF)=0
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
virtual StringRef getPassName() const
getPassName - Return a nice clean name for a pass.
Wrapper class representing virtual and physical registers.
This class keeps track of the SPI_SP_INPUT_ADDR config register, which tells the hardware which inter...
void clearNonWWMRegAllocMask()
const ReservedRegSet & getWWMReservedRegs() const
void reserveWWMRegister(Register Reg)
StringRef - Represent a constant reference to a string, i.e.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Reg
All possible values of the reg field in the ModR/M byte.
This is an optimization pass for GlobalISel generic memory operations.
void initializeAMDGPUReserveWWMRegsPass(PassRegistry &)
char & AMDGPUReserveWWMRegsID