Internals: Remove redundant initial clears. No functional change intended.

This commit is contained in:
Wilson Snyder 2020-10-07 19:39:59 -04:00
parent c5da072ff6
commit fb2d78520f
5 changed files with 5 additions and 16 deletions

View File

@ -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 methods for `AstIf` and `AstGenIf`, but just a single method for the base
class: class:
void visit (AstNodeIf* nodep) void visit(AstNodeIf* nodep)
However that method might want to specify additional code if it is called 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 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 For example the following would specify that compilation requires two
defines and is expected to fail. defines and is expected to fail.
compile ( compile(
verilator_flags2 => ["-DSMALL_CLOCK -DGATED_COMMENT"], verilator_flags2 => ["-DSMALL_CLOCK -DGATED_COMMENT"],
fails => 1, fails => 1,
); );

View File

@ -525,10 +525,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit GateVisitor(AstNode* nodep) { explicit GateVisitor(AstNode* nodep) { iterate(nodep); }
AstNode::user1ClearTree();
iterate(nodep);
}
virtual ~GateVisitor() override { virtual ~GateVisitor() override {
V3Stats::addStat("Optimizations, Gate sigs deleted", m_statSigs); V3Stats::addStat("Optimizations, Gate sigs deleted", m_statSigs);
V3Stats::addStat("Optimizations, Gate inputs replaced", m_statRefs); V3Stats::addStat("Optimizations, Gate inputs replaced", m_statRefs);

View File

@ -183,10 +183,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit SplitAsVisitor(AstNetlist* nodep) { explicit SplitAsVisitor(AstNetlist* nodep) { iterate(nodep); }
AstNode::user1ClearTree(); // user1p() used on entire tree
iterate(nodep);
}
virtual ~SplitAsVisitor() override { virtual ~SplitAsVisitor() override {
V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits); V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits);
} }

View File

@ -365,11 +365,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit SubstVisitor(AstNode* nodep) { explicit SubstVisitor(AstNode* nodep) { iterate(nodep); }
AstNode::user1ClearTree(); // user1p() used on entire tree
AstNode::user2ClearTree(); // user2p() used on entire tree
iterate(nodep);
}
virtual ~SubstVisitor() override { virtual ~SubstVisitor() override {
V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts); V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts);
for (SubstVarEntry* ip : m_entryps) { for (SubstVarEntry* ip : m_entryps) {

View File

@ -1374,7 +1374,6 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
TaskVisitor(AstNetlist* nodep, TaskStateVisitor* statep) TaskVisitor(AstNetlist* nodep, TaskStateVisitor* statep)
: m_statep{statep} { : m_statep{statep} {
AstNode::user1ClearTree();
iterate(nodep); iterate(nodep);
} }
virtual ~TaskVisitor() override {} virtual ~TaskVisitor() override {}