[llvm] [AMDGPU] MCExpr-ify AMDGPU HSAMetadata (PR #94788)

Scott Linder via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 15:57:30 PDT 2024


================
@@ -463,11 +472,13 @@ AMDGPUAsmPrinter::getAmdhsaKernelDescriptor(const MachineFunction &MF,
 
   KernelDescriptor.compute_pgm_rsrc1 = PI.getComputePGMRSrc1(STM, Ctx);
   KernelDescriptor.compute_pgm_rsrc2 = PI.getComputePGMRSrc2(Ctx);
-  KernelDescriptor.kernel_code_properties =
-      MCConstantExpr::create(getAmdhsaKernelCodeProperties(MF), Ctx);
+  KernelDescriptor.kernel_code_properties = getAmdhsaKernelCodeProperties(MF);
 
-  assert(STM.hasGFX90AInsts() ||
-         getMCExprValue(CurrentProgramInfo.ComputePGMRSrc3GFX90A, Ctx) == 0);
+  int64_t PGRM_Rsrc3 = 1;
+  bool EvaluatableRsrc3 =
----------------
slinder1 wrote:

These are unused in non-assert builds, either cast to `void` or wrap with `#ifndef NDEBUG`?

https://github.com/llvm/llvm-project/pull/94788


More information about the llvm-commits mailing list