diff --git a/src/relay/pass/to_anf.cc b/src/relay/pass/to_anf.cc index 35d8254c1d33c..9f90bebbb41a4 100644 --- a/src/relay/pass/to_anf.cc +++ b/src/relay/pass/to_anf.cc @@ -286,26 +286,22 @@ class CalcScope : ExprFunctor { class Fill : ExprFunctor { public: - static Expr ToANF(const DependentGraph& dg, - const ExprScopeMap& esm, + static Expr ToANF(const ExprScopeMap& esm, const Module& m, std::set* gv, const Expr& e) { - Fill fi(dg, esm, m, gv); + Fill fi(esm, m, gv); return esm.global_scope->ll->Get(fi.VisitExpr(e)); } private: - const DependentGraph& dg_; const ExprScopeMap& esm_; Module mod_; std::set* visited_; - Fill(const DependentGraph& dg, - const ExprScopeMap& esm, + Fill(const ExprScopeMap& esm, Module mod, std::set* visited) : - dg_(dg), esm_(esm), mod_(mod), visited_(visited) { } @@ -408,7 +404,7 @@ Expr ToANFAux(const Expr& e, const Module& m, std::set* gv) { DependentGraph dg = ExprDep::Dependency(e); std::vector topo = Topo::Sort(dg); ExprScopeMap esm = CalcScope::Calculate(dg, topo); - return Fill::ToANF(dg, esm, m, gv, e); + return Fill::ToANF(esm, m, gv, e); } Expr ToANF(const Expr& e, const Module& m, std::set* gv) {