diff --git a/src/V3Active.cpp b/src/V3Active.cpp index 87194907f..e7029790a 100644 --- a/src/V3Active.cpp +++ b/src/V3Active.cpp @@ -183,7 +183,7 @@ public: << " (not all control paths of combinational always assign a value)\n" << nodep->warnMore() << "... Suggest use of always_latch for intentional latches"); - if (dumpGraph() >= 9) dumpDotFilePrefixed("latch_" + vrp->name()); + if (dumpGraphLevel() >= 9) dumpDotFilePrefixed("latch_" + vrp->name()); } vertp->user(false); // Clear again (see above) vrp->varp()->isLatched(latch_detected); @@ -652,5 +652,5 @@ public: void V3Active::activeAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ActiveVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("active", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("active", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3ActiveTop.cpp b/src/V3ActiveTop.cpp index 29d9df091..16cfe6e95 100644 --- a/src/V3ActiveTop.cpp +++ b/src/V3ActiveTop.cpp @@ -145,5 +145,5 @@ public: void V3ActiveTop::activeTopAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ActiveTopVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("activetop", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("activetop", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Assert.cpp b/src/V3Assert.cpp index 15969106a..91ae114ca 100644 --- a/src/V3Assert.cpp +++ b/src/V3Assert.cpp @@ -544,5 +544,5 @@ public: void V3Assert::assertAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { AssertVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("assert", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("assert", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3AssertPre.cpp b/src/V3AssertPre.cpp index 51a12ad14..341204593 100644 --- a/src/V3AssertPre.cpp +++ b/src/V3AssertPre.cpp @@ -496,5 +496,5 @@ public: void V3AssertPre::assertPreAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { AssertPreVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("assertpre", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index dcc43148c..0be9e89a5 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -1217,7 +1217,7 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, boo if (logsp->fail()) v3fatal("Can't write " << filename); *logsp << "Verilator Tree Dump (format 0x3900) from to \n"; - if (editCountGbl() == editCountLast() && ::dumpTree() < 9) { + if (editCountGbl() == editCountLast() && ::dumpTreeLevel() < 9) { *logsp << '\n'; *logsp << "No changes since last dump!\n"; } else { @@ -1227,7 +1227,7 @@ void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, boo } } if (doDump && v3Global.opt.debugEmitV()) V3EmitV::debugEmitV(filename + ".v"); - if (doCheck && (v3Global.opt.debugCheck() || ::dumpTree())) { + if (doCheck && (v3Global.opt.debugCheck() || ::dumpTreeLevel())) { // Error check checkTree(); // Broken isn't part of check tree because it can munge iterp's diff --git a/src/V3Begin.cpp b/src/V3Begin.cpp index 43f062bcd..d18f4be1d 100644 --- a/src/V3Begin.cpp +++ b/src/V3Begin.cpp @@ -408,5 +408,5 @@ void V3Begin::debeginAll(AstNetlist* nodep) { { BeginVisitor{nodep, &state}; } if (state.anyFuncInBegin()) { BeginRelinkVisitor{nodep, &state}; } } // Destruct before checking - V3Global::dumpCheckGlobalTree("begin", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("begin", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3CCtors.cpp b/src/V3CCtors.cpp index a079006ec..3c1265c67 100644 --- a/src/V3CCtors.cpp +++ b/src/V3CCtors.cpp @@ -257,5 +257,5 @@ void V3CCtors::cctorsAll() { UINFO(2, __FUNCTION__ << ": " << endl); evalAsserts(); { CCtorsVisitor{v3Global.rootp()}; } - V3Global::dumpCheckGlobalTree("cctors", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("cctors", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3CUse.cpp b/src/V3CUse.cpp index 9085ba8d9..d9de9a10d 100644 --- a/src/V3CUse.cpp +++ b/src/V3CUse.cpp @@ -115,5 +115,5 @@ void V3CUse::cUseAll() { // for each output file and put under that CUseVisitor{modp}; } - V3Global::dumpCheckGlobalTree("cuse", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("cuse", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Case.cpp b/src/V3Case.cpp index 4ae5969ad..c8cd473c2 100644 --- a/src/V3Case.cpp +++ b/src/V3Case.cpp @@ -566,7 +566,7 @@ public: void V3Case::caseAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { CaseVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("case", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("case", 0, dumpTreeLevel() >= 3); } void V3Case::caseLint(AstNodeCase* nodep) { UINFO(4, __FUNCTION__ << ": " << endl); diff --git a/src/V3Cast.cpp b/src/V3Cast.cpp index 4f253beed..7c3d47c53 100644 --- a/src/V3Cast.cpp +++ b/src/V3Cast.cpp @@ -208,5 +208,5 @@ public: void V3Cast::castAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { CastVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("cast", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("cast", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Class.cpp b/src/V3Class.cpp index 3c726a3a6..71cd260d3 100644 --- a/src/V3Class.cpp +++ b/src/V3Class.cpp @@ -244,5 +244,5 @@ public: void V3Class::classAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ClassVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("class", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("class", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Clean.cpp b/src/V3Clean.cpp index 8d0718700..218517aa0 100644 --- a/src/V3Clean.cpp +++ b/src/V3Clean.cpp @@ -325,5 +325,5 @@ public: void V3Clean::cleanAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { CleanVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("clean", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("clean", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Clock.cpp b/src/V3Clock.cpp index bf374d2a3..c72730ffb 100644 --- a/src/V3Clock.cpp +++ b/src/V3Clock.cpp @@ -224,5 +224,5 @@ public: void V3Clock::clockAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ClockVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("clock", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("clock", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Combine.cpp b/src/V3Combine.cpp index 44e9b2954..a4d425229 100644 --- a/src/V3Combine.cpp +++ b/src/V3Combine.cpp @@ -238,5 +238,5 @@ public: void V3Combine::combineAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); CombineVisitor::apply(nodep); - V3Global::dumpCheckGlobalTree("combine", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("combine", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Common.cpp b/src/V3Common.cpp index b5f5a4c8c..ed1570c51 100644 --- a/src/V3Common.cpp +++ b/src/V3Common.cpp @@ -172,5 +172,5 @@ void V3Common::commonAll() { if (!dtypep->packed()) makeVlToString(dtypep); } } - V3Global::dumpCheckGlobalTree("common", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("common", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 934307192..a5413c1ec 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -3759,7 +3759,7 @@ void V3Const::constifyAllLint(AstNetlist* nodep) { ConstVisitor visitor{ConstVisitor::PROC_V_WARN, /* globalPass: */ true}; (void)visitor.mainAcceptEdit(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3); } void V3Const::constifyCpp(AstNetlist* nodep) { @@ -3768,7 +3768,7 @@ void V3Const::constifyCpp(AstNetlist* nodep) { ConstVisitor visitor{ConstVisitor::PROC_CPP, /* globalPass: */ true}; (void)visitor.mainAcceptEdit(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("const_cpp", 0, dumpTreeLevel() >= 3); } AstNode* V3Const::constifyEdit(AstNode* nodep) { @@ -3792,7 +3792,7 @@ void V3Const::constifyAllLive(AstNetlist* nodep) { ConstVisitor visitor{ConstVisitor::PROC_LIVE, /* globalPass: */ true}; (void)visitor.mainAcceptEdit(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3); } void V3Const::constifyAll(AstNetlist* nodep) { @@ -3802,7 +3802,7 @@ void V3Const::constifyAll(AstNetlist* nodep) { ConstVisitor visitor{ConstVisitor::PROC_V_EXPENSIVE, /* globalPass: */ true}; (void)visitor.mainAcceptEdit(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("const", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("const", 0, dumpTreeLevel() >= 3); } AstNode* V3Const::constifyExpensiveEdit(AstNode* nodep) { diff --git a/src/V3Coverage.cpp b/src/V3Coverage.cpp index 340668e71..280e652cc 100644 --- a/src/V3Coverage.cpp +++ b/src/V3Coverage.cpp @@ -567,5 +567,5 @@ public: void V3Coverage::coverage(AstNetlist* rootp) { UINFO(2, __FUNCTION__ << ": " << endl); { CoverageVisitor{rootp}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("coverage", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("coverage", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3CoverageJoin.cpp b/src/V3CoverageJoin.cpp index 8b087f09f..dbfc26862 100644 --- a/src/V3CoverageJoin.cpp +++ b/src/V3CoverageJoin.cpp @@ -117,5 +117,5 @@ public: void V3CoverageJoin::coverageJoin(AstNetlist* rootp) { UINFO(2, __FUNCTION__ << ": " << endl); { CoverageJoinVisitor{rootp}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("coveragejoin", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Dead.cpp b/src/V3Dead.cpp index 5faad31e1..b0d798ab1 100644 --- a/src/V3Dead.cpp +++ b/src/V3Dead.cpp @@ -539,29 +539,29 @@ void V3Dead::deadifyModules(AstNetlist* nodep) { { DeadVisitor{nodep, false, false, false, false, !v3Global.opt.topIfacesSupported()}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("deadModules", 0, dumpTreeLevel() >= 6); } void V3Dead::deadifyDTypes(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DeadVisitor{nodep, false, true, false, false, false}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("deadDtypes", 0, dumpTreeLevel() >= 3); } void V3Dead::deadifyDTypesScoped(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DeadVisitor{nodep, false, true, true, false, false}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("deadDtypesScoped", 0, dumpTreeLevel() >= 3); } void V3Dead::deadifyAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DeadVisitor{nodep, true, true, false, true, false}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("deadAll", 0, dumpTreeLevel() >= 3); } void V3Dead::deadifyAllScoped(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DeadVisitor{nodep, true, true, true, true, false}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("deadAllScoped", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index 1a491422d..2fec08043 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -641,5 +641,5 @@ public: void V3Delayed::delayedAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DelayedVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("delayed", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("delayed", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Depth.cpp b/src/V3Depth.cpp index 2ca383362..32797e069 100644 --- a/src/V3Depth.cpp +++ b/src/V3Depth.cpp @@ -166,5 +166,5 @@ public: void V3Depth::depthAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DepthVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("depth", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("depth", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3DepthBlock.cpp b/src/V3DepthBlock.cpp index 889601de2..4adebda13 100644 --- a/src/V3DepthBlock.cpp +++ b/src/V3DepthBlock.cpp @@ -127,5 +127,5 @@ public: void V3DepthBlock::depthBlockAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DepthBlockVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("deepblock", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Descope.cpp b/src/V3Descope.cpp index 3c1eeb518..1d4866faf 100644 --- a/src/V3Descope.cpp +++ b/src/V3Descope.cpp @@ -285,5 +285,5 @@ public: void V3Descope::descopeAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { DescopeVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("descope", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("descope", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3DfgOptimizer.cpp b/src/V3DfgOptimizer.cpp index d3b361bf6..a299cae0e 100644 --- a/src/V3DfgOptimizer.cpp +++ b/src/V3DfgOptimizer.cpp @@ -237,7 +237,7 @@ void V3DfgOptimizer::extract(AstNetlist* netlistp) { UINFO(2, __FUNCTION__ << ": " << endl); // Extract more optimization candidates DataflowExtractVisitor::apply(netlistp); - V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("dfg-extract", 0, dumpTreeLevel() >= 3); } void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) { @@ -267,7 +267,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) { // Build the DFG of this module const std::unique_ptr dfg{V3DfgPasses::astToDfg(*modp, ctx)}; - if (dumpDfg() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-input"); + if (dumpDfgLevel() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-input"); // Extract the cyclic sub-graphs. We do this because a lot of the optimizations assume a // DAG, and large, mostly acyclic graphs could not be optimized due to the presence of @@ -284,7 +284,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) { // For each cyclic component for (auto& component : cyclicComponents) { - if (dumpDfg() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source"); + if (dumpDfgLevel() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source"); // TODO: Apply optimizations safe for cyclic graphs // Add back under the main DFG (we will convert everything back in one go) dfg->addGraph(*component); @@ -292,7 +292,7 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) { // For each acyclic component for (auto& component : acyclicComponents) { - if (dumpDfg() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source"); + if (dumpDfgLevel() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source"); // Optimize the component V3DfgPasses::optimize(*component, ctx); // Add back under the main DFG (we will convert everything back in one go) @@ -300,9 +300,9 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) { } // Convert back to Ast - if (dumpDfg() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-optimized"); + if (dumpDfgLevel() >= 8) dfg->dumpDotFilePrefixed(ctx.prefix() + "whole-optimized"); AstModule* const resultModp = V3DfgPasses::dfgToAst(*dfg, ctx); UASSERT_OBJ(resultModp == modp, modp, "Should be the same module"); } - V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("dfg-optimize", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3DfgPasses.cpp b/src/V3DfgPasses.cpp index edeb007dd..3edfe5a88 100644 --- a/src/V3DfgPasses.cpp +++ b/src/V3DfgPasses.cpp @@ -285,7 +285,7 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) { const auto apply = [&](int dumpLevel, const string& name, std::function pass) { pass(); - if (dumpDfg() >= dumpLevel) { + if (dumpDfgLevel() >= dumpLevel) { const string strippedName = VString::removeWhitespace(name); const string label = ctx.prefix() + "pass-" + cvtToStr(passNumber) + "-" + strippedName; @@ -294,7 +294,7 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) { ++passNumber; }; - if (dumpDfg() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "input"); + if (dumpDfgLevel() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "input"); apply(3, "input ", [&]() {}); apply(4, "inlineVars ", [&]() { inlineVars(dfg); }); apply(4, "cse0 ", [&]() { cse(dfg, ctx.m_cseContext0); }); @@ -304,5 +304,5 @@ void V3DfgPasses::optimize(DfgGraph& dfg, V3DfgOptimizationContext& ctx) { apply(4, "cse1 ", [&]() { cse(dfg, ctx.m_cseContext1); }); } apply(4, "removeVars ", [&]() { removeVars(dfg, ctx.m_removeVarsContext); }); - if (dumpDfg() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "optimized"); + if (dumpDfgLevel() >= 8) dfg.dumpDotAllVarConesPrefixed(ctx.prefix() + "optimized"); } diff --git a/src/V3DupFinder.cpp b/src/V3DupFinder.cpp index 49fcf2808..f41d9b1df 100644 --- a/src/V3DupFinder.cpp +++ b/src/V3DupFinder.cpp @@ -100,5 +100,5 @@ void V3DupFinder::dumpFile(const string& filename, bool tree) { } void V3DupFinder::dumpFilePrefixed(const string& nameComment, bool tree) { - if (dump()) dumpFile(v3Global.debugFilename(nameComment) + ".hash", tree); + if (dumpLevel()) dumpFile(v3Global.debugFilename(nameComment) + ".hash", tree); } diff --git a/src/V3Error.cpp b/src/V3Error.cpp index 6fc051edc..a0fa7a3d3 100644 --- a/src/V3Error.cpp +++ b/src/V3Error.cpp @@ -220,10 +220,10 @@ void V3ErrorGuarded::v3errorEnd(std::ostringstream& sstr, const string& extra) tellManual(2); } #ifndef V3ERROR_NO_GLOBAL_ - if (dumpTree() || debug()) { + if (dumpTreeLevel() || debug()) { V3Broken::allowMidvisitorCheck(true); V3ThreadPool::s().requestExclusiveAccess([&]() VL_REQUIRES(m_mutex) { - if (dumpTree()) { + if (dumpTreeLevel()) { v3Global.rootp()->dumpTreeFile( v3Global.debugFilename("final.tree", 990)); } diff --git a/src/V3Error.h b/src/V3Error.h index 01578fa0e..8d0f784b3 100644 --- a/src/V3Error.h +++ b/src/V3Error.h @@ -666,12 +666,10 @@ inline void v3errorEndFatal(std::ostringstream& sstr) static_assert(true, "") // Takes an optional "name" (as __VA_ARGS__) -#define VL_DEFINE_DUMP(...) \ - VL_ATTR_UNUSED static int dump##__VA_ARGS__() { \ +#define VL_DEFINE_DUMP(func, tag) \ + VL_ATTR_UNUSED static int dump##func() { \ static int level = -1; \ if (VL_UNLIKELY(level < 0)) { \ - std::string tag{VL_STRINGIFY(__VA_ARGS__)}; \ - tag[0] = std::tolower(tag[0]); \ const unsigned dumpTag = v3Global.opt.dumpLevel(tag); \ const unsigned dumpSrc = v3Global.opt.dumpSrcLevel(__FILE__); \ const unsigned dumpLevel = dumpTag >= dumpSrc ? dumpTag : dumpSrc; \ @@ -685,11 +683,11 @@ inline void v3errorEndFatal(std::ostringstream& sstr) // Define debug*() and dump*() routines. This needs to be added to every compilation unit so that // --debugi- and --dumpi- can be used to control debug prints and dumping #define VL_DEFINE_DEBUG_FUNCTIONS \ - VL_DEFINE_DEBUG(); /* Define 'int debug()' */ \ - VL_DEFINE_DUMP(); /* Define 'int dump()' */ \ - VL_DEFINE_DUMP(Dfg); /* Define 'int dumpDfg()' */ \ - VL_DEFINE_DUMP(Graph); /* Define 'int dumpGraph()' */ \ - VL_DEFINE_DUMP(Tree); /* Define 'int dumpTree()' */ \ + VL_DEFINE_DEBUG(); /* Define 'int debug()' for --debugi */ \ + VL_DEFINE_DUMP(Level, ""); /* Define 'int dumpLevel()' for --dumpi */ \ + VL_DEFINE_DUMP(DfgLevel, "dfg"); /* Define 'int dumpDfgLevel()' for --dumpi-level */ \ + VL_DEFINE_DUMP(GraphLevel, "graph"); /* Define 'int dumpGraphLevel()' for dumpi-graph */ \ + VL_DEFINE_DUMP(TreeLevel, "tree"); /* Define 'int dumpTreeLevel()' for dumpi-tree */ \ static_assert(true, "") //---------------------------------------------------------------------- diff --git a/src/V3Expand.cpp b/src/V3Expand.cpp index a34660a7d..5f3cf6fb7 100644 --- a/src/V3Expand.cpp +++ b/src/V3Expand.cpp @@ -915,5 +915,5 @@ public: void V3Expand::expandAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ExpandVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("expand", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("expand", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Force.cpp b/src/V3Force.cpp index 1073f1c8c..9d563a687 100644 --- a/src/V3Force.cpp +++ b/src/V3Force.cpp @@ -314,5 +314,5 @@ void V3Force::forceAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); if (!v3Global.hasForceableSignals()) return; ForceConvertVisitor::apply(nodep); - V3Global::dumpCheckGlobalTree("force", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("force", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 640cade21..2c6497cb9 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -421,12 +421,12 @@ private: // VISITORS void visit(AstNetlist* nodep) override { iterateChildren(nodep); - if (dumpGraph() >= 3) m_graph.dumpDotFilePrefixed("gate_pre"); + if (dumpGraphLevel() >= 3) m_graph.dumpDotFilePrefixed("gate_pre"); warnSignals(); // Before loss of sync/async pointers // Decompose clock vectors -- need to do this before removing redundant edges decomposeClkVectors(); m_graph.removeRedundantEdgesSum(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_simp"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_simp"); // Find gate interconnect and optimize m_graph.userClearVertices(); // vertex->user(): bool. Indicates we've set it as consumed // Get rid of buffers first, @@ -438,15 +438,15 @@ private: // Remove redundant logic if (v3Global.opt.fDedupe()) { dedupe(); - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_dedup"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_dedup"); } if (v3Global.opt.fAssemble()) { mergeAssigns(); - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("gate_assm"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("gate_assm"); } // Consumption warnings consumedMark(); - if (dumpGraph() >= 3) m_graph.dumpDotFilePrefixed("gate_opt"); + if (dumpGraphLevel() >= 3) m_graph.dumpDotFilePrefixed("gate_opt"); // Rewrite assignments consumedMove(); } @@ -1488,5 +1488,5 @@ void GateVisitor::decomposeClkVectors() { void V3Gate::gateAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { const GateVisitor visitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("gate", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("gate", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3GraphAcyc.cpp b/src/V3GraphAcyc.cpp index c31485d26..ddae8c48b 100644 --- a/src/V3GraphAcyc.cpp +++ b/src/V3GraphAcyc.cpp @@ -544,28 +544,28 @@ void GraphAcyc::main() { // edges (and thus can't represent loops - if we did the unbreakable // marking right, anyways) buildGraph(m_origGraphp); - if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_pre"); + if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_pre"); // Perform simple optimizations before any cuttings simplify(false); - if (dumpGraph() >= 5) m_breakGraph.dumpDotFilePrefixed("acyc_simp"); + if (dumpGraphLevel() >= 5) m_breakGraph.dumpDotFilePrefixed("acyc_simp"); UINFO(4, " Cutting trivial loops\n"); simplify(true); - if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_mid"); + if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_mid"); UINFO(4, " Ranking\n"); m_breakGraph.rank(&V3GraphEdge::followNotCutable); - if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_rank"); + if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_rank"); UINFO(4, " Placement\n"); place(); - if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_place"); + if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_place"); UINFO(4, " Final Ranking\n"); // Only needed to assert there are no loops in completed graph m_breakGraph.rank(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_done"); + if (dumpGraphLevel() >= 6) m_breakGraph.dumpDotFilePrefixed("acyc_done"); } void V3Graph::acyclic(V3EdgeFuncP edgeFuncp) { diff --git a/src/V3GraphTest.cpp b/src/V3GraphTest.cpp index 8a9637cdf..e90251a58 100644 --- a/src/V3GraphTest.cpp +++ b/src/V3GraphTest.cpp @@ -37,7 +37,7 @@ protected: // Utilities void dumpSelf() { - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("v3graphtest_" + name()); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("v3graphtest_" + name()); } public: diff --git a/src/V3Inline.cpp b/src/V3Inline.cpp index b2774b60e..43aac0fa4 100644 --- a/src/V3Inline.cpp +++ b/src/V3Inline.cpp @@ -727,5 +727,5 @@ void V3Inline::inlineAll(AstNetlist* nodep) { } { InlineIntfRefVisitor{nodep}; } - V3Global::dumpCheckGlobalTree("inline", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("inline", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Inst.cpp b/src/V3Inst.cpp index 061e5caeb..f451f8b54 100644 --- a/src/V3Inst.cpp +++ b/src/V3Inst.cpp @@ -616,11 +616,11 @@ void V3Inst::checkOutputShort(AstPin* nodep) { void V3Inst::instAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { InstVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("inst", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("inst", 0, dumpTreeLevel() >= 3); } void V3Inst::dearrayAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { InstDeVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("dearray", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("dearray", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Life.cpp b/src/V3Life.cpp index 7ba66e97b..c3ff35eba 100644 --- a/src/V3Life.cpp +++ b/src/V3Life.cpp @@ -515,5 +515,5 @@ void V3Life::lifeAll(AstNetlist* nodep) { LifeState state; LifeTopVisitor{nodep, &state}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("life", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("life", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3LifePost.cpp b/src/V3LifePost.cpp index b3bd4234c..56121b68e 100644 --- a/src/V3LifePost.cpp +++ b/src/V3LifePost.cpp @@ -369,5 +369,5 @@ void V3LifePost::lifepostAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); // Mark redundant AssignPost { LifePostDlyVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("life_post", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("life_post", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index f30bb9601..04639e6ad 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -167,7 +167,7 @@ private: iterateChildren(nodep); // Find levels in graph m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph()) m_graph.dumpDotFilePrefixed("linkcells"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed("linkcells"); m_graph.rank(); for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) { if (const LinkCellsVertex* const vvertexp = dynamic_cast(itp)) { diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 498763fac..28861f3ca 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -166,7 +166,7 @@ public: // METHODS void dumpSelf(const string& nameComment = "linkdot", bool force = false) { - if (dump() >= 6 || force) { + if (dumpLevel() >= 6 || force) { const string filename = v3Global.debugFilename(nameComment) + ".txt"; const std::unique_ptr logp{V3File::new_ofstream(filename)}; if (logp->fail()) v3fatal("Can't write " << filename); @@ -193,7 +193,7 @@ public: } void preErrorDump() { static bool diddump = false; - if (!diddump && dumpTree()) { + if (!diddump && dumpTreeLevel()) { diddump = true; dumpSelf("linkdot-preerr", true); v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("linkdot-preerr.tree")); @@ -3555,18 +3555,18 @@ public: // Link class functions void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) { - if (debug() >= 5 || dumpTree() >= 9) { + if (debug() >= 5 || dumpTreeLevel() >= 9) { v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot.tree")); } LinkDotState state(rootp, step); const LinkDotFindVisitor visitor{rootp, &state}; - if (debug() >= 5 || dumpTree() >= 9) { + if (debug() >= 5 || dumpTreeLevel() >= 9) { v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-find.tree")); } if (step == LDS_PRIMARY || step == LDS_PARAMED) { // Initial link stage, resolve parameters const LinkDotParamVisitor visitors{rootp, &state}; - if (debug() >= 5 || dumpTree() >= 9) { + if (debug() >= 5 || dumpTreeLevel() >= 9) { v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-param.tree")); } } else if (step == LDS_ARRAYED) { @@ -3575,7 +3575,7 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) { // process AstScope's. This needs to be separate pass after whole hierarchy graph created. const LinkDotScopeVisitor visitors{rootp, &state}; v3Global.assertScoped(true); - if (debug() >= 5 || dumpTree() >= 9) { + if (debug() >= 5 || dumpTreeLevel() >= 9) { v3Global.rootp()->dumpTreeFile(v3Global.debugFilename("prelinkdot-scoped.tree")); } } else { @@ -3592,23 +3592,23 @@ void V3LinkDot::linkDotGuts(AstNetlist* rootp, VLinkDotStep step) { void V3LinkDot::linkDotPrimary(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); linkDotGuts(nodep, LDS_PRIMARY); - V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6); } void V3LinkDot::linkDotParamed(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); linkDotGuts(nodep, LDS_PARAMED); - V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("linkdotparam", 0, dumpTreeLevel() >= 3); } void V3LinkDot::linkDotArrayed(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); linkDotGuts(nodep, LDS_ARRAYED); - V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 6); } void V3LinkDot::linkDotScope(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); linkDotGuts(nodep, LDS_SCOPED); - V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("linkdot", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3LinkInc.cpp b/src/V3LinkInc.cpp index e420d1276..8c71d6bb2 100644 --- a/src/V3LinkInc.cpp +++ b/src/V3LinkInc.cpp @@ -310,5 +310,5 @@ public: void V3LinkInc::linkIncrements(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { LinkIncVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("linkinc", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3LinkJump.cpp b/src/V3LinkJump.cpp index 7ac37ade3..de4c1230e 100644 --- a/src/V3LinkJump.cpp +++ b/src/V3LinkJump.cpp @@ -351,5 +351,5 @@ public: void V3LinkJump::linkJump(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { LinkJumpVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("linkjump", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3LinkLValue.cpp b/src/V3LinkLValue.cpp index ca0f07574..e8648fd6a 100644 --- a/src/V3LinkLValue.cpp +++ b/src/V3LinkLValue.cpp @@ -319,7 +319,7 @@ public: void V3LinkLValue::linkLValue(AstNetlist* nodep) { UINFO(4, __FUNCTION__ << ": " << endl); { LinkLValueVisitor{nodep, VAccess::NOCHANGE}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("linklvalue", 0, dumpTreeLevel() >= 6); } void V3LinkLValue::linkLValueSet(AstNode* nodep) { // Called by later link functions when it is known a node needs diff --git a/src/V3LinkLevel.cpp b/src/V3LinkLevel.cpp index 11fffed29..609563b99 100644 --- a/src/V3LinkLevel.cpp +++ b/src/V3LinkLevel.cpp @@ -88,7 +88,7 @@ void V3LinkLevel::modSortByLevel() { UASSERT_OBJ(!v3Global.rootp()->modulesp(), v3Global.rootp(), "Unlink didn't work"); for (AstNodeModule* nodep : mods) v3Global.rootp()->addModulesp(nodep); UINFO(9, "modSortByLevel() done\n"); // Comment required for gcc4.6.3 / bug666 - V3Global::dumpCheckGlobalTree("cells", false, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("cells", false, dumpTreeLevel() >= 3); } void V3LinkLevel::timescaling(const ModVec& mods) { @@ -184,7 +184,7 @@ void V3LinkLevel::wrapTop(AstNetlist* rootp) { } } - V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("wraptop", 0, dumpTreeLevel() >= 6); } void V3LinkLevel::wrapTopCell(AstNetlist* rootp) { diff --git a/src/V3LinkParse.cpp b/src/V3LinkParse.cpp index 3b7d8eb0a..e1ed27590 100644 --- a/src/V3LinkParse.cpp +++ b/src/V3LinkParse.cpp @@ -775,5 +775,5 @@ public: void V3LinkParse::linkParse(AstNetlist* rootp) { UINFO(4, __FUNCTION__ << ": " << endl); { LinkParseVisitor{rootp}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("linkparse", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3LinkResolve.cpp b/src/V3LinkResolve.cpp index df1872d19..3a917eb02 100644 --- a/src/V3LinkResolve.cpp +++ b/src/V3LinkResolve.cpp @@ -484,5 +484,5 @@ void V3LinkResolve::linkResolve(AstNetlist* rootp) { const LinkResolveVisitor visitor{rootp}; LinkBotupVisitor{rootp}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("linkresolve", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Localize.cpp b/src/V3Localize.cpp index 1cf60339d..a6f30963c 100644 --- a/src/V3Localize.cpp +++ b/src/V3Localize.cpp @@ -223,5 +223,5 @@ public: void V3Localize::localizeAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { LocalizeVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("localize", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("localize", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3MergeCond.cpp b/src/V3MergeCond.cpp index d5756cc67..5f57e82c5 100644 --- a/src/V3MergeCond.cpp +++ b/src/V3MergeCond.cpp @@ -888,5 +888,5 @@ public: void V3MergeCond::mergeAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { MergeCondVisitor{nodep}; } - V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("merge_cond", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Name.cpp b/src/V3Name.cpp index bec3dd9cc..c6b9b6c68 100644 --- a/src/V3Name.cpp +++ b/src/V3Name.cpp @@ -150,5 +150,5 @@ public: void V3Name::nameAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { NameVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("name", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("name", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Order.cpp b/src/V3Order.cpp index dc1905f97..13f1490a2 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -1416,7 +1416,7 @@ void OrderProcess::processMTasks() { void OrderProcess::process(bool multiThreaded) { // Dump data - if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_pre"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_pre"); // Break cycles. Each strongly connected subgraph (including cutable // edges) will have its own color, and corresponds to a loop in the @@ -1424,27 +1424,27 @@ void OrderProcess::process(bool multiThreaded) { // edges are actually still there, just with weight 0). UINFO(2, " Acyclic & Order...\n"); m_graph.acyclic(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_acyc"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_acyc"); // Assign ranks so we know what to follow // Then, sort vertices and edges by that ordering m_graph.order(); - if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_order"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_order"); // Assign logic vertices to new domains UINFO(2, " Domains...\n"); processDomains(); - if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_domain"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_domain"); - if (dump()) processEdgeReport(); + if (dumpLevel()) processEdgeReport(); if (!multiThreaded) { UINFO(2, " Construct Move Graph...\n"); processMoveBuildGraph(); // Different prefix (ordermv) as it's not the same graph - if (dumpGraph() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_start"); + if (dumpGraphLevel() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_start"); m_pomGraph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_simpl"); + if (dumpGraphLevel() >= 4) m_pomGraph.dumpDotFilePrefixed(m_tag + "_ordermv_simpl"); UINFO(2, " Move...\n"); processMove(); @@ -1454,7 +1454,7 @@ void OrderProcess::process(bool multiThreaded) { } // Dump data - if (dumpGraph()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_done"); + if (dumpGraphLevel()) m_graph.dumpDotFilePrefixed(m_tag + "_orderg_done"); } //###################################################################### diff --git a/src/V3Param.cpp b/src/V3Param.cpp index e15d38834..fab0a077e 100644 --- a/src/V3Param.cpp +++ b/src/V3Param.cpp @@ -1399,5 +1399,5 @@ public: void V3Param::param(AstNetlist* rootp) { UINFO(2, __FUNCTION__ << ": " << endl); { ParamVisitor{rootp}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("param", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("param", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index a10ffec1c..ed8b67a3a 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -2463,7 +2463,7 @@ public: } } - if (dumpGraph() >= 4) schedule.dumpDotFilePrefixedAlways(mtaskGraph, "schedule"); + if (dumpGraphLevel() >= 4) schedule.dumpDotFilePrefixedAlways(mtaskGraph, "schedule"); return schedule; } @@ -2528,7 +2528,7 @@ private: // V3Partition implementation void V3Partition::debugMTaskGraphStats(const V3Graph* graphp, const string& stage) { - if (!debug() && !dump() && !dumpGraph()) return; + if (!debug() && !dumpLevel() && !dumpGraphLevel()) return; UINFO(4, "\n"); UINFO(4, " Stats for " << stage << endl); @@ -2565,7 +2565,7 @@ void V3Partition::debugMTaskGraphStats(const V3Graph* graphp, const string& stag if (mtaskCount < 1000) { string filePrefix("ordermv_"); filePrefix += stage; - if (dumpGraph() >= 4) graphp->dumpDotFilePrefixedAlways(filePrefix); + if (dumpGraphLevel() >= 4) graphp->dumpDotFilePrefixedAlways(filePrefix); } // Look only at the cost of each mtask, neglect communication cost. @@ -2740,7 +2740,7 @@ void V3Partition::go(V3Graph* mtasksp) { // For debug: print out the longest critical path. This allows us to // verify that the costs look reasonable, that we aren't combining // nodes that should probably be split, etc. - if (dump() >= 3) LogicMTask::dumpCpFilePrefixed(mtasksp, "cp"); + if (dumpLevel() >= 3) LogicMTask::dumpCpFilePrefixed(mtasksp, "cp"); // Merge nodes that could present data hazards; see comment within. { diff --git a/src/V3Premit.cpp b/src/V3Premit.cpp index 5cc257f7e..233b7bf1d 100644 --- a/src/V3Premit.cpp +++ b/src/V3Premit.cpp @@ -400,5 +400,5 @@ public: void V3Premit::premitAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { PremitVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("premit", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("premit", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Randomize.cpp b/src/V3Randomize.cpp index 34c90bf9a..409f09740 100644 --- a/src/V3Randomize.cpp +++ b/src/V3Randomize.cpp @@ -368,7 +368,7 @@ void V3Randomize::randomizeNetlist(AstNetlist* nodep) { const RandomizeMarkVisitor markVisitor{nodep}; RandomizeVisitor{nodep}; } - V3Global::dumpCheckGlobalTree("randomize", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("randomize", 0, dumpTreeLevel() >= 3); } AstFunc* V3Randomize::newRandomizeFunc(AstClass* nodep) { diff --git a/src/V3Reloop.cpp b/src/V3Reloop.cpp index bd2d110c0..f71d8913b 100644 --- a/src/V3Reloop.cpp +++ b/src/V3Reloop.cpp @@ -273,5 +273,5 @@ public: void V3Reloop::reloopAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ReloopVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("reloop", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("reloop", 0, dumpTreeLevel() >= 6); } diff --git a/src/V3Sched.cpp b/src/V3Sched.cpp index f9ac9cc8e..fc26a192d 100644 --- a/src/V3Sched.cpp +++ b/src/V3Sched.cpp @@ -1225,7 +1225,7 @@ void schedule(AstNetlist* netlistp) { netlistp->dpiExportTriggerp(nullptr); - V3Global::dumpCheckGlobalTree("sched", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("sched", 0, dumpTreeLevel() >= 3); } } // namespace V3Sched diff --git a/src/V3SchedAcyclic.cpp b/src/V3SchedAcyclic.cpp index ac9bec353..20cfc4c7b 100644 --- a/src/V3SchedAcyclic.cpp +++ b/src/V3SchedAcyclic.cpp @@ -403,7 +403,7 @@ LogicByScope breakCycles(AstNetlist* netlistp, LogicByScope& combinationalLogic) if (graphp->empty()) return LogicByScope{}; // Dump for debug - if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-comb-cycles"); + if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-comb-cycles"); // Make graph acyclic by cutting some edges. Note: This also colors strongly connected // components which reportCycles uses to print each SCCs separately. diff --git a/src/V3SchedPartition.cpp b/src/V3SchedPartition.cpp index 849ff16e7..1f3a0075b 100644 --- a/src/V3SchedPartition.cpp +++ b/src/V3SchedPartition.cpp @@ -341,11 +341,11 @@ LogicRegions partition(LogicByScope& clockedLogic, LogicByScope& combinationalLo // Build the graph const std::unique_ptr graphp = SchedGraphBuilder::build(clockedLogic, combinationalLogic, hybridLogic); - if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched"); + if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched"); // Partition into Active and NBA regions colorActiveRegion(*(graphp.get())); - if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-partitioned", true); + if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-partitioned", true); LogicRegions result; diff --git a/src/V3SchedReplicate.cpp b/src/V3SchedReplicate.cpp index 7db10cabf..961f0e29f 100644 --- a/src/V3SchedReplicate.cpp +++ b/src/V3SchedReplicate.cpp @@ -261,13 +261,13 @@ LogicReplicas replicateLogic(LogicRegions& logicRegionsRegions) { // Build the dataflow (dependency) graph const std::unique_ptr graphp = buildGraph(logicRegionsRegions); // Dump for debug - if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-replicate"); + if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-replicate"); // Propagate driving region flags for (V3GraphVertex* vtxp = graphp->verticesBeginp(); vtxp; vtxp = vtxp->verticesNextp()) { propagateDrivingRegions(static_cast(vtxp)); } // Dump for debug - if (dumpGraph() >= 6) graphp->dumpDotFilePrefixed("sched-replicate-propagated"); + if (dumpGraphLevel() >= 6) graphp->dumpDotFilePrefixed("sched-replicate-propagated"); // Replicate the necessary logic return replicate(graphp.get()); } diff --git a/src/V3SchedTiming.cpp b/src/V3SchedTiming.cpp index 0b3da2451..cc5eba6b9 100644 --- a/src/V3SchedTiming.cpp +++ b/src/V3SchedTiming.cpp @@ -388,7 +388,7 @@ void transformForks(AstNetlist* const netlistp) { ~ForkVisitor() override = default; }; ForkVisitor{netlistp}; - V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("sched_forks", 0, dumpTreeLevel() >= 6); } } // namespace V3Sched diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index 2dd807015..b5a31ea51 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -423,5 +423,5 @@ void V3Scope::scopeAll(AstNetlist* nodep) { const ScopeVisitor visitor{nodep}; ScopeCleanupVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("scope", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("scope", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Slice.cpp b/src/V3Slice.cpp index 4c5a392cd..0546bff76 100644 --- a/src/V3Slice.cpp +++ b/src/V3Slice.cpp @@ -247,5 +247,5 @@ public: void V3Slice::sliceAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { SliceVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("slice", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("slice", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Split.cpp b/src/V3Split.cpp index 88cd94652..c937deb08 100644 --- a/src/V3Split.cpp +++ b/src/V3Split.cpp @@ -456,7 +456,7 @@ protected: UINFO(5, "ReorderBlock " << nodep << endl); m_graph.removeRedundantEdges(&V3GraphEdge::followAlwaysTrue); - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("reorderg_nodup", false); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("reorderg_nodup", false); // Mark all the logic for this step // Vertex::m_user begin: true indicates logic for this step @@ -513,10 +513,10 @@ protected: // And a real ordering to get the statements into something reasonable // We don't care if there's cutable violations here... // Non-cutable violations should be impossible; as those edges are program-order - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_preo", false); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_preo", false); m_graph.acyclic(&SplitEdge::followCyclic); m_graph.rank(&SplitEdge::followCyclic); // Or order(), but that's more expensive - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_opt", false); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_opt", false); } void reorderBlock(AstNode* nodep) { @@ -942,14 +942,14 @@ protected: } } - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_nodup", false); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_nodup", false); // Weak coloring to determine what needs to remain grouped // in a single always. This follows all edges excluding: // - those we pruned above // - PostEdges, which are done later m_graph.weaklyConnected(&SplitEdge::followScoreboard); - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("splitg_colored", false); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("splitg_colored", false); } void visit(AstAlways* nodep) override { @@ -1003,10 +1003,10 @@ private: void V3Split::splitReorderAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { ReorderVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("reorder", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("reorder", 0, dumpTreeLevel() >= 3); } void V3Split::splitAlwaysAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { SplitVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("split", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("split", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3SplitAs.cpp b/src/V3SplitAs.cpp index b8c82f80d..f5faf37f2 100644 --- a/src/V3SplitAs.cpp +++ b/src/V3SplitAs.cpp @@ -192,5 +192,5 @@ public: void V3SplitAs::splitAsAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { SplitAsVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("splitas", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("splitas", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3SplitVar.cpp b/src/V3SplitVar.cpp index 4550ee310..dc62dc823 100644 --- a/src/V3SplitVar.cpp +++ b/src/V3SplitVar.cpp @@ -1249,9 +1249,9 @@ void V3SplitVar::splitVariable(AstNetlist* nodep) { const SplitUnpackedVarVisitor visitor{nodep}; refs = visitor.getPackedVarRefs(); } - V3Global::dumpCheckGlobalTree("split_var", 0, dumpTree() >= 9); + V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9); { SplitPackedVarVisitor{nodep, refs}; } - V3Global::dumpCheckGlobalTree("split_var", 0, dumpTree() >= 9); + V3Global::dumpCheckGlobalTree("split_var", 0, dumpTreeLevel() >= 9); } bool V3SplitVar::canSplitVar(const AstVar* varp) { diff --git a/src/V3Subst.cpp b/src/V3Subst.cpp index 05dec8dba..a83a4cf93 100644 --- a/src/V3Subst.cpp +++ b/src/V3Subst.cpp @@ -384,5 +384,5 @@ public: void V3Subst::substituteAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { SubstVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("subst", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("subst", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3SymTable.h b/src/V3SymTable.h index 9d723a15e..482753a5c 100644 --- a/src/V3SymTable.h +++ b/src/V3SymTable.h @@ -314,7 +314,7 @@ public: } } void dumpFilePrefixed(const string& nameComment) { - if (dumpTree()) { + if (dumpTreeLevel()) { const string filename = v3Global.debugFilename(nameComment) + ".txt"; UINFO(2, "Dumping " << filename << endl); const std::unique_ptr logp{V3File::new_ofstream(filename)}; diff --git a/src/V3TSP.cpp b/src/V3TSP.cpp index 2ee4a27ca..f8961e5eb 100644 --- a/src/V3TSP.cpp +++ b/src/V3TSP.cpp @@ -396,7 +396,7 @@ public: } } void dumpGraphFilePrefixed(const string& nameComment) const { - if (::dump()) { + if (dumpLevel()) { const string filename = v3Global.debugFilename(nameComment) + ".txt"; const std::unique_ptr logp{V3File::new_ofstream(filename)}; if (logp->fail()) v3fatal("Can't write " << filename); @@ -406,7 +406,7 @@ public: void findEulerTour(std::vector* sortedOutp) { UASSERT(sortedOutp->empty(), "Output graph must start empty"); - if (::dumpGraph() >= 6) dumpDotFilePrefixed("findEulerTour"); + if (::dumpGraphLevel() >= 6) dumpDotFilePrefixed("findEulerTour"); std::unordered_set markedEdges; // Pick a start node Vertex* const start_vertexp = castVertexp(verticesBeginp()); @@ -464,12 +464,12 @@ void V3TSP::tspSort(const V3TSP::StateVec& states, V3TSP::StateVec* resultp) { // Create the minimum spanning tree Graph minGraph; graph.makeMinSpanningTree(&minGraph); - if (dumpGraph() >= 6) minGraph.dumpGraphFilePrefixed("minGraph"); + if (dumpGraphLevel() >= 6) minGraph.dumpGraphFilePrefixed("minGraph"); const std::vector oddDegree = minGraph.getOddDegreeKeys(); Graph matching; graph.perfectMatching(oddDegree, &matching); - if (dumpGraph() >= 6) matching.dumpGraphFilePrefixed("matching"); + if (dumpGraphLevel() >= 6) matching.dumpGraphFilePrefixed("matching"); // Adds edges to minGraph, the resulting graph will have even number of // edge counts at every vertex: @@ -670,12 +670,12 @@ void V3TSP::selfTestString() { Graph minGraph; graph.makeMinSpanningTree(&minGraph); - if (dumpGraph() >= 6) minGraph.dumpGraphFilePrefixed("minGraph"); + if (dumpGraphLevel() >= 6) minGraph.dumpGraphFilePrefixed("minGraph"); const std::vector oddDegree = minGraph.getOddDegreeKeys(); Graph matching; graph.perfectMatching(oddDegree, &matching); - if (dumpGraph() >= 6) matching.dumpGraphFilePrefixed("matching"); + if (dumpGraphLevel() >= 6) matching.dumpGraphFilePrefixed("matching"); minGraph.combineGraph(matching); diff --git a/src/V3Table.cpp b/src/V3Table.cpp index 56b754b04..26f37f970 100644 --- a/src/V3Table.cpp +++ b/src/V3Table.cpp @@ -431,5 +431,5 @@ void TableSimulateVisitor::varRefCb(AstVarRef* nodep) { void V3Table::tableAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { TableVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("table", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("table", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Task.cpp b/src/V3Task.cpp index 94c45b035..e7ef1e0f7 100644 --- a/src/V3Task.cpp +++ b/src/V3Task.cpp @@ -283,7 +283,7 @@ public: iterate(nodep); // m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue); - if (dumpGraph()) m_callGraph.dumpDotFilePrefixed("task_call"); + if (dumpGraphLevel()) m_callGraph.dumpDotFilePrefixed("task_call"); } ~TaskStateVisitor() override = default; VL_UNCOPYABLE(TaskStateVisitor); @@ -1820,5 +1820,5 @@ void V3Task::taskAll(AstNetlist* nodep) { TaskStateVisitor visitors{nodep}; const TaskVisitor visitor{nodep, &visitors}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("task", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("task", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Timing.cpp b/src/V3Timing.cpp index a71ad592e..cc0232d54 100644 --- a/src/V3Timing.cpp +++ b/src/V3Timing.cpp @@ -792,7 +792,7 @@ public: explicit TimingVisitor(AstNetlist* nodep) : m_netlistp{nodep} { iterate(nodep); - if (dumpGraph() >= 6) m_depGraph.dumpDotFilePrefixed("timing_deps"); + if (dumpGraphLevel() >= 6) m_depGraph.dumpDotFilePrefixed("timing_deps"); } ~TimingVisitor() override = default; }; @@ -803,5 +803,5 @@ public: void V3Timing::timingAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); TimingVisitor{nodep}; - V3Global::dumpCheckGlobalTree("timing", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("timing", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Trace.cpp b/src/V3Trace.cpp index 44a12ba59..ced3fc9fd 100644 --- a/src/V3Trace.cpp +++ b/src/V3Trace.cpp @@ -734,11 +734,11 @@ private: detectDuplicates(); // Simplify & optimize the graph - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_pre"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_pre"); graphSimplify(true); - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_simplified"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_simplified"); graphOptimize(); - if (dumpGraph() >= 6) m_graph.dumpDotFilePrefixed("trace_optimized"); + if (dumpGraphLevel() >= 6) m_graph.dumpDotFilePrefixed("trace_optimized"); // Create the fine grained activity flags createActivityFlags(); @@ -924,5 +924,5 @@ public: void V3Trace::traceAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { TraceVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("trace", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("trace", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3TraceDecl.cpp b/src/V3TraceDecl.cpp index 704d1d4b4..55bf02720 100644 --- a/src/V3TraceDecl.cpp +++ b/src/V3TraceDecl.cpp @@ -550,5 +550,5 @@ public: void V3TraceDecl::traceDeclAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { TraceDeclVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("tracedecl", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Tristate.cpp b/src/V3Tristate.cpp index 61720c2a4..ee0eeb271 100644 --- a/src/V3Tristate.cpp +++ b/src/V3Tristate.cpp @@ -294,7 +294,7 @@ public: for (V3GraphVertex* itp = m_graph.verticesBeginp(); itp; itp = itp->verticesNextp()) { graphWalkRecurseBack(static_cast(itp), 0); } - if (dumpGraph() >= 9) m_graph.dumpDotFilePrefixed("tri_pos__" + nodep->name()); + if (dumpGraphLevel() >= 9) m_graph.dumpDotFilePrefixed("tri_pos__" + nodep->name()); } void associate(AstNode* fromp, AstNode* top) { new V3GraphEdge{&m_graph, makeVertex(fromp), makeVertex(top), 1}; @@ -1818,5 +1818,5 @@ public: void V3Tristate::tristateAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { TristateVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("tristate", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("tristate", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Unknown.cpp b/src/V3Unknown.cpp index 2f0eabfb0..bf597e4e3 100644 --- a/src/V3Unknown.cpp +++ b/src/V3Unknown.cpp @@ -519,5 +519,5 @@ public: void V3Unknown::unknownAll(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { UnknownVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("unknown", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("unknown", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Unroll.cpp b/src/V3Unroll.cpp index 5e94255a3..6655001d1 100644 --- a/src/V3Unroll.cpp +++ b/src/V3Unroll.cpp @@ -518,5 +518,5 @@ void V3Unroll::unrollAll(AstNetlist* nodep) { UnrollStateful unroller; unroller.unrollAll(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("unroll", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("unroll", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3VariableOrder.cpp b/src/V3VariableOrder.cpp index 6f19fe113..e108e1605 100644 --- a/src/V3VariableOrder.cpp +++ b/src/V3VariableOrder.cpp @@ -207,5 +207,5 @@ void V3VariableOrder::orderAll() { modp = VN_AS(modp->nextp(), NodeModule)) { VariableOrder::processModule(modp); } - V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("variableorder", 0, dumpTreeLevel() >= 3); } diff --git a/src/V3Width.cpp b/src/V3Width.cpp index d1583e1c4..50c7c9af7 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -7441,7 +7441,7 @@ void V3Width::width(AstNetlist* nodep) { WidthRemoveVisitor rvisitor; (void)rvisitor.mainAcceptEdit(nodep); } // Destruct before checking - V3Global::dumpCheckGlobalTree("width", 0, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("width", 0, dumpTreeLevel() >= 3); } //! Single node parameter propagation @@ -7477,5 +7477,5 @@ AstNode* V3Width::widthGenerateParamsEdit( void V3Width::widthCommit(AstNetlist* nodep) { UINFO(2, __FUNCTION__ << ": " << endl); { WidthCommitVisitor{nodep}; } // Destruct before checking - V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTree() >= 6); + V3Global::dumpCheckGlobalTree("widthcommit", 0, dumpTreeLevel() >= 6); } diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 6c6940b0c..79a38fce4 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -635,7 +635,7 @@ static void verilate(const string& argString) { } // Final steps - V3Global::dumpCheckGlobalTree("final", 990, dumpTree() >= 3); + V3Global::dumpCheckGlobalTree("final", 990, dumpTreeLevel() >= 3); V3Error::abortIfErrors();