83 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
94 Comment +=
" ; " +
HexLines[i] +
"\n";
107 bool killPixel =
false;
122 for (
unsigned op_idx = 0; op_idx < numOperands; op_idx++) {
126 unsigned HWReg = RI->getEncodingValue(MO.
getReg()) & 0xff;
131 MaxGPR = std::max(MaxGPR, HWReg);
171 unsigned MaxSGPR = 0;
172 unsigned MaxVGPR = 0;
173 bool VCCUsed =
false;
185 for (
unsigned op_idx = 0; op_idx < numOperands; op_idx++) {
196 if (reg == AMDGPU::VCC) {
209 if (AMDGPU::SReg_32RegClass.contains(reg)) {
212 }
else if (AMDGPU::VReg_32RegClass.contains(reg)) {
215 }
else if (AMDGPU::SReg_64RegClass.contains(reg)) {
218 }
else if (AMDGPU::VReg_64RegClass.contains(reg)) {
221 }
else if (AMDGPU::VReg_96RegClass.contains(reg)) {
224 }
else if (AMDGPU::SReg_128RegClass.contains(reg)) {
227 }
else if (AMDGPU::VReg_128RegClass.contains(reg)) {
230 }
else if (AMDGPU::SReg_256RegClass.contains(reg)) {
233 }
else if (AMDGPU::VReg_256RegClass.contains(reg)) {
236 }
else if (AMDGPU::SReg_512RegClass.contains(reg)) {
239 }
else if (AMDGPU::VReg_512RegClass.contains(reg)) {
243 assert(!
"Unknown register class");
245 hwReg = RI->getEncodingValue(reg) & 0xff;
246 maxUsed = hwReg + width - 1;
248 MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR;
250 MaxVGPR = maxUsed > MaxVGPR ? maxUsed : MaxVGPR;
271 unsigned LDSAlignShift;
Interface definition for SIRegisterInfo.
void EmitRawText(const Twine &String)
#define R_00B228_SPI_SHADER_PGM_RSRC1_GS
#define R_028850_SQ_PGM_RESOURCES_PS
#define R_028860_SQ_PGM_RESOURCES_VS
enum Generation getGeneration() const
const MCSectionELF * getELFSection(StringRef Section, unsigned Type, unsigned Flags, SectionKind Kind)
void EmitProgramInfoSI(MachineFunction &MF)
#define R_028878_SQ_PGM_RESOURCES_GS
#define R_00B028_SPI_SHADER_PGM_RSRC1_PS
virtual bool hasRawTextSupport() const
Interface definition for R600RegisterInfo.
#define R_0286CC_SPI_PS_INPUT_ENA
#define S_00B028_SGPRS(x)
Target TheAMDGPUTarget
The target for the AMDGPU backend.
bool isReg() const
isReg - Tests if this is a MO_Register operand.
virtual void EmitBytes(StringRef Data)=0
unsigned getNumOperands() const
void SwitchSection(const MCSection *Section, const MCExpr *Subsection=0)
virtual bool runOnMachineFunction(MachineFunction &MF)
#define R_00B848_COMPUTE_PGM_RSRC1
MCContext & getContext() const
static AsmPrinter * createAMDGPUAsmPrinterPass(TargetMachine &tm, MCStreamer &Streamer)
virtual void EmitIntValue(uint64_t Value, unsigned Size)
bundle_iterator< MachineInstr, instr_iterator > iterator
#define S_00B028_VGPRS(x)
AMDGPUAsmPrinter(TargetMachine &TM, MCStreamer &Streamer)
const MachineOperand & getOperand(unsigned i) const
#define R_0288D4_SQ_PGM_RESOURCES_LS
#define R_00B02C_SPI_SHADER_PGM_RSRC2_PS
#define R_02880C_DB_SHADER_CONTROL
#define S_00B84C_LDS_SIZE(x)
std::vector< std::string > HexLines
const STC & getSubtarget() const
#define R_00B128_SPI_SHADER_PGM_RSRC1_VS
unsigned LDSSize
Number of bytes in the LDS that are being used.
#define R_028868_SQ_PGM_RESOURCES_VS
std::vector< std::string > DisasmLines
uint64_t RoundUpToAlignment(uint64_t Value, uint64_t Align)
void SetupMachineFunction(MachineFunction &MF)
#define S_02880C_KILL_ENABLE(x)
void LLVMInitializeR600AsmPrinter()
AMDGPU Assembly printer class.
void EmitProgramInfoR600(MachineFunction &MF)
Emit register usage information so that the GPU driver can correctly setup the GPU state...
virtual const TargetRegisterInfo * getRegisterInfo() const
unsigned getReg() const
getReg - Returns the register number.
const TargetLoweringObjectFile & getObjFileLowering() const
getObjFileLowering - Return information about object file lowering.
#define R_00B84C_COMPUTE_PGM_RSRC2
#define S_00B02C_EXTRA_LDS_SIZE(x)
BasicBlockListType::iterator iterator
static void RegisterAsmPrinter(Target &T, Target::AsmPrinterCtorTy Fn)
StringRef getName() const
static SectionKind getReadOnly()
#define R_0288E8_SQ_LDS_ALLOC
#define R_028844_SQ_PGM_RESOURCES_PS