[llvm] [AMDGPU] Keep unresolved callees in cyclic resource usage max (PR #219999)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 02:52:55 PDT 2026


================
@@ -182,7 +189,12 @@ const MCExpr *MCResourceInfo::flattenedCycleMax(MCSymbol *RecSym,
   LLVM_DEBUG(dbgs() << "MCResUse:   " << RecSym->getName()
                     << ": Using flattened max: << " << Maximum << '\n');
 
-  return MCConstantExpr::create(Maximum, OutContext);
+  const MCExpr *MaxConst = MCConstantExpr::create(Maximum, OutContext);
+  if (Unassigned.empty())
+    return MaxConst;
+
+  Unassigned.insert(Unassigned.begin(), MaxConst);
----------------
aobolensk wrote:

after data structure change it is different now, please take a look

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


More information about the llvm-commits mailing list