[llvm] [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #111004)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 09:04:04 PDT 2024
================
@@ -110,11 +172,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));
+ }
+ } else {
+ ArgExprs.push_back(MCSymbolRefExpr::create(CalleeValSym, OutContext));
----------------
arsenm wrote:
There are 2 paths to this push_back, so merge the push_back into one condition
https://github.com/llvm/llvm-project/pull/111004
More information about the llvm-commits
mailing list