From 5b742571d37dfdea90031fb0c77d10efc7cc0648 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Thu, 6 Oct 2022 09:31:53 +0100 Subject: [PATCH] DFG: run removeVars after CSE This enables removing some more redundant variables. --- src/V3DfgPasses.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3DfgPasses.cpp b/src/V3DfgPasses.cpp index bd192416a..3b08c3121 100644 --- a/src/V3DfgPasses.cpp +++ b/src/V3DfgPasses.cpp @@ -188,8 +188,8 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) { if (v3Global.opt.fDfgPeephole()) { apply(4, "peephole ", [&]() { peephole(dfg, ctx.m_peepholeContext); }); // Without peephole no variables will be redundant, and we just did CSE, so skip these - apply(4, "removeVars ", [&]() { removeVars(dfg, ctx.m_removeVarsContext); }); apply(4, "cse ", [&]() { cse(dfg, ctx.m_cseContext1); }); + apply(4, "removeVars ", [&]() { removeVars(dfg, ctx.m_removeVarsContext); }); } apply(3, "optimized ", [&]() { removeUnused(dfg); }); if (dumpDfg() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "optimized");