[llvm] [AMDGPU] Fix layering violations in AMDGPUMCExpr.cpp. NFC (PR #168242)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 09:10:22 PST 2025


================
@@ -317,30 +315,6 @@ const AMDGPUMCExpr *AMDGPUMCExpr::createTotalNumVGPR(const MCExpr *NumAGPR,
   return create(AGVK_TotalNumVGPRs, {NumAGPR, NumVGPR}, Ctx);
 }
 
-/// Mimics GCNSubtarget::computeOccupancy for MCExpr.
-///
-/// Remove dependency on GCNSubtarget and depend only only the necessary values
-/// for said occupancy computation. Should match computeOccupancy implementation
-/// without passing \p STM on.
-const AMDGPUMCExpr *AMDGPUMCExpr::createOccupancy(
-    unsigned InitOcc, const MCExpr *NumSGPRs, const MCExpr *NumVGPRs,
-    unsigned DynamicVGPRBlockSize, const GCNSubtarget &STM, MCContext &Ctx) {
----------------
topperc wrote:

I think `getGeneration` returns a field in `GCNSubtarget` that is calculated by taking the max of a set of feature bits in tablegen generated code. We would need to manually replicate that maxing code.

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


More information about the llvm-commits mailing list