[llvm] MCExpr-ify SIProgramInfo (PR #88257)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 04:29:01 PDT 2024


================
@@ -61,6 +65,21 @@ void AMDGPUVariadicMCExpr::printImpl(raw_ostream &OS,
   case AGVK_Max:
     OS << "max(";
     break;
+  case AGVK_ExtraSGPRs:
+    OS << "extrasgprs(";
+    break;
+  case AGVK_TotalNumVGPRs:
+    OS << "totalnumvgprs(";
+    break;
+  case AGVK_TotalNumVGPRs90A:
+    OS << "totalnumvgprs90a(";
+    break;
+  case AGVK_AlignTo:
+    OS << "alignto(";
+    break;
+  case AGVK_Occupancy:
+    OS << "occupancy(";
----------------
JanekvO wrote:

I would've liked to avoid the occupancy expressions but the SIProgramInfo struct has a member for occupancy which is derived from (among other things) the NumVGPRs and NumSGPRs which will be MCExprs and could possibly be unresolved at the time SIProgramInfo's occupancy is computed.

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


More information about the llvm-commits mailing list