mirror of
https://github.com/verilator/verilator.git
synced 2025-04-12 07:56:53 +00:00
Internals: Cleanup unused nodep in visitors. No functional change intended.
This commit is contained in:
parent
38a31ae168
commit
19b472cf0b
@ -79,16 +79,12 @@ private:
|
|||||||
// Simplify sensitivity list
|
// Simplify sensitivity list
|
||||||
VL_DO_DANGLING(V3Const::constifyExpensiveEdit(nodep), nodep);
|
VL_DO_DANGLING(V3Const::constifyExpensiveEdit(nodep), nodep);
|
||||||
}
|
}
|
||||||
// Empty visitors, speed things up
|
|
||||||
virtual void visit(AstNodeStmt* nodep) VL_OVERRIDE { }
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
// METHODS
|
|
||||||
public:
|
public:
|
||||||
|
// METHODS
|
||||||
AstScope* scopep() { return m_scopep; }
|
AstScope* scopep() { return m_scopep; }
|
||||||
AstActive* getCActive(FileLine* fl) {
|
AstActive* getCActive(FileLine* fl) {
|
||||||
if (!m_cActivep) {
|
if (!m_cActivep) {
|
||||||
@ -206,9 +202,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
ActiveDlyVisitor(AstNode* nodep, CheckType check) {
|
ActiveDlyVisitor(AstNode* nodep, CheckType check) {
|
||||||
@ -411,10 +406,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Empty visitors, speed things up
|
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
|
||||||
virtual void visit(AstVarScope* nodep) VL_OVERRIDE {}
|
|
||||||
//--------------------
|
//--------------------
|
||||||
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
|
virtual void visit(AstVarScope*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -127,10 +127,9 @@ private:
|
|||||||
virtual void visit(AstFinal* nodep) VL_OVERRIDE { // LCOV_EXCL_LINE
|
virtual void visit(AstFinal* nodep) VL_OVERRIDE { // LCOV_EXCL_LINE
|
||||||
nodep->v3fatalSrc("Node should have been deleted");
|
nodep->v3fatalSrc("Node should have been deleted");
|
||||||
}
|
}
|
||||||
// Empty visitors, speed things up
|
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
|
||||||
virtual void visit(AstVarScope* nodep) VL_OVERRIDE {}
|
|
||||||
//--------------------
|
//--------------------
|
||||||
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
|
virtual void visit(AstVarScope*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -380,9 +380,8 @@ private:
|
|||||||
m_beginp = lastp;
|
m_beginp = lastp;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit AssertVisitor(AstNetlist* nodep) {
|
explicit AssertVisitor(AstNetlist* nodep) {
|
||||||
|
@ -133,9 +133,7 @@ private:
|
|||||||
// Reset defaults
|
// Reset defaults
|
||||||
m_seniDefaultp = NULL;
|
m_seniDefaultp = NULL;
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -232,9 +232,8 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
m_ifDepth = prevIfDepth;
|
m_ifDepth = prevIfDepth;
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
BeginVisitor(AstNetlist* nodep, BeginState* statep) {
|
BeginVisitor(AstNetlist* nodep, BeginState* statep) {
|
||||||
@ -280,9 +279,8 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
BeginRelinkVisitor(AstNetlist* nodep, BeginState*) {
|
BeginRelinkVisitor(AstNetlist* nodep, BeginState*) {
|
||||||
|
@ -206,8 +206,10 @@ private:
|
|||||||
}
|
}
|
||||||
// VISITORS
|
// VISITORS
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
|
// Process not just iterate
|
||||||
processAndIterate(nodep);
|
processAndIterate(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit BrokenMarkVisitor(AstNetlist* nodep) {
|
explicit BrokenMarkVisitor(AstNetlist* nodep) {
|
||||||
@ -262,6 +264,7 @@ private:
|
|||||||
nodep, "Assignment LHS is not an lvalue");
|
nodep, "Assignment LHS is not an lvalue");
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
|
// Process not just iterate
|
||||||
processAndIterate(nodep);
|
processAndIterate(nodep);
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
@ -93,7 +93,7 @@ class CUseVisitor : public AstNVisitor {
|
|||||||
}
|
}
|
||||||
makeUseCells(nodep);
|
makeUseCells(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {} // All in AstNodeModule
|
virtual void visit(AstNode*) VL_OVERRIDE {} // All in AstNodeModule
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -102,9 +102,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit CaseLintVisitor(AstNodeCase* nodep) {
|
explicit CaseLintVisitor(AstNodeCase* nodep) {
|
||||||
@ -464,10 +463,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -157,13 +157,10 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NOPs
|
// NOPs
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -692,7 +692,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Math that shouldn't cause us to clear hazard
|
// Math that shouldn't cause us to clear hazard
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE { }
|
virtual void visit(AstConst*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstReplicate* nodep) VL_OVERRIDE {
|
virtual void visit(AstReplicate* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
@ -712,10 +712,10 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ignores
|
// Ignores
|
||||||
virtual void visit(AstInitial* nodep) VL_OVERRIDE { }
|
virtual void visit(AstInitial*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTraceInc* nodep) VL_OVERRIDE { }
|
virtual void visit(AstTraceInc*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstCoverToggle* nodep) VL_OVERRIDE { }
|
virtual void visit(AstCoverToggle*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeDType* nodep) VL_OVERRIDE { }
|
virtual void visit(AstNodeDType*) VL_OVERRIDE {}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
// Default
|
||||||
@ -723,9 +723,7 @@ private:
|
|||||||
setNodeHazard(nodep);
|
setNodeHazard(nodep);
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -283,14 +283,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {
|
|
||||||
// Short-circuit
|
|
||||||
}
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -425,10 +425,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -131,20 +131,16 @@ private:
|
|||||||
addCall(nodep);
|
addCall(nodep);
|
||||||
}
|
}
|
||||||
// Speed things up
|
// Speed things up
|
||||||
virtual void visit(AstNodeAssign* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeAssign*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
CombCallVisitor() {
|
CombCallVisitor()
|
||||||
m_find = false;
|
: m_find(false) {}
|
||||||
}
|
|
||||||
virtual ~CombCallVisitor() {}
|
virtual ~CombCallVisitor() {}
|
||||||
void main(AstNetlist* nodep) {
|
void main(AstNetlist* nodep) { iterate(nodep); }
|
||||||
iterate(nodep);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
@ -452,9 +448,7 @@ private:
|
|||||||
virtual void visit(AstVar*) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTraceDecl*) VL_OVERRIDE {}
|
virtual void visit(AstTraceDecl*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTraceInc*) VL_OVERRIDE {}
|
virtual void visit(AstTraceInc*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -45,9 +45,8 @@ private:
|
|||||||
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
||||||
if (nodep->varp()) nodep->varp()->user4(1);
|
if (nodep->varp()) nodep->varp()->user4(1);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit ConstVarMarkVisitor(AstNode* nodep) {
|
explicit ConstVarMarkVisitor(AstNode* nodep) {
|
||||||
@ -67,9 +66,8 @@ private:
|
|||||||
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
||||||
if (nodep->varp() && nodep->varp()->user4()) m_found = true;
|
if (nodep->varp() && nodep->varp()->user4()) m_found = true;
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit ConstVarFindVisitor(AstNode* nodep) {
|
explicit ConstVarFindVisitor(AstNode* nodep) {
|
||||||
@ -1367,7 +1365,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Special cases
|
// Special cases
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {} // Already constant
|
virtual void visit(AstConst*) VL_OVERRIDE {} // Already constant
|
||||||
|
|
||||||
virtual void visit(AstCell* nodep) VL_OVERRIDE {
|
virtual void visit(AstCell* nodep) VL_OVERRIDE {
|
||||||
if (m_params) {
|
if (m_params) {
|
||||||
@ -2155,7 +2153,7 @@ private:
|
|||||||
// These are converted by V3Param. Don't constify as we don't want the
|
// These are converted by V3Param. Don't constify as we don't want the
|
||||||
// from() VARREF to disappear, if any.
|
// from() VARREF to disappear, if any.
|
||||||
// If output of a presel didn't get consted, chances are V3Param didn't visit properly
|
// If output of a presel didn't get consted, chances are V3Param didn't visit properly
|
||||||
virtual void visit(AstNodePreSel* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodePreSel*) VL_OVERRIDE {}
|
||||||
|
|
||||||
// Ignored, can eliminate early
|
// Ignored, can eliminate early
|
||||||
virtual void visit(AstSysIgnore* nodep) VL_OVERRIDE {
|
virtual void visit(AstSysIgnore* nodep) VL_OVERRIDE {
|
||||||
|
@ -399,7 +399,6 @@ private:
|
|||||||
|
|
||||||
// VISITORS - BOTH
|
// VISITORS - BOTH
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
// Default: Just iterate
|
|
||||||
if (m_checkBlock) {
|
if (m_checkBlock) {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
m_checkBlock = true; // Reset as a child may have cleared it
|
m_checkBlock = true; // Reset as a child may have cleared it
|
||||||
|
@ -109,10 +109,8 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -58,10 +58,9 @@ private:
|
|||||||
nodep->modp()->user1Inc(-1);
|
nodep->modp()->user1Inc(-1);
|
||||||
}
|
}
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit DeadModVisitor(AstNodeModule* nodep) {
|
explicit DeadModVisitor(AstNodeModule* nodep) {
|
||||||
|
@ -451,10 +451,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -150,10 +150,8 @@ private:
|
|||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
// Default: Just iterate
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {} // Don't hit varrefs under vars
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't hit varrefs under vars
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -113,13 +113,10 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't hit varrefs under vars
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {} // Don't hit varrefs under vars
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -96,12 +96,9 @@ class EmitCInlines : EmitCBaseVisitor {
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// ACCESSORS
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EmitCInlines(AstNetlist* nodep) {
|
explicit EmitCInlines(AstNetlist* nodep) {
|
||||||
iterate(nodep);
|
iterate(nodep);
|
||||||
|
@ -337,18 +337,14 @@ class EmitCSyms : EmitCBaseVisitor {
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
m_funcp = NULL;
|
m_funcp = NULL;
|
||||||
}
|
}
|
||||||
// NOPs
|
|
||||||
virtual void visit(AstConst*) VL_OVERRIDE {}
|
|
||||||
// Default
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
// ACCESSORS
|
virtual void visit(AstConst*) VL_OVERRIDE {}
|
||||||
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit EmitCSyms(AstNetlist* nodep, bool dpiHdrOnly):
|
explicit EmitCSyms(AstNetlist* nodep, bool dpiHdrOnly)
|
||||||
m_dpiHdrOnly(dpiHdrOnly)
|
: m_dpiHdrOnly(dpiHdrOnly) {
|
||||||
{
|
|
||||||
m_funcp = NULL;
|
m_funcp = NULL;
|
||||||
m_modp = NULL;
|
m_modp = NULL;
|
||||||
m_coverBins = 0;
|
m_coverBins = 0;
|
||||||
|
@ -253,7 +253,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode*) VL_OVERRIDE {
|
||||||
// All modules are present at root so no need to iterate on children
|
// All modules are present at root so no need to iterate on children
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,9 +333,7 @@ private:
|
|||||||
m_hasChildren = true;
|
m_hasChildren = true;
|
||||||
}
|
}
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -950,11 +950,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't hit varrefs under vars
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't hit varrefs under vars
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -249,7 +249,6 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
// *** Special iterator
|
// *** Special iterator
|
||||||
if (!m_isSimple) return; // Fastpath
|
if (!m_isSimple) return; // Fastpath
|
||||||
@ -264,6 +263,7 @@ private:
|
|||||||
}
|
}
|
||||||
else iterateChildren(nodep);
|
else iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
GateOkVisitor(AstNode* nodep, bool buffersOnly, bool dedupe) {
|
GateOkVisitor(AstNode* nodep, bool buffersOnly, bool dedupe) {
|
||||||
@ -523,7 +523,6 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
if (nodep->isOutputter() && m_logicVertexp) m_logicVertexp->setConsumed("outputter");
|
if (nodep->isOutputter() && m_logicVertexp) m_logicVertexp->setConsumed("outputter");
|
||||||
@ -884,9 +883,8 @@ private:
|
|||||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
virtual ~GateElimVisitor() {}
|
virtual ~GateElimVisitor() {}
|
||||||
@ -1440,10 +1438,8 @@ private:
|
|||||||
iterate(nodep->lhsp());
|
iterate(nodep->lhsp());
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
GateConcatVisitor() {
|
GateConcatVisitor() {
|
||||||
@ -1624,11 +1620,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Speedups
|
// Speedups
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstActive* nodep) VL_OVERRIDE {}
|
virtual void visit(AstActive*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -117,9 +117,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
GenClkRenameVisitor(AstTopScope* nodep, AstNodeModule* topModp) {
|
GenClkRenameVisitor(AstTopScope* nodep, AstNodeModule* topModp) {
|
||||||
@ -216,9 +215,8 @@ private:
|
|||||||
|
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit GenClkReadVisitor(AstNetlist* nodep)
|
explicit GenClkReadVisitor(AstNetlist* nodep)
|
||||||
|
@ -83,23 +83,23 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTypedef*) VL_OVERRIDE {}
|
virtual void visit(AstTypedef*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstParamTypeDType*) VL_OVERRIDE {}
|
virtual void visit(AstParamTypeDType*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
|
// Hash not just iterate
|
||||||
nodeHashIterate(nodep);
|
nodeHashIterate(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit HashedVisitor(AstNode* nodep) {
|
explicit HashedVisitor(AstNode* nodep)
|
||||||
m_cacheInUser4 = true;
|
: m_cacheInUser4(true) {
|
||||||
nodeHashIterate(nodep);
|
nodeHashIterate(nodep);
|
||||||
//UINFO(9," stmthash "<<hex<<V3Hashed::nodeHash(nodep)<<" "<<nodep<<endl);
|
// UINFO(9," stmthash "<<hex<<V3Hashed::nodeHash(nodep)<<" "<<nodep<<endl);
|
||||||
}
|
}
|
||||||
explicit HashedVisitor(const AstNode* nodep) {
|
explicit HashedVisitor(const AstNode* nodep)
|
||||||
m_cacheInUser4 = false;
|
: m_cacheInUser4(false) {
|
||||||
nodeHashIterate(const_cast<AstNode*>(nodep));
|
nodeHashIterate(const_cast<AstNode*>(nodep));
|
||||||
}
|
}
|
||||||
V3Hash finalHash() const { return m_lowerHash; }
|
V3Hash finalHash() const { return m_lowerHash; }
|
||||||
|
@ -205,7 +205,6 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
if (m_modp) {
|
if (m_modp) {
|
||||||
@ -245,9 +244,9 @@ private:
|
|||||||
virtual void visit(AstCell* nodep) VL_OVERRIDE {
|
virtual void visit(AstCell* nodep) VL_OVERRIDE {
|
||||||
nodep->user4p(nodep->clonep());
|
nodep->user4p(nodep->clonep());
|
||||||
}
|
}
|
||||||
// Accelerate
|
//--------------------
|
||||||
virtual void visit(AstNodeStmt* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -605,8 +604,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeStmt* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -125,10 +125,8 @@ private:
|
|||||||
virtual void visit(AstAlways*) VL_OVERRIDE {}
|
virtual void visit(AstAlways*) VL_OVERRIDE {}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit InstVisitor(AstNetlist* nodep) {
|
explicit InstVisitor(AstNetlist* nodep) {
|
||||||
@ -158,12 +156,9 @@ private:
|
|||||||
}
|
}
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
// Save some time
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// METHODS
|
// METHODS
|
||||||
void insert(AstVar* nodep) {
|
void insert(AstVar* nodep) {
|
||||||
@ -442,13 +437,10 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save some time
|
|
||||||
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit InstDeVisitor(AstNetlist* nodep) {
|
explicit InstDeVisitor(AstNetlist* nodep) {
|
||||||
|
@ -434,9 +434,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -489,9 +487,8 @@ private:
|
|||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
LifeTopVisitor(AstNetlist* nodep, LifeState* statep) {
|
LifeTopVisitor(AstNetlist* nodep, LifeState* statep) {
|
||||||
|
@ -87,9 +87,8 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LifePostElimVisitor(AstTopScope* nodep)
|
explicit LifePostElimVisitor(AstTopScope* nodep)
|
||||||
@ -342,9 +341,8 @@ private:
|
|||||||
}
|
}
|
||||||
//-----
|
//-----
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't want varrefs under it
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LifePostDlyVisitor(AstNetlist* nodep)
|
explicit LifePostDlyVisitor(AstNetlist* nodep)
|
||||||
|
@ -446,11 +446,8 @@ private:
|
|||||||
|
|
||||||
// Accelerate the recursion
|
// Accelerate the recursion
|
||||||
// Must do statements to support Generates, math though...
|
// Must do statements to support Generates, math though...
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
// METHODS
|
// METHODS
|
||||||
void readModNames() {
|
void readModNames() {
|
||||||
|
@ -753,7 +753,7 @@ class LinkDotFindVisitor : public AstNVisitor {
|
|||||||
m_curSymp = m_modSymp = NULL;
|
m_curSymp = m_modSymp = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstTypeTable* nodep) VL_OVERRIDE {}
|
virtual void visit(AstTypeTable*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
||||||
// Called on top module from Netlist, other modules from the cell creating them,
|
// Called on top module from Netlist, other modules from the cell creating them,
|
||||||
// and packages
|
// and packages
|
||||||
@ -1180,10 +1180,7 @@ class LinkDotFindVisitor : public AstNVisitor {
|
|||||||
// No longer needed, but can't delete until any multi-instantiated modules are expanded
|
// No longer needed, but can't delete until any multi-instantiated modules are expanded
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -1244,7 +1241,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VISITs
|
// VISITs
|
||||||
virtual void visit(AstTypeTable* nodep) VL_OVERRIDE {}
|
virtual void visit(AstTypeTable*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
||||||
UINFO(5," "<<nodep<<endl);
|
UINFO(5," "<<nodep<<endl);
|
||||||
if (nodep->dead() || !nodep->user4()) {
|
if (nodep->dead() || !nodep->user4()) {
|
||||||
@ -1358,10 +1355,8 @@ private:
|
|||||||
// We only needed the forward declaration in order to parse correctly.
|
// We only needed the forward declaration in order to parse correctly.
|
||||||
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
|
VL_DO_DANGLING(nodep->unlinkFrBack()->deleteTree(), nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -1508,10 +1503,7 @@ class LinkDotScopeVisitor : public AstNVisitor {
|
|||||||
virtual void visit(AstCell*) VL_OVERRIDE {}
|
virtual void visit(AstCell*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstVar*) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -1596,10 +1588,7 @@ class LinkDotIfaceVisitor : public AstNVisitor {
|
|||||||
nodep->unlinkFrBack(); VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
nodep->unlinkFrBack(); VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -1777,7 +1766,7 @@ private:
|
|||||||
// Recurse..., backward as must do packages before using packages
|
// Recurse..., backward as must do packages before using packages
|
||||||
iterateChildrenBackwards(nodep);
|
iterateChildrenBackwards(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstTypeTable* nodep) VL_OVERRIDE {}
|
virtual void visit(AstTypeTable*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
||||||
if (nodep->dead()) return;
|
if (nodep->dead()) return;
|
||||||
checkNoDot(nodep);
|
checkNoDot(nodep);
|
||||||
@ -2578,10 +2567,10 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
// Default: Just iterate
|
|
||||||
checkNoDot(nodep);
|
checkNoDot(nodep);
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
LinkDotResolveVisitor(AstNetlist* rootp, LinkDotState* statep) {
|
LinkDotResolveVisitor(AstNetlist* rootp, LinkDotState* statep) {
|
||||||
|
@ -243,11 +243,9 @@ private:
|
|||||||
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
||||||
if (m_loopInc && nodep->varp()) nodep->varp()->usedLoopIdx(true);
|
if (m_loopInc && nodep->varp()) nodep->varp()->usedLoopIdx(true);
|
||||||
}
|
}
|
||||||
|
virtual void visit(AstConst*) VL_OVERRIDE {}
|
||||||
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {}
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LinkJumpVisitor(AstNetlist* nodep) {
|
explicit LinkJumpVisitor(AstNetlist* nodep) {
|
||||||
|
@ -266,10 +266,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -453,10 +453,7 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -502,13 +499,9 @@ private:
|
|||||||
if (nodep->modp()->modPublic()) m_modp->modPublic(true);
|
if (nodep->modp()->modPublic()) m_modp->modPublic(true);
|
||||||
//** No iteration for speed
|
//** No iteration for speed
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
// Speedup
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
}
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LinkBotupVisitor(AstNetlist* rootp) {
|
explicit LinkBotupVisitor(AstNetlist* rootp) {
|
||||||
|
@ -80,9 +80,8 @@ private:
|
|||||||
nodep->hierThis(true);
|
nodep->hierThis(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LocalizeDehierVisitor(AstNetlist* nodep) {
|
explicit LocalizeDehierVisitor(AstNetlist* nodep) {
|
||||||
@ -220,9 +219,8 @@ private:
|
|||||||
}
|
}
|
||||||
// No iterate; Don't want varrefs under it
|
// No iterate; Don't want varrefs under it
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit LocalizeVisitor(AstNetlist* nodep) {
|
explicit LocalizeVisitor(AstNetlist* nodep) {
|
||||||
|
@ -130,9 +130,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit NameVisitor(AstNetlist* nodep) {
|
explicit NameVisitor(AstNetlist* nodep) {
|
||||||
|
@ -362,9 +362,7 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
m_inClocked = false;
|
m_inClocked = false;
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -399,15 +397,14 @@ private:
|
|||||||
}
|
}
|
||||||
iterateChildren(nodep->rhsp());
|
iterateChildren(nodep->rhsp());
|
||||||
}
|
}
|
||||||
virtual void visit(AstVarRef* nodep) VL_OVERRIDE {
|
virtual void visit(AstVarRef*) VL_OVERRIDE {
|
||||||
// Previous versions checked attrClocker() here, but this breaks
|
// Previous versions checked attrClocker() here, but this breaks
|
||||||
// the updated t_clocker VCD test.
|
// the updated t_clocker VCD test.
|
||||||
// If reenable this visitor note AstNodeMath short circuit below
|
// If reenable this visitor note AstNodeMath short circuit below
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit OrderClkAssVisitor(AstNode* nodep) {
|
explicit OrderClkAssVisitor(AstNode* nodep) {
|
||||||
@ -1250,10 +1247,8 @@ private:
|
|||||||
// on the next evaluation loop.
|
// on the next evaluation loop.
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
OrderVisitor() {
|
OrderVisitor() {
|
||||||
|
@ -545,10 +545,7 @@ private:
|
|||||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -1779,9 +1779,7 @@ private:
|
|||||||
m_tracingCall = true;
|
m_tracingCall = true;
|
||||||
iterate(nodep->funcp());
|
iterate(nodep->funcp());
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -69,9 +69,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
@ -359,7 +357,8 @@ private:
|
|||||||
checkNode(nodep);
|
checkNode(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {
|
virtual void visit(AstConst* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep); checkNode(nodep);
|
iterateChildren(nodep);
|
||||||
|
checkNode(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNodeCond* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeCond* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
@ -407,10 +406,8 @@ private:
|
|||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
// Default: Just iterate
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {} // Don't hit varrefs under vars
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Don't hit varrefs under vars
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -363,7 +363,7 @@ class ProtectVisitor : public AstNVisitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { }
|
virtual void visit(AstNode*) VL_OVERRIDE {}
|
||||||
|
|
||||||
string cInputConnection(AstVar* varp) {
|
string cInputConnection(AstVar* varp) {
|
||||||
string frstmt;
|
string frstmt;
|
||||||
|
@ -222,12 +222,9 @@ private:
|
|||||||
UINFO(9, "Start merge i="<<index<<" "<<nodep<<endl);
|
UINFO(9, "Start merge i="<<index<<" "<<nodep<<endl);
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstVar*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {} // Speedup
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {} // Speedup
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -289,10 +289,8 @@ private:
|
|||||||
// Want to ignore blocks under it, so just do nothing
|
// Want to ignore blocks under it, so just do nothing
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit ScopeVisitor(AstNetlist* nodep) {
|
explicit ScopeVisitor(AstNetlist* nodep) {
|
||||||
@ -395,10 +393,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit ScopeCleanupVisitor(AstNetlist* nodep) {
|
explicit ScopeCleanupVisitor(AstNetlist* nodep) {
|
||||||
|
@ -121,11 +121,10 @@ private:
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstSenTree* nodep) VL_OVERRIDE { m_trees.add(nodep); }
|
virtual void visit(AstSenTree* nodep) VL_OVERRIDE { m_trees.add(nodep); }
|
||||||
// Empty visitors, speed things up
|
|
||||||
virtual void visit(AstNodeStmt* nodep) VL_OVERRIDE { }
|
virtual void visit(AstNodeStmt*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
// METHODS
|
// METHODS
|
||||||
public:
|
public:
|
||||||
void clear() {
|
void clear() {
|
||||||
|
@ -225,10 +225,7 @@ class SliceVisitor : public AstNVisitor {
|
|||||||
expandBiOp(nodep);
|
expandBiOp(nodep);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
// Default: Just iterate
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -825,12 +825,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual ~RemovePlaceholdersVisitor() {}
|
virtual ~RemovePlaceholdersVisitor() {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
virtual void visit(AstSplitPlaceholder* nodep) VL_OVERRIDE {
|
virtual void visit(AstSplitPlaceholder* nodep) VL_OVERRIDE {
|
||||||
m_removeSet.insert(nodep);
|
m_removeSet.insert(nodep);
|
||||||
}
|
}
|
||||||
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VL_UNCOPYABLE(RemovePlaceholdersVisitor);
|
VL_UNCOPYABLE(RemovePlaceholdersVisitor);
|
||||||
};
|
};
|
||||||
|
@ -57,9 +57,8 @@ private:
|
|||||||
m_splitVscp = nodep->varScopep();
|
m_splitVscp = nodep->varScopep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit SplitAsFindVisitor(AstAlways* nodep) {
|
explicit SplitAsFindVisitor(AstAlways* nodep) {
|
||||||
@ -117,9 +116,8 @@ private:
|
|||||||
m_keepStmt = oldKeep || m_keepStmt;
|
m_keepStmt = oldKeep || m_keepStmt;
|
||||||
UINFO(9," upKeep="<<m_keepStmt<<" STMT "<<nodep<<endl);
|
UINFO(9," upKeep="<<m_keepStmt<<" STMT "<<nodep<<endl);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
SplitAsCleanVisitor(AstAlways* nodep, AstVarScope* vscp, bool modeMatch) {
|
SplitAsCleanVisitor(AstAlways* nodep, AstVarScope* vscp, bool modeMatch) {
|
||||||
@ -190,11 +188,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Speedup; no always under math
|
// Speedup; no always under math
|
||||||
virtual void visit(AstNodeMath* nodep) VL_OVERRIDE {}
|
virtual void visit(AstNodeMath*) VL_OVERRIDE {}
|
||||||
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -985,7 +985,6 @@ class SplitPackedVarVisitor : public AstNVisitor, public SplitVarImpl {
|
|||||||
int m_numSplit; // Total number of split variables
|
int m_numSplit; // Total number of split variables
|
||||||
// key:variable to be split. value:location where the variable is referenced.
|
// key:variable to be split. value:location where the variable is referenced.
|
||||||
vl_unordered_map<AstVar*, PackedVarRef> m_refs;
|
vl_unordered_map<AstVar*, PackedVarRef> m_refs;
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
|
||||||
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
virtual void visit(AstNodeModule* nodep) VL_OVERRIDE {
|
||||||
UASSERT_OBJ(m_modp == NULL, m_modp, "Nested module declration");
|
UASSERT_OBJ(m_modp == NULL, m_modp, "Nested module declration");
|
||||||
if (!VN_IS(nodep, Module)) {
|
if (!VN_IS(nodep, Module)) {
|
||||||
@ -1063,6 +1062,8 @@ class SplitPackedVarVisitor : public AstNVisitor, public SplitVarImpl {
|
|||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
|
|
||||||
// Extract necessary bit range from a newly created variable to meet ref
|
// Extract necessary bit range from a newly created variable to meet ref
|
||||||
static AstNode* extractBits(const PackedVarRefEntry& ref, const SplitNewVar& var,
|
static AstNode* extractBits(const PackedVarRefEntry& ref, const SplitNewVar& var,
|
||||||
bool lvalue) {
|
bool lvalue) {
|
||||||
|
@ -202,10 +202,9 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {} // Accelerate
|
virtual void visit(AstConst*) VL_OVERRIDE {} // Accelerate
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
SubstUseVisitor(AstNode* nodep, int origStep) {
|
SubstUseVisitor(AstNode* nodep, int origStep) {
|
||||||
@ -362,8 +361,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstVar* nodep) VL_OVERRIDE {}
|
virtual void visit(AstVar*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {}
|
virtual void visit(AstConst*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
||||||
m_ops++;
|
m_ops++;
|
||||||
if (!nodep->isSubstOptimizable()) {
|
if (!nodep->isSubstOptimizable()) {
|
||||||
|
@ -450,16 +450,14 @@ private:
|
|||||||
VL_DO_DANGLING(createTable(nodep), nodep);
|
VL_DO_DANGLING(createTable(nodep), nodep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstAssignAlias* nodep) VL_OVERRIDE {}
|
virtual void visit(AstAssignAlias*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstAssignW* nodep) VL_OVERRIDE {
|
virtual void visit(AstAssignW* nodep) VL_OVERRIDE {
|
||||||
// It's nearly impossible to have a large enough assign to make this worthwhile
|
// It's nearly impossible to have a large enough assign to make this worthwhile
|
||||||
// For now we won't bother.
|
// For now we won't bother.
|
||||||
// Accelerated: no iterate
|
// Accelerated: no iterate
|
||||||
}
|
}
|
||||||
// default
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit TableVisitor(AstNetlist* nodep) {
|
explicit TableVisitor(AstNetlist* nodep) {
|
||||||
|
@ -230,10 +230,8 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit TaskStateVisitor(AstNetlist* nodep) {
|
explicit TaskStateVisitor(AstNetlist* nodep) {
|
||||||
@ -275,9 +273,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit TaskRelinkVisitor(AstBegin* nodep) { // Passed temporary tree
|
explicit TaskRelinkVisitor(AstBegin* nodep) { // Passed temporary tree
|
||||||
@ -1289,10 +1286,7 @@ private:
|
|||||||
m_insStmtp = NULL; // Next thing should be new statement
|
m_insStmtp = NULL; // Next thing should be new statement
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -726,9 +726,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -359,9 +359,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------
|
//--------------------
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -306,9 +306,8 @@ class TristatePinVisitor : public TristateBaseVisitor {
|
|||||||
UASSERT_OBJ(!m_lvalue, nodep, "SliceSel conversion to output, under tristate node");
|
UASSERT_OBJ(!m_lvalue, nodep, "SliceSel conversion to output, under tristate node");
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
TristatePinVisitor(AstNode* nodep, TristateGraph& tgraph, bool lvalue)
|
TristatePinVisitor(AstNode* nodep, TristateGraph& tgraph, bool lvalue)
|
||||||
|
@ -414,20 +414,19 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Until we support tables, primitives will have undriven and unused I/Os
|
// Until we support tables, primitives will have undriven and unused I/Os
|
||||||
virtual void visit(AstPrimitive* nodep) VL_OVERRIDE {}
|
virtual void visit(AstPrimitive*) VL_OVERRIDE {}
|
||||||
|
|
||||||
// Coverage artifacts etc shouldn't count as a sink
|
// Coverage artifacts etc shouldn't count as a sink
|
||||||
virtual void visit(AstCoverDecl* nodep) VL_OVERRIDE {}
|
virtual void visit(AstCoverDecl*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstCoverInc* nodep) VL_OVERRIDE {}
|
virtual void visit(AstCoverInc*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstCoverToggle* nodep) VL_OVERRIDE {}
|
virtual void visit(AstCoverToggle*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTraceDecl* nodep) VL_OVERRIDE {}
|
virtual void visit(AstTraceDecl*) VL_OVERRIDE {}
|
||||||
virtual void visit(AstTraceInc* nodep) VL_OVERRIDE {}
|
virtual void visit(AstTraceInc*) VL_OVERRIDE {}
|
||||||
|
|
||||||
// iterate
|
// iterate
|
||||||
virtual void visit(AstConst* nodep) VL_OVERRIDE {}
|
virtual void visit(AstConst* nodep) VL_OVERRIDE {}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
explicit UndrivenVisitor(AstNetlist* nodep) {
|
explicit UndrivenVisitor(AstNetlist* nodep) {
|
||||||
|
@ -452,10 +452,7 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//--------------------
|
//--------------------
|
||||||
// Default: Just iterate
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
|
@ -34,6 +34,14 @@
|
|||||||
|
|
||||||
class WidthRemoveVisitor : public AstNVisitor {
|
class WidthRemoveVisitor : public AstNVisitor {
|
||||||
private:
|
private:
|
||||||
|
// METHODS
|
||||||
|
void replaceWithSignedVersion(AstNode* nodep, AstNode* newp) {
|
||||||
|
UINFO(6, " Replace " << nodep << " w/ " << newp << endl);
|
||||||
|
nodep->replaceWith(newp);
|
||||||
|
newp->dtypeFrom(nodep);
|
||||||
|
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||||
|
}
|
||||||
|
|
||||||
// VISITORS
|
// VISITORS
|
||||||
virtual void visit(AstSigned* nodep) VL_OVERRIDE {
|
virtual void visit(AstSigned* nodep) VL_OVERRIDE {
|
||||||
VL_DO_DANGLING(replaceWithSignedVersion(nodep, nodep->lhsp()->unlinkFrBack()), nodep);
|
VL_DO_DANGLING(replaceWithSignedVersion(nodep, nodep->lhsp()->unlinkFrBack()), nodep);
|
||||||
@ -41,15 +49,8 @@ private:
|
|||||||
virtual void visit(AstUnsigned* nodep) VL_OVERRIDE {
|
virtual void visit(AstUnsigned* nodep) VL_OVERRIDE {
|
||||||
VL_DO_DANGLING(replaceWithSignedVersion(nodep, nodep->lhsp()->unlinkFrBack()), nodep);
|
VL_DO_DANGLING(replaceWithSignedVersion(nodep, nodep->lhsp()->unlinkFrBack()), nodep);
|
||||||
}
|
}
|
||||||
virtual void visit(AstNode* nodep) VL_OVERRIDE {
|
virtual void visit(AstNode* nodep) VL_OVERRIDE { iterateChildren(nodep); }
|
||||||
iterateChildren(nodep);
|
|
||||||
}
|
|
||||||
void replaceWithSignedVersion(AstNode* nodep, AstNode* newp) {
|
|
||||||
UINFO(6," Replace "<<nodep<<" w/ "<<newp<<endl);
|
|
||||||
nodep->replaceWith(newp);
|
|
||||||
newp->dtypeFrom(nodep);
|
|
||||||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
|
||||||
}
|
|
||||||
public:
|
public:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
WidthRemoveVisitor() {}
|
WidthRemoveVisitor() {}
|
||||||
|
Loading…
Reference in New Issue
Block a user