Internals: Remove unused append dumpTreeFile option

This commit is contained in:
Wilson Snyder 2023-11-21 22:32:13 -05:00
parent 0ee2a0e6d7
commit 1986e62477
3 changed files with 8 additions and 9 deletions

View File

@ -1273,12 +1273,12 @@ void AstNode::dumpTreeAndNext(std::ostream& os, const string& indent, int maxDep
}
}
void AstNode::dumpTreeFile(const string& filename, bool append, bool doDump, bool doCheck) {
void AstNode::dumpTreeFile(const string& filename, bool doDump, bool doCheck) {
// Not const function as calls checkTree
if (doDump) {
{ // Write log & close
UINFO(2, "Dumping " << filename << endl);
const std::unique_ptr<std::ofstream> logsp{V3File::new_ofstream(filename, append)};
const std::unique_ptr<std::ofstream> logsp{V3File::new_ofstream(filename)};
if (logsp->fail()) v3fatal("Can't write " << filename);
*logsp << "Verilator Tree Dump (format 0x3900) from <e" << std::dec << editCountLast();
*logsp << "> to <e" << std::dec << editCountGbl() << ">\n";
@ -1328,10 +1328,10 @@ void AstNode::dumpTreeDot(std::ostream& os) const {
drawChildren(os, this, m_op4p, "op4");
}
void AstNode::dumpTreeDotFile(const string& filename, bool append, bool doDump) {
void AstNode::dumpTreeDotFile(const string& filename, bool doDump) {
if (doDump) {
UINFO(2, "Dumping " << filename << endl);
const std::unique_ptr<std::ofstream> treedotp{V3File::new_ofstream(filename, append)};
const std::unique_ptr<std::ofstream> treedotp{V3File::new_ofstream(filename)};
if (treedotp->fail()) v3fatal("Can't write " << filename);
*treedotp << "digraph vTree{\n";
*treedotp << "\tgraph\t[label=\"" << filename + ".dot"

View File

@ -2211,11 +2211,10 @@ public:
static void dumpTreeGdb(const AstNode* nodep); // For GDB only
void dumpTreeAndNext(std::ostream& os = std::cout, const string& indent = " ",
int maxDepth = 0) const;
void dumpTreeFile(const string& filename, bool append = false, bool doDump = true,
bool doCheck = true);
void dumpTreeFile(const string& filename, bool doDump = true, bool doCheck = true);
static void dumpTreeFileGdb(const AstNode* nodep, const char* filenamep = nullptr);
void dumpTreeDot(std::ostream& os = std::cout) const;
void dumpTreeDotFile(const string& filename, bool append = false, bool doDump = true);
void dumpTreeDotFile(const string& filename, bool doDump = true);
// METHODS - static advancement
static AstNode* afterCommentp(AstNode* nodep) {

View File

@ -106,9 +106,9 @@ string V3Global::digitsFilename(int number) {
void V3Global::dumpCheckGlobalTree(const string& stagename, int newNumber, bool doDump) {
const string treeFilename = v3Global.debugFilename(stagename + ".tree", newNumber);
v3Global.rootp()->dumpTreeFile(treeFilename, false, doDump);
v3Global.rootp()->dumpTreeFile(treeFilename, doDump);
if (v3Global.opt.dumpTreeDot()) {
v3Global.rootp()->dumpTreeDotFile(treeFilename + ".dot", false, doDump);
v3Global.rootp()->dumpTreeDotFile(treeFilename + ".dot", doDump);
}
if (v3Global.opt.stats()) V3Stats::statsStage(stagename);
}