Lines Matching refs:CurrentProgramInfo
230 getAmdKernelCode(KernelCode, CurrentProgramInfo, *MF); in emitFunctionBodyStart()
235 HSAMetadataStream->emitKernel(*MF, CurrentProgramInfo); in emitFunctionBodyStart()
266 STM, KernelName, getAmdhsaKernelDescriptor(*MF, CurrentProgramInfo), in emitFunctionBodyEnd()
267 CurrentProgramInfo.NumVGPRsForWavesPerEU, in emitFunctionBodyEnd()
268 CurrentProgramInfo.NumSGPRsForWavesPerEU - in emitFunctionBodyEnd()
270 CurrentProgramInfo.VCCUsed, in emitFunctionBodyEnd()
271 CurrentProgramInfo.FlatUsed), in emitFunctionBodyEnd()
272 CurrentProgramInfo.VCCUsed, CurrentProgramInfo.FlatUsed); in emitFunctionBodyEnd()
420 if (CurrentProgramInfo.DynamicCallStack) { in getAmdhsaKernelCodeProperties()
450 assert(STM.hasGFX90AInsts() || CurrentProgramInfo.ComputePGMRSrc3GFX90A == 0); in getAmdhsaKernelDescriptor()
453 CurrentProgramInfo.ComputePGMRSrc3GFX90A; in getAmdhsaKernelDescriptor()
465 CurrentProgramInfo = SIProgramInfo(); in runOnMachineFunction()
485 getSIProgramInfo(CurrentProgramInfo, MF); in runOnMachineFunction()
490 EmitPALMetadata(MF, CurrentProgramInfo); in runOnMachineFunction()
494 EmitProgramInfoSI(MF, CurrentProgramInfo); in runOnMachineFunction()
515 emitResourceUsageRemarks(MF, CurrentProgramInfo, MFI->isModuleEntryFunction(), in runOnMachineFunction()
538 emitCommonFunctionComments(CurrentProgramInfo.NumArchVGPR, in runOnMachineFunction()
540 ? CurrentProgramInfo.NumAccVGPR in runOnMachineFunction()
542 CurrentProgramInfo.NumVGPR, in runOnMachineFunction()
543 CurrentProgramInfo.NumSGPR, in runOnMachineFunction()
544 CurrentProgramInfo.ScratchSize, in runOnMachineFunction()
548 " FloatMode: " + Twine(CurrentProgramInfo.FloatMode), false); in runOnMachineFunction()
550 " IeeeMode: " + Twine(CurrentProgramInfo.IEEEMode), false); in runOnMachineFunction()
552 " LDSByteSize: " + Twine(CurrentProgramInfo.LDSSize) + in runOnMachineFunction()
556 " SGPRBlocks: " + Twine(CurrentProgramInfo.SGPRBlocks), false); in runOnMachineFunction()
558 " VGPRBlocks: " + Twine(CurrentProgramInfo.VGPRBlocks), false); in runOnMachineFunction()
562 Twine(CurrentProgramInfo.NumSGPRsForWavesPerEU), false); in runOnMachineFunction()
565 Twine(CurrentProgramInfo.NumVGPRsForWavesPerEU), false); in runOnMachineFunction()
570 Twine((CurrentProgramInfo.AccumOffset + 1) * 4), false); in runOnMachineFunction()
574 Twine(CurrentProgramInfo.Occupancy), false); in runOnMachineFunction()
581 Twine(G_00B84C_SCRATCH_EN(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
584 Twine(G_00B84C_USER_SGPR(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
587 Twine(G_00B84C_TRAP_HANDLER(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
590 Twine(G_00B84C_TGID_X_EN(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
593 Twine(G_00B84C_TGID_Y_EN(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
596 Twine(G_00B84C_TGID_Z_EN(CurrentProgramInfo.ComputePGMRSrc2)), false); in runOnMachineFunction()
599 Twine(G_00B84C_TIDIG_COMP_CNT(CurrentProgramInfo.ComputePGMRSrc2)), in runOnMachineFunction()
603 CurrentProgramInfo.ComputePGMRSrc3GFX90A == 0); in runOnMachineFunction()
607 Twine((AMDHSA_BITS_GET(CurrentProgramInfo.ComputePGMRSrc3GFX90A, in runOnMachineFunction()
612 Twine((AMDHSA_BITS_GET(CurrentProgramInfo.ComputePGMRSrc3GFX90A, in runOnMachineFunction()
964 const SIProgramInfo &CurrentProgramInfo) { in EmitProgramInfoSI() argument
972 OutStreamer->emitInt32(CurrentProgramInfo.getComputePGMRSrc1()); in EmitProgramInfoSI()
975 OutStreamer->emitInt32(CurrentProgramInfo.ComputePGMRSrc2); in EmitProgramInfoSI()
980 ? S_00B860_WAVESIZE_GFX11Plus(CurrentProgramInfo.ScratchBlocks) in EmitProgramInfoSI()
981 : S_00B860_WAVESIZE_PreGFX11(CurrentProgramInfo.ScratchBlocks)); in EmitProgramInfoSI()
987 OutStreamer->emitIntValue(S_00B028_VGPRS(CurrentProgramInfo.VGPRBlocks) | in EmitProgramInfoSI()
988 S_00B028_SGPRS(CurrentProgramInfo.SGPRBlocks), 4); in EmitProgramInfoSI()
992 ? S_0286E8_WAVESIZE_GFX11Plus(CurrentProgramInfo.ScratchBlocks) in EmitProgramInfoSI()
993 : S_0286E8_WAVESIZE_PreGFX11(CurrentProgramInfo.ScratchBlocks)); in EmitProgramInfoSI()
999 ? divideCeil(CurrentProgramInfo.LDSBlocks, 2) in EmitProgramInfoSI()
1000 : CurrentProgramInfo.LDSBlocks; in EmitProgramInfoSI()
1020 const SIProgramInfo &CurrentProgramInfo) { in EmitPALMetadata() argument
1026 MD->setNumUsedVgprs(CC, CurrentProgramInfo.NumVGPRsForWavesPerEU); in EmitPALMetadata()
1031 MD->setNumUsedAgprs(CC, CurrentProgramInfo.NumAccVGPR); in EmitPALMetadata()
1034 MD->setNumUsedSgprs(CC, CurrentProgramInfo.NumSGPRsForWavesPerEU); in EmitPALMetadata()
1035 MD->setRsrc1(CC, CurrentProgramInfo.getPGMRSrc1(CC)); in EmitPALMetadata()
1037 MD->setRsrc2(CC, CurrentProgramInfo.ComputePGMRSrc2); in EmitPALMetadata()
1039 if (CurrentProgramInfo.ScratchBlocks > 0) in EmitPALMetadata()
1043 MD->setScratchSize(CC, alignTo(CurrentProgramInfo.ScratchSize, 16)); in EmitPALMetadata()
1046 ? divideCeil(CurrentProgramInfo.LDSBlocks, 2) in EmitPALMetadata()
1047 : CurrentProgramInfo.LDSBlocks; in EmitPALMetadata()
1064 CurrentProgramInfo.getPGMRSrc1(CallingConv::AMDGPU_CS)); in emitPALFunctionMetadata()
1065 MD->setRsrc2(CallingConv::AMDGPU_CS, CurrentProgramInfo.ComputePGMRSrc2); in emitPALFunctionMetadata()
1068 MD->setFunctionLdsSize(MF, CurrentProgramInfo.LDSSize); in emitPALFunctionMetadata()
1069 MD->setFunctionNumUsedVgprs(MF, CurrentProgramInfo.NumVGPRsForWavesPerEU); in emitPALFunctionMetadata()
1070 MD->setFunctionNumUsedSgprs(MF, CurrentProgramInfo.NumSGPRsForWavesPerEU); in emitPALFunctionMetadata()
1088 const SIProgramInfo &CurrentProgramInfo, in getAmdKernelCode() argument
1100 CurrentProgramInfo.getComputePGMRSrc1() | in getAmdKernelCode()
1101 (CurrentProgramInfo.ComputePGMRSrc2 << 32); in getAmdKernelCode()
1104 if (CurrentProgramInfo.DynamicCallStack) in getAmdKernelCode()
1139 Out.wavefront_sgpr_count = CurrentProgramInfo.NumSGPR; in getAmdKernelCode()
1140 Out.workitem_vgpr_count = CurrentProgramInfo.NumVGPR; in getAmdKernelCode()
1141 Out.workitem_private_segment_byte_size = CurrentProgramInfo.ScratchSize; in getAmdKernelCode()
1142 Out.workgroup_group_segment_byte_size = CurrentProgramInfo.LDSSize; in getAmdKernelCode()
1197 const MachineFunction &MF, const SIProgramInfo &CurrentProgramInfo, in emitResourceUsageRemarks() argument
1234 EmitResourceUsageRemark("NumSGPR", "SGPRs", CurrentProgramInfo.NumSGPR); in emitResourceUsageRemarks()
1235 EmitResourceUsageRemark("NumVGPR", "VGPRs", CurrentProgramInfo.NumArchVGPR); in emitResourceUsageRemarks()
1237 EmitResourceUsageRemark("NumAGPR", "AGPRs", CurrentProgramInfo.NumAccVGPR); in emitResourceUsageRemarks()
1239 CurrentProgramInfo.ScratchSize); in emitResourceUsageRemarks()
1241 CurrentProgramInfo.Occupancy); in emitResourceUsageRemarks()
1243 CurrentProgramInfo.SGPRSpill); in emitResourceUsageRemarks()
1245 CurrentProgramInfo.VGPRSpill); in emitResourceUsageRemarks()
1248 CurrentProgramInfo.LDSSize); in emitResourceUsageRemarks()