[llvm] [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #111004)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 08:04:12 PDT 2024
================
@@ -107,17 +116,17 @@ static bool findSymbolInExpr(MCSymbol *Sym, const MCExpr *Expr,
}
case MCExpr::ExprKind::Binary: {
const MCBinaryExpr *BExpr = cast<MCBinaryExpr>(Expr);
- return findSymbolInExpr(Sym, BExpr->getLHS(), Exprs) ||
- findSymbolInExpr(Sym, BExpr->getRHS(), Exprs);
+ return findSymbolInExpr(Sym, BExpr->getLHS(), Exprs, Visited) ||
+ findSymbolInExpr(Sym, BExpr->getRHS(), Exprs, Visited);
----------------
arsenm wrote:
Push onto the worklist you already have instead of recursing
https://github.com/llvm/llvm-project/pull/111004
More information about the llvm-commits
mailing list