From fb2d78520f80187c62e4b2b944fc6085ba375b90 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 7 Oct 2020 19:39:59 -0400 Subject: [PATCH] Internals: Remove redundant initial clears. No functional change intended. --- docs/internals.adoc | 4 ++-- src/V3Gate.cpp | 5 +---- src/V3SplitAs.cpp | 5 +---- src/V3Subst.cpp | 6 +----- src/V3Task.cpp | 1 - 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/docs/internals.adoc b/docs/internals.adoc index 1b237025e..fdf08a899 100644 --- a/docs/internals.adoc +++ b/docs/internals.adoc @@ -586,7 +586,7 @@ dealing with. For example a visitor might not implement separate `visit` methods for `AstIf` and `AstGenIf`, but just a single method for the base class: - void visit (AstNodeIf* nodep) + void visit(AstNodeIf* nodep) However that method might want to specify additional code if it is called for `AstGenIf`. Verilator does this by providing a `VN_IS` method for each @@ -672,7 +672,7 @@ Set to 1 to indicate that the compilation or execution is intended to fail. For example the following would specify that compilation requires two defines and is expected to fail. - compile ( + compile( verilator_flags2 => ["-DSMALL_CLOCK -DGATED_COMMENT"], fails => 1, ); diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 95aed069a..3bf82c08c 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -525,10 +525,7 @@ private: public: // CONSTRUCTORS - explicit GateVisitor(AstNode* nodep) { - AstNode::user1ClearTree(); - iterate(nodep); - } + explicit GateVisitor(AstNode* nodep) { iterate(nodep); } virtual ~GateVisitor() override { V3Stats::addStat("Optimizations, Gate sigs deleted", m_statSigs); V3Stats::addStat("Optimizations, Gate inputs replaced", m_statRefs); diff --git a/src/V3SplitAs.cpp b/src/V3SplitAs.cpp index ea7ec7a94..eb1f1d2d1 100644 --- a/src/V3SplitAs.cpp +++ b/src/V3SplitAs.cpp @@ -183,10 +183,7 @@ private: public: // CONSTRUCTORS - explicit SplitAsVisitor(AstNetlist* nodep) { - AstNode::user1ClearTree(); // user1p() used on entire tree - iterate(nodep); - } + explicit SplitAsVisitor(AstNetlist* nodep) { iterate(nodep); } virtual ~SplitAsVisitor() override { V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits); } diff --git a/src/V3Subst.cpp b/src/V3Subst.cpp index 7b5752790..636d39986 100644 --- a/src/V3Subst.cpp +++ b/src/V3Subst.cpp @@ -365,11 +365,7 @@ private: public: // CONSTRUCTORS - explicit SubstVisitor(AstNode* nodep) { - AstNode::user1ClearTree(); // user1p() used on entire tree - AstNode::user2ClearTree(); // user2p() used on entire tree - iterate(nodep); - } + explicit SubstVisitor(AstNode* nodep) { iterate(nodep); } virtual ~SubstVisitor() override { V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts); for (SubstVarEntry* ip : m_entryps) { diff --git a/src/V3Task.cpp b/src/V3Task.cpp index 392641ba4..c31598adb 100644 --- a/src/V3Task.cpp +++ b/src/V3Task.cpp @@ -1374,7 +1374,6 @@ public: // CONSTRUCTORS TaskVisitor(AstNetlist* nodep, TaskStateVisitor* statep) : m_statep{statep} { - AstNode::user1ClearTree(); iterate(nodep); } virtual ~TaskVisitor() override {}