[llvm] [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #111004)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 09:26:03 PDT 2024
================
@@ -110,11 +163,18 @@ void MCResourceInfo::assignResourceInfoExpr(
if (!Seen.insert(Callee).second)
continue;
MCSymbol *CalleeValSym = getSymbol(Callee->getName(), RIK, OutContext);
- ArgExprs.push_back(MCSymbolRefExpr::create(CalleeValSym, OutContext));
+ if (CalleeValSym->isVariable()) {
+ if (!foundRecursiveSymbolDef(
+ Sym, CalleeValSym->getVariableValue(/*isUsed=*/false))) {
+ ArgExprs.push_back(MCSymbolRefExpr::create(CalleeValSym, OutContext));
+ }
----------------
arsenm wrote:
Can you track a visited set instead of explicitly checking for recursion
https://github.com/llvm/llvm-project/pull/111004
More information about the llvm-commits
mailing list