[llvm] Reapply [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #112251)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 09:56:36 PDT 2024
================
@@ -163,23 +139,31 @@ void MCResourceInfo::assignResourceInfoExpr(
MCSymbol *Sym = getSymbol(MF.getName(), RIK, OutContext);
if (!Callees.empty()) {
SmallVector<const MCExpr *, 8> ArgExprs;
- // Avoid recursive symbol assignment.
SmallPtrSet<const Function *, 8> Seen;
ArgExprs.push_back(LocalConstExpr);
- const Function &F = MF.getFunction();
- Seen.insert(&F);
for (const Function *Callee : Callees) {
if (!Seen.insert(Callee).second)
continue;
+
+ SmallPtrSet<const MCExpr *, 8> WorkSet;
----------------
arsenm wrote:
I expect to maintain the set for all callees to be visited, not redone on each one
https://github.com/llvm/llvm-project/pull/112251
More information about the llvm-commits
mailing list