C++11: Use override where possible. No functional change.

This commit is contained in:
Wilson Snyder 2020-08-15 11:44:10 -04:00
parent ea4031cbd3
commit 042d3eed23
83 changed files with 2905 additions and 2798 deletions

View File

@ -63,11 +63,11 @@ protected:
// Implementation of VerilatedTrace interface // Implementation of VerilatedTrace interface
// Implementations of protected virtual methods for VerilatedTrace // Implementations of protected virtual methods for VerilatedTrace
void emitTimeChange(vluint64_t timeui) override; virtual void emitTimeChange(vluint64_t timeui) override;
// Hooks called from VerilatedTrace // Hooks called from VerilatedTrace
bool preFullDump() override { return isOpen(); } virtual bool preFullDump() override { return isOpen(); }
bool preChangeDump() override { return isOpen(); } virtual bool preChangeDump() override { return isOpen(); }
// Implementations of duck-typed methods for VerilatedTrace. These are // Implementations of duck-typed methods for VerilatedTrace. These are
// called from only one place (namely full*) so always inline them. // called from only one place (namely full*) so always inline them.

View File

@ -113,11 +113,11 @@ protected:
// Implementation of VerilatedTrace interface // Implementation of VerilatedTrace interface
// Implementations of protected virtual methods for VerilatedTrace // Implementations of protected virtual methods for VerilatedTrace
void emitTimeChange(vluint64_t timeui) override; virtual void emitTimeChange(vluint64_t timeui) override;
// Hooks called from VerilatedTrace // Hooks called from VerilatedTrace
bool preFullDump() override { return isOpen(); } virtual bool preFullDump() override { return isOpen(); }
bool preChangeDump() override; virtual bool preChangeDump() override;
// Implementations of duck-typed methods for VerilatedTrace. These are // Implementations of duck-typed methods for VerilatedTrace. These are
// called from only one place (namely full*) so always inline them. // called from only one place (namely full*) so always inline them.

View File

@ -114,11 +114,11 @@ public:
m_value.format = cbDatap->value ? cbDatap->value->format : vpiSuppressVal; m_value.format = cbDatap->value ? cbDatap->value->format : vpiSuppressVal;
m_cbData.value = &m_value; m_cbData.value = &m_value;
} }
virtual ~VerilatedVpioCb() {} virtual ~VerilatedVpioCb() override {}
static inline VerilatedVpioCb* castp(vpiHandle h) { static inline VerilatedVpioCb* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioCb*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioCb*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiCallback; } virtual vluint32_t type() const override { return vpiCallback; }
vluint32_t reason() const { return m_cbData.reason; } vluint32_t reason() const { return m_cbData.reason; }
VerilatedPliCb cb_rtnp() const { return m_cbData.cb_rtn; } VerilatedPliCb cb_rtnp() const { return m_cbData.cb_rtn; }
t_cb_data* cb_datap() { return &(m_cbData); } t_cb_data* cb_datap() { return &(m_cbData); }
@ -131,11 +131,11 @@ class VerilatedVpioConst : public VerilatedVpio {
public: public:
explicit VerilatedVpioConst(vlsint32_t num) explicit VerilatedVpioConst(vlsint32_t num)
: m_num(num) {} : m_num(num) {}
virtual ~VerilatedVpioConst() {} virtual ~VerilatedVpioConst() override {}
static inline VerilatedVpioConst* castp(vpiHandle h) { static inline VerilatedVpioConst* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioConst*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioConst*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiConstant; } virtual vluint32_t type() const override { return vpiConstant; }
vlsint32_t num() const { return m_num; } vlsint32_t num() const { return m_num; }
}; };
@ -148,17 +148,17 @@ public:
: m_varp(varp) : m_varp(varp)
, m_scopep(scopep) {} , m_scopep(scopep) {}
virtual ~VerilatedVpioParam() {} virtual ~VerilatedVpioParam() override {}
static inline VerilatedVpioParam* castp(vpiHandle h) { static inline VerilatedVpioParam* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioParam*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioParam*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiParameter; } virtual vluint32_t type() const override { return vpiParameter; }
const VerilatedVar* varp() const { return m_varp; } const VerilatedVar* varp() const { return m_varp; }
void* varDatap() const { return m_varp->datap(); } void* varDatap() const { return m_varp->datap(); }
const VerilatedScope* scopep() const { return m_scopep; } const VerilatedScope* scopep() const { return m_scopep; }
virtual const char* name() const { return m_varp->name(); } virtual const char* name() const override { return m_varp->name(); }
virtual const char* fullname() const { virtual const char* fullname() const override {
static VL_THREAD_LOCAL std::string out; static VL_THREAD_LOCAL std::string out;
out = std::string(m_scopep->name()) + "." + name(); out = std::string(m_scopep->name()) + "." + name();
return out.c_str(); return out.c_str();
@ -173,16 +173,16 @@ public:
explicit VerilatedVpioRange(const VerilatedRange* range) explicit VerilatedVpioRange(const VerilatedRange* range)
: m_range(range) : m_range(range)
, m_iteration(0) {} , m_iteration(0) {}
virtual ~VerilatedVpioRange() {} virtual ~VerilatedVpioRange() override {}
static inline VerilatedVpioRange* castp(vpiHandle h) { static inline VerilatedVpioRange* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioRange*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioRange*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiRange; } virtual vluint32_t type() const override { return vpiRange; }
virtual vluint32_t size() const { return m_range->elements(); } virtual vluint32_t size() const override { return m_range->elements(); }
virtual const VerilatedRange* rangep() const { return m_range; } virtual const VerilatedRange* rangep() const override { return m_range; }
int iteration() const { return m_iteration; } int iteration() const { return m_iteration; }
void iterationInc() { ++m_iteration; } void iterationInc() { ++m_iteration; }
virtual vpiHandle dovpi_scan() { virtual vpiHandle dovpi_scan() override {
if (!iteration()) { if (!iteration()) {
VerilatedVpioRange* nextp = new VerilatedVpioRange(*this); VerilatedVpioRange* nextp = new VerilatedVpioRange(*this);
nextp->iterationInc(); nextp->iterationInc();
@ -199,14 +199,14 @@ protected:
public: public:
explicit VerilatedVpioScope(const VerilatedScope* scopep) explicit VerilatedVpioScope(const VerilatedScope* scopep)
: m_scopep(scopep) {} : m_scopep(scopep) {}
virtual ~VerilatedVpioScope() {} virtual ~VerilatedVpioScope() override {}
static inline VerilatedVpioScope* castp(vpiHandle h) { static inline VerilatedVpioScope* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioScope*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioScope*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiScope; } virtual vluint32_t type() const override { return vpiScope; }
const VerilatedScope* scopep() const { return m_scopep; } const VerilatedScope* scopep() const { return m_scopep; }
virtual const char* name() const { return m_scopep->name(); } virtual const char* name() const override { return m_scopep->name(); }
virtual const char* fullname() const { return m_scopep->name(); } virtual const char* fullname() const override { return m_scopep->name(); }
}; };
class VerilatedVpioVar : public VerilatedVpio { class VerilatedVpioVar : public VerilatedVpio {
@ -236,7 +236,7 @@ public:
m_entSize = varp->entSize(); m_entSize = varp->entSize();
m_varDatap = varp->datap(); m_varDatap = varp->datap();
} }
virtual ~VerilatedVpioVar() { virtual ~VerilatedVpioVar() override {
if (m_prevDatap) VL_DO_CLEAR(delete[] m_prevDatap, m_prevDatap = nullptr); if (m_prevDatap) VL_DO_CLEAR(delete[] m_prevDatap, m_prevDatap = nullptr);
} }
static inline VerilatedVpioVar* castp(vpiHandle h) { static inline VerilatedVpioVar* castp(vpiHandle h) {
@ -248,13 +248,13 @@ public:
vluint8_t mask_byte(int idx) { return m_mask.u8[idx & 3]; } vluint8_t mask_byte(int idx) { return m_mask.u8[idx & 3]; }
vluint32_t entSize() const { return m_entSize; } vluint32_t entSize() const { return m_entSize; }
vluint32_t index() { return m_index; } vluint32_t index() { return m_index; }
virtual vluint32_t type() const { virtual vluint32_t type() const override {
return (varp()->dims() > 1) ? vpiMemory : vpiReg; // but might be wire, logic return (varp()->dims() > 1) ? vpiMemory : vpiReg; // but might be wire, logic
} }
virtual vluint32_t size() const { return get_range().elements(); } virtual vluint32_t size() const override { return get_range().elements(); }
virtual const VerilatedRange* rangep() const { return &get_range(); } virtual const VerilatedRange* rangep() const override { return &get_range(); }
virtual const char* name() const { return m_varp->name(); } virtual const char* name() const override { return m_varp->name(); }
virtual const char* fullname() const { virtual const char* fullname() const override {
static VL_THREAD_LOCAL std::string out; static VL_THREAD_LOCAL std::string out;
out = std::string(m_scopep->name()) + "." + name(); out = std::string(m_scopep->name()) + "." + name();
return out.c_str(); return out.c_str();
@ -277,14 +277,14 @@ public:
m_index = index; m_index = index;
m_varDatap = (static_cast<vluint8_t*>(varp->datap())) + entSize() * offset; m_varDatap = (static_cast<vluint8_t*>(varp->datap())) + entSize() * offset;
} }
virtual ~VerilatedVpioMemoryWord() {} virtual ~VerilatedVpioMemoryWord() override {}
static inline VerilatedVpioMemoryWord* castp(vpiHandle h) { static inline VerilatedVpioMemoryWord* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioMemoryWord*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioMemoryWord*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiMemoryWord; } virtual vluint32_t type() const override { return vpiMemoryWord; }
virtual vluint32_t size() const { return varp()->packed().elements(); } virtual vluint32_t size() const override { return varp()->packed().elements(); }
virtual const VerilatedRange* rangep() const { return &(varp()->packed()); } virtual const VerilatedRange* rangep() const override { return &(varp()->packed()); }
virtual const char* fullname() const { virtual const char* fullname() const override {
static VL_THREAD_LOCAL std::string out; static VL_THREAD_LOCAL std::string out;
char num[20]; char num[20];
sprintf(num, "%d", m_index); sprintf(num, "%d", m_index);
@ -302,12 +302,12 @@ public:
explicit VerilatedVpioVarIter(const VerilatedScope* scopep) explicit VerilatedVpioVarIter(const VerilatedScope* scopep)
: m_scopep(scopep) : m_scopep(scopep)
, m_started(false) {} , m_started(false) {}
virtual ~VerilatedVpioVarIter() {} virtual ~VerilatedVpioVarIter() override {}
static inline VerilatedVpioVarIter* castp(vpiHandle h) { static inline VerilatedVpioVarIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioVarIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioVarIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiIterator; } virtual vluint32_t type() const override { return vpiIterator; }
virtual vpiHandle dovpi_scan() { virtual vpiHandle dovpi_scan() override {
if (VL_LIKELY(m_scopep->varsp())) { if (VL_LIKELY(m_scopep->varsp())) {
VerilatedVarNameMap* varsp = m_scopep->varsp(); VerilatedVarNameMap* varsp = m_scopep->varsp();
if (VL_UNLIKELY(!m_started)) { if (VL_UNLIKELY(!m_started)) {
@ -339,15 +339,15 @@ public:
, m_iteration(varp->unpacked().right()) , m_iteration(varp->unpacked().right())
, m_direction(VL_LIKELY(varp->unpacked().left() > varp->unpacked().right()) ? 1 : -1) , m_direction(VL_LIKELY(varp->unpacked().left() > varp->unpacked().right()) ? 1 : -1)
, m_done(false) {} , m_done(false) {}
virtual ~VerilatedVpioMemoryWordIter() {} virtual ~VerilatedVpioMemoryWordIter() override {}
static inline VerilatedVpioMemoryWordIter* castp(vpiHandle h) { static inline VerilatedVpioMemoryWordIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioMemoryWordIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioMemoryWordIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiIterator; } virtual vluint32_t type() const override { return vpiIterator; }
void iterationInc() { void iterationInc() {
if (!(m_done = (m_iteration == m_varp->unpacked().left()))) m_iteration += m_direction; if (!(m_done = (m_iteration == m_varp->unpacked().left()))) m_iteration += m_direction;
} }
virtual vpiHandle dovpi_scan() { virtual vpiHandle dovpi_scan() override {
vpiHandle result; vpiHandle result;
if (m_done) return 0; if (m_done) return 0;
result = vpi_handle_by_index(m_handle, m_iteration); result = vpi_handle_by_index(m_handle, m_iteration);
@ -370,9 +370,9 @@ public:
static inline VerilatedVpioModule* castp(vpiHandle h) { static inline VerilatedVpioModule* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioModule*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioModule*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiModule; } virtual vluint32_t type() const override { return vpiModule; }
virtual const char* name() const { return m_name; } virtual const char* name() const override { return m_name; }
virtual const char* fullname() const { return m_fullname; } virtual const char* fullname() const override { return m_fullname; }
}; };
class VerilatedVpioModuleIter : public VerilatedVpio { class VerilatedVpioModuleIter : public VerilatedVpio {
@ -384,12 +384,12 @@ public:
: m_vec(&vec) { : m_vec(&vec) {
m_it = m_vec->begin(); m_it = m_vec->begin();
} }
virtual ~VerilatedVpioModuleIter() {} virtual ~VerilatedVpioModuleIter() override {}
static inline VerilatedVpioModuleIter* castp(vpiHandle h) { static inline VerilatedVpioModuleIter* castp(vpiHandle h) {
return dynamic_cast<VerilatedVpioModuleIter*>(reinterpret_cast<VerilatedVpio*>(h)); return dynamic_cast<VerilatedVpioModuleIter*>(reinterpret_cast<VerilatedVpio*>(h));
} }
virtual vluint32_t type() const { return vpiIterator; } virtual vluint32_t type() const override { return vpiIterator; }
virtual vpiHandle dovpi_scan() { virtual vpiHandle dovpi_scan() override {
if (m_it == m_vec->end()) return 0; if (m_it == m_vec->end()) return 0;
const VerilatedScope* modp = *m_it++; const VerilatedScope* modp = *m_it++;
return (new VerilatedVpioModule(modp))->castVpiHandle(); return (new VerilatedVpioModule(modp))->castVpiHandle();

View File

@ -136,7 +136,7 @@ public:
m_iActivep = nullptr; m_iActivep = nullptr;
m_cActivep = nullptr; m_cActivep = nullptr;
} }
virtual ~ActiveNamer() {} virtual ~ActiveNamer() override {}
void main(AstScope* nodep) { iterate(nodep); } void main(AstScope* nodep) { iterate(nodep); }
}; };
@ -211,7 +211,7 @@ public:
m_assignp = nullptr; m_assignp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~ActiveDlyVisitor() {} virtual ~ActiveDlyVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -417,7 +417,7 @@ public:
, m_itemSequent(false) { , m_itemSequent(false) {
iterate(nodep); iterate(nodep);
} }
virtual ~ActiveVisitor() {} virtual ~ActiveVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -131,7 +131,7 @@ public:
: m_topscopep(nullptr) { : m_topscopep(nullptr) {
iterate(nodep); iterate(nodep);
} }
virtual ~ActiveTopVisitor() {} virtual ~ActiveTopVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -392,7 +392,7 @@ public:
// Process // Process
iterate(nodep); iterate(nodep);
} }
virtual ~AssertVisitor() { virtual ~AssertVisitor() override {
V3Stats::addStat("Assertions, assert non-immediate statements", m_statAsNotImm); V3Stats::addStat("Assertions, assert non-immediate statements", m_statAsNotImm);
V3Stats::addStat("Assertions, assert immediate statements", m_statAsImm); V3Stats::addStat("Assertions, assert immediate statements", m_statAsImm);
V3Stats::addStat("Assertions, cover statements", m_statCover); V3Stats::addStat("Assertions, cover statements", m_statCover);

View File

@ -176,7 +176,7 @@ public:
// Process // Process
iterate(nodep); iterate(nodep);
} }
virtual ~AssertPreVisitor() {} virtual ~AssertPreVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -1888,7 +1888,7 @@ public:
: AstNode(t, fl) {} : AstNode(t, fl) {}
ASTNODE_BASE_FUNCS(NodeMath) ASTNODE_BASE_FUNCS(NodeMath)
// METHODS // METHODS
virtual bool hasDType() const { return true; } virtual bool hasDType() const override { return true; }
virtual string emitVerilog() = 0; /// Format string for verilog writing; see V3EmitV virtual string emitVerilog() = 0; /// Format string for verilog writing; see V3EmitV
// For documentation on emitC format see EmitCStmts::emitOpName // For documentation on emitC format see EmitCStmts::emitOpName
virtual string emitC() = 0; virtual string emitC() = 0;
@ -1932,9 +1932,9 @@ public:
// Signed flavor of nodes with both flavors? // Signed flavor of nodes with both flavors?
virtual bool signedFlavor() const { return false; } virtual bool signedFlavor() const { return false; }
virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors? virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors?
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
}; };
class AstNodeBiop : public AstNodeMath { class AstNodeBiop : public AstNodeMath {
@ -1964,9 +1964,9 @@ public:
// Signed flavor of nodes with both flavors? // Signed flavor of nodes with both flavors?
virtual bool signedFlavor() const { return false; } virtual bool signedFlavor() const { return false; }
virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors? virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors?
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
}; };
class AstNodeTriop : public AstNodeMath { class AstNodeTriop : public AstNodeMath {
@ -1996,9 +1996,9 @@ public:
virtual bool sizeMattersLhs() const = 0; // True if output result depends on lhs size virtual bool sizeMattersLhs() const = 0; // True if output result depends on lhs size
virtual bool sizeMattersRhs() const = 0; // True if output result depends on rhs size virtual bool sizeMattersRhs() const = 0; // True if output result depends on rhs size
virtual bool sizeMattersThs() const = 0; // True if output result depends on ths size virtual bool sizeMattersThs() const = 0; // True if output result depends on ths size
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
}; };
class AstNodeQuadop : public AstNodeMath { class AstNodeQuadop : public AstNodeMath {
@ -2033,9 +2033,9 @@ public:
virtual bool sizeMattersRhs() const = 0; // True if output result depends on rhs size virtual bool sizeMattersRhs() const = 0; // True if output result depends on rhs size
virtual bool sizeMattersThs() const = 0; // True if output result depends on ths size virtual bool sizeMattersThs() const = 0; // True if output result depends on ths size
virtual bool sizeMattersFhs() const = 0; // True if output result depends on ths size virtual bool sizeMattersFhs() const = 0; // True if output result depends on ths size
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
}; };
class AstNodeBiCom : public AstNodeBiop { class AstNodeBiCom : public AstNodeBiop {
@ -2065,20 +2065,22 @@ public:
} }
ASTNODE_BASE_FUNCS(NodeCond) ASTNODE_BASE_FUNCS(NodeCond)
virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs, virtual void numberOperate(V3Number& out, const V3Number& lhs, const V3Number& rhs,
const V3Number& ths); const V3Number& ths) override;
AstNode* condp() const { return op1p(); } // op1 = Condition AstNode* condp() const { return op1p(); } // op1 = Condition
AstNode* expr1p() const { return op2p(); } // op2 = If true... AstNode* expr1p() const { return op2p(); } // op2 = If true...
AstNode* expr2p() const { return op3p(); } // op3 = If false... AstNode* expr2p() const { return op3p(); } // op3 = If false...
virtual string emitVerilog() { return "%k(%l %f? %r %k: %t)"; } virtual string emitVerilog() override { return "%k(%l %f? %r %k: %t)"; }
virtual string emitC() { return "VL_COND_%nq%lq%rq%tq(%nw,%lw,%rw,%tw, %P, %li, %ri, %ti)"; } virtual string emitC() override {
virtual bool cleanOut() const { return false; } // clean if e1 & e2 clean return "VL_COND_%nq%lq%rq%tq(%nw,%lw,%rw,%tw, %P, %li, %ri, %ti)";
virtual bool cleanLhs() const { return true; } }
virtual bool cleanRhs() const { return false; } virtual bool cleanOut() const override { return false; } // clean if e1 & e2 clean
virtual bool cleanThs() const { return false; } // Propagates up virtual bool cleanLhs() const override { return true; }
virtual bool sizeMattersLhs() const { return false; } virtual bool cleanRhs() const override { return false; }
virtual bool sizeMattersRhs() const { return false; } virtual bool cleanThs() const override { return false; } // Propagates up
virtual bool sizeMattersThs() const { return false; } virtual bool sizeMattersLhs() const override { return false; }
virtual int instrCount() const { return instrCountBranch(); } virtual bool sizeMattersRhs() const override { return false; }
virtual bool sizeMattersThs() const override { return false; }
virtual int instrCount() const override { return instrCountBranch(); }
virtual AstNode* cloneType(AstNode* condp, AstNode* expr1p, AstNode* expr2p) = 0; virtual AstNode* cloneType(AstNode* condp, AstNode* expr1p, AstNode* expr2p) = 0;
}; };
@ -2097,9 +2099,9 @@ public:
m_unnamed = (name == ""); m_unnamed = (name == "");
} }
ASTNODE_BASE_FUNCS(NodeBlock) ASTNODE_BASE_FUNCS(NodeBlock)
virtual void dump(std::ostream& str) const; virtual void dump(std::ostream& str) const override;
virtual string name() const { return m_name; } // * = Block name virtual string name() const override { return m_name; } // * = Block name
virtual void name(const string& name) { m_name = name; } virtual void name(const string& name) override { m_name = name; }
// op1 = Statements // op1 = Statements
AstNode* stmtsp() const { return op1p(); } // op1 = List of statements AstNode* stmtsp() const { return op1p(); } // op1 = List of statements
void addStmtsp(AstNode* nodep) { addNOp1p(nodep); } void addStmtsp(AstNode* nodep) { addNOp1p(nodep); }
@ -2126,8 +2128,8 @@ public:
void thsp(AstNode* nodep) { return setOp3p(nodep); } void thsp(AstNode* nodep) { return setOp3p(nodep); }
void attrp(AstAttrOf* nodep) { return setOp4p((AstNode*)nodep); } void attrp(AstAttrOf* nodep) { return setOp4p((AstNode*)nodep); }
// METHODS // METHODS
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
}; };
class AstNodeProcedure : public AstNode { class AstNodeProcedure : public AstNode {
@ -2175,12 +2177,12 @@ public:
AstNode* lhsp() const { return op2p(); } // op2 = Assign to AstNode* lhsp() const { return op2p(); } // op2 = Assign to
void rhsp(AstNode* np) { setOp1p(np); } void rhsp(AstNode* np) { setOp1p(np); }
void lhsp(AstNode* np) { setOp2p(np); } void lhsp(AstNode* np) { setOp2p(np); }
virtual bool hasDType() const { return true; } virtual bool hasDType() const override { return true; }
virtual bool cleanRhs() const { return true; } virtual bool cleanRhs() const { return true; }
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode*) const { return true; } virtual bool same(const AstNode*) const override { return true; }
virtual string verilogKwd() const { return "="; } virtual string verilogKwd() const override { return "="; }
virtual bool brokeLhsMustBeLvalue() const = 0; virtual bool brokeLhsMustBeLvalue() const = 0;
}; };
@ -2199,10 +2201,10 @@ public:
AstNode* condp() const { return op2p(); } // op2 = condition to continue AstNode* condp() const { return op2p(); } // op2 = condition to continue
AstNode* incsp() const { return op3p(); } // op3 = increment statements AstNode* incsp() const { return op3p(); } // op3 = increment statements
AstNode* bodysp() const { return op4p(); } // op4 = body of loop AstNode* bodysp() const { return op4p(); } // op4 = body of loop
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const override { return false; }
virtual int instrCount() const { return instrCountBranch(); } virtual int instrCount() const override { return instrCountBranch(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode* samep) const { return true; } virtual bool same(const AstNode* samep) const override { return true; }
}; };
class AstNodeIf : public AstNodeStmt { class AstNodeIf : public AstNodeStmt {
@ -2222,11 +2224,11 @@ public:
void condp(AstNode* newp) { setOp1p(newp); } void condp(AstNode* newp) { setOp1p(newp); }
void addIfsp(AstNode* newp) { addOp2p(newp); } void addIfsp(AstNode* newp) { addOp2p(newp); }
void addElsesp(AstNode* newp) { addOp3p(newp); } void addElsesp(AstNode* newp) { addOp3p(newp); }
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const override { return false; }
virtual bool isGateDedupable() const { return true; } virtual bool isGateDedupable() const override { return true; }
virtual int instrCount() const { return instrCountBranch(); } virtual int instrCount() const override { return instrCountBranch(); }
virtual V3Hash sameHash() const { return V3Hash(); } virtual V3Hash sameHash() const override { return V3Hash(); }
virtual bool same(const AstNode* samep) const { return true; } virtual bool same(const AstNode* samep) const override { return true; }
void branchPred(VBranchPred flag) { m_branchPred = flag; } void branchPred(VBranchPred flag) { m_branchPred = flag; }
VBranchPred branchPred() const { return m_branchPred; } VBranchPred branchPred() const { return m_branchPred; }
}; };
@ -2239,7 +2241,7 @@ public:
addNOp2p(casesp); addNOp2p(casesp);
} }
ASTNODE_BASE_FUNCS(NodeCase) ASTNODE_BASE_FUNCS(NodeCase)
virtual int instrCount() const { return instrCountBranch(); } virtual int instrCount() const override { return instrCountBranch(); }
AstNode* exprp() const { return op1p(); } // op1 = case condition <expression> AstNode* exprp() const { return op1p(); } // op1 = case condition <expression>
AstCaseItem* itemsp() const { AstCaseItem* itemsp() const {
return VN_CAST(op2p(), CaseItem); return VN_CAST(op2p(), CaseItem);
@ -2281,12 +2283,12 @@ public:
this->varp(varp); this->varp(varp);
} }
ASTNODE_BASE_FUNCS(NodeVarRef) ASTNODE_BASE_FUNCS(NodeVarRef)
virtual bool hasDType() const { return true; } virtual bool hasDType() const override { return true; }
virtual const char* broken() const; virtual const char* broken() const override;
virtual int instrCount() const { return widthInstrs(); } virtual int instrCount() const override { return widthInstrs(); }
virtual void cloneRelink(); virtual void cloneRelink() override;
virtual string name() const { return m_name; } // * = Var name virtual string name() const override { return m_name; } // * = Var name
virtual void name(const string& name) { m_name = name; } virtual void name(const string& name) override { m_name = name; }
bool lvalue() const { return m_lvalue; } bool lvalue() const { return m_lvalue; }
void lvalue(bool lval) { m_lvalue = lval; } // Avoid using this; Set in constructor void lvalue(bool lval) { m_lvalue = lval; } // Avoid using this; Set in constructor
AstVar* varp() const { return m_varp; } // [After Link] Pointer to variable AstVar* varp() const { return m_varp; } // [After Link] Pointer to variable
@ -2317,9 +2319,9 @@ public:
m_text = textp; // Copy it m_text = textp; // Copy it
} }
ASTNODE_BASE_FUNCS(NodeText) ASTNODE_BASE_FUNCS(NodeText)
virtual void dump(std::ostream& str = std::cout) const; virtual void dump(std::ostream& str = std::cout) const override;
virtual V3Hash sameHash() const { return V3Hash(text()); } virtual V3Hash sameHash() const override { return V3Hash(text()); }
virtual bool same(const AstNode* samep) const { virtual bool same(const AstNode* samep) const override {
const AstNodeText* asamep = static_cast<const AstNodeText*>(samep); const AstNodeText* asamep = static_cast<const AstNodeText*>(samep);
return text() == asamep->text(); return text() == asamep->text();
} }
@ -2349,9 +2351,9 @@ public:
} }
ASTNODE_BASE_FUNCS(NodeDType) ASTNODE_BASE_FUNCS(NodeDType)
// ACCESSORS // ACCESSORS
virtual void dump(std::ostream& str) const; virtual void dump(std::ostream& str) const override;
virtual void dumpSmall(std::ostream& str) const; virtual void dumpSmall(std::ostream& str) const;
virtual bool hasDType() const { return true; } virtual bool hasDType() const override { return true; }
virtual AstBasicDType* basicp() const = 0; // (Slow) recurse down to find basic data type virtual AstBasicDType* basicp() const = 0; // (Slow) recurse down to find basic data type
// recurses over typedefs/const/enum to next non-typeref type // recurses over typedefs/const/enum to next non-typeref type
virtual AstNodeDType* skipRefp() const = 0; virtual AstNodeDType* skipRefp() const = 0;
@ -2363,7 +2365,7 @@ public:
virtual int widthAlignBytes() const = 0; virtual int widthAlignBytes() const = 0;
// (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,... // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
virtual int widthTotalBytes() const = 0; virtual int widthTotalBytes() const = 0;
virtual bool maybePointedTo() const { return true; } virtual bool maybePointedTo() const override { return true; }
// Iff has a non-null refDTypep(), as generic node function // Iff has a non-null refDTypep(), as generic node function
virtual AstNodeDType* virtRefDTypep() const { return nullptr; } virtual AstNodeDType* virtRefDTypep() const { return nullptr; }
// Iff has refDTypep(), set as generic node function // Iff has refDTypep(), set as generic node function
@ -2437,10 +2439,10 @@ public:
numeric(VSigning::fromBool(numericUnpack.isSigned())); numeric(VSigning::fromBool(numericUnpack.isSigned()));
} }
ASTNODE_BASE_FUNCS(NodeUOrStructDType) ASTNODE_BASE_FUNCS(NodeUOrStructDType)
virtual const char* broken() const; virtual const char* broken() const override;
virtual void dump(std::ostream& str) const; virtual void dump(std::ostream& str) const override;
// For basicp() we reuse the size to indicate a "fake" basic type of same size // For basicp() we reuse the size to indicate a "fake" basic type of same size
virtual AstBasicDType* basicp() const { virtual AstBasicDType* basicp() const override {
return (isFourstate() ? VN_CAST( return (isFourstate() ? VN_CAST(
findLogicRangeDType(VNumRange(width() - 1, 0, false), width(), numeric()), findLogicRangeDType(VNumRange(width() - 1, 0, false), width(), numeric()),
BasicDType) BasicDType)
@ -2448,19 +2450,19 @@ public:
width(), numeric()), width(), numeric()),
BasicDType)); BasicDType));
} }
virtual AstNodeDType* skipRefp() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefp() const override { return (AstNodeDType*)this; }
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefToConstp() const override { return (AstNodeDType*)this; }
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
virtual int widthAlignBytes() // (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
const; // (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this) virtual int widthAlignBytes() const override;
virtual int // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
widthTotalBytes() const; // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,... virtual int widthTotalBytes() const override;
// op1 = members // op1 = members
virtual bool similarDType(AstNodeDType* samep) const { virtual bool similarDType(AstNodeDType* samep) const override {
return this == samep; // We don't compare members, require exact equivalence return this == samep; // We don't compare members, require exact equivalence
} }
virtual string name() const { return m_name; } virtual string name() const override { return m_name; }
void name(const string& flag) { m_name = flag; } virtual void name(const string& flag) override { m_name = flag; }
AstMemberDType* membersp() const { AstMemberDType* membersp() const {
return VN_CAST(op1p(), MemberDType); return VN_CAST(op1p(), MemberDType);
} // op1 = AstMember list } // op1 = AstMember list
@ -2469,7 +2471,7 @@ public:
// packed() but as don't support unpacked, presently all structs // packed() but as don't support unpacked, presently all structs
static bool packedUnsup() { return true; } static bool packedUnsup() { return true; }
void isFourstate(bool flag) { m_isFourstate = flag; } void isFourstate(bool flag) { m_isFourstate = flag; }
virtual bool isFourstate() const { return m_isFourstate; } virtual bool isFourstate() const override { return m_isFourstate; }
void clearCache() { m_members.clear(); } void clearCache() { m_members.clear(); }
void repairMemberCache(); void repairMemberCache();
AstMemberDType* findMember(const string& name) const { AstMemberDType* findMember(const string& name) const {
@ -2494,48 +2496,50 @@ public:
m_refDTypep = nullptr; m_refDTypep = nullptr;
} }
ASTNODE_BASE_FUNCS(NodeArrayDType) ASTNODE_BASE_FUNCS(NodeArrayDType)
virtual void dump(std::ostream& str) const; virtual void dump(std::ostream& str) const override;
virtual void dumpSmall(std::ostream& str) const; virtual void dumpSmall(std::ostream& str) const override;
virtual const char* broken() const { virtual const char* broken() const override {
BROKEN_RTN(!((m_refDTypep && !childDTypep() && m_refDTypep->brokeExists()) BROKEN_RTN(!((m_refDTypep && !childDTypep() && m_refDTypep->brokeExists())
|| (!m_refDTypep && childDTypep()))); || (!m_refDTypep && childDTypep())));
return nullptr; return nullptr;
} }
virtual void cloneRelink() { virtual void cloneRelink() override {
if (m_refDTypep && m_refDTypep->clonep()) { m_refDTypep = m_refDTypep->clonep(); } if (m_refDTypep && m_refDTypep->clonep()) { m_refDTypep = m_refDTypep->clonep(); }
} }
virtual bool same(const AstNode* samep) const { virtual bool same(const AstNode* samep) const override {
const AstNodeArrayDType* asamep = static_cast<const AstNodeArrayDType*>(samep); const AstNodeArrayDType* asamep = static_cast<const AstNodeArrayDType*>(samep);
return (msb() == asamep->msb() && subDTypep() == asamep->subDTypep() return (msb() == asamep->msb() && subDTypep() == asamep->subDTypep()
&& rangenp()->sameTree(asamep->rangenp())); && rangenp()->sameTree(asamep->rangenp()));
} // HashedDT doesn't recurse, so need to check children } // HashedDT doesn't recurse, so need to check children
virtual bool similarDType(AstNodeDType* samep) const { virtual bool similarDType(AstNodeDType* samep) const override {
const AstNodeArrayDType* asamep = static_cast<const AstNodeArrayDType*>(samep); const AstNodeArrayDType* asamep = static_cast<const AstNodeArrayDType*>(samep);
return (asamep && type() == samep->type() && msb() == asamep->msb() return (asamep && type() == samep->type() && msb() == asamep->msb()
&& rangenp()->sameTree(asamep->rangenp()) && rangenp()->sameTree(asamep->rangenp())
&& subDTypep()->skipRefp()->similarDType(asamep->subDTypep()->skipRefp())); && subDTypep()->skipRefp()->similarDType(asamep->subDTypep()->skipRefp()));
} }
virtual V3Hash sameHash() const { virtual V3Hash sameHash() const override {
return V3Hash(V3Hash(m_refDTypep), V3Hash(msb()), V3Hash(lsb())); return V3Hash(V3Hash(m_refDTypep), V3Hash(msb()), V3Hash(lsb()));
} }
virtual AstNodeDType* getChildDTypep() const { return childDTypep(); } virtual AstNodeDType* getChildDTypep() const override { return childDTypep(); }
AstNodeDType* childDTypep() const { return VN_CAST(op1p(), NodeDType); } AstNodeDType* childDTypep() const { return VN_CAST(op1p(), NodeDType); }
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); } void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
virtual AstNodeDType* subDTypep() const { return m_refDTypep ? m_refDTypep : childDTypep(); } virtual AstNodeDType* subDTypep() const override {
return m_refDTypep ? m_refDTypep : childDTypep();
}
void refDTypep(AstNodeDType* nodep) { m_refDTypep = nodep; } void refDTypep(AstNodeDType* nodep) { m_refDTypep = nodep; }
virtual AstNodeDType* virtRefDTypep() const { return m_refDTypep; } virtual AstNodeDType* virtRefDTypep() const override { return m_refDTypep; }
virtual void virtRefDTypep(AstNodeDType* nodep) { refDTypep(nodep); } virtual void virtRefDTypep(AstNodeDType* nodep) override { refDTypep(nodep); }
AstRange* rangep() const { return VN_CAST(op2p(), Range); } // op2 = Array(s) of variable AstRange* rangep() const { return VN_CAST(op2p(), Range); } // op2 = Array(s) of variable
void rangep(AstRange* nodep); void rangep(AstRange* nodep);
// METHODS // METHODS
virtual AstBasicDType* basicp() const { virtual AstBasicDType* basicp() const override {
return subDTypep()->basicp(); return subDTypep()->basicp();
} // (Slow) recurse down to find basic data type } // (Slow) recurse down to find basic data type
virtual AstNodeDType* skipRefp() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefp() const override { return (AstNodeDType*)this; }
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefToConstp() const override { return (AstNodeDType*)this; }
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; } virtual AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); } virtual int widthAlignBytes() const override { return subDTypep()->widthAlignBytes(); }
virtual int widthTotalBytes() const { virtual int widthTotalBytes() const override {
return elementsConst() * subDTypep()->widthTotalBytes(); return elementsConst() * subDTypep()->widthTotalBytes();
} }
int msb() const; int msb() const;
@ -2557,7 +2561,7 @@ public:
AstNode* bitp() const { return op2p(); } // op2 = Msb selection expression AstNode* bitp() const { return op2p(); } // op2 = Msb selection expression
void bitp(AstNode* nodep) { setOp2p(nodep); } void bitp(AstNode* nodep) { setOp2p(nodep); }
int bitConst() const; int bitConst() const;
virtual bool hasDType() const { return true; } virtual bool hasDType() const override { return true; }
}; };
class AstNodeStream : public AstNodeBiop { class AstNodeStream : public AstNodeBiop {
@ -2597,20 +2601,20 @@ public:
if (oldp->argsp()) addNOp2p(oldp->argsp()->unlinkFrBackWithNext()); if (oldp->argsp()) addNOp2p(oldp->argsp()->unlinkFrBackWithNext());
} }
ASTNODE_BASE_FUNCS(NodeCCall) ASTNODE_BASE_FUNCS(NodeCCall)
virtual void dump(std::ostream& str = std::cout) const; virtual void dump(std::ostream& str = std::cout) const override;
virtual void cloneRelink(); virtual void cloneRelink() override;
virtual const char* broken() const; virtual const char* broken() const override;
virtual int instrCount() const { return instrCountCall(); } virtual int instrCount() const override { return instrCountCall(); }
virtual V3Hash sameHash() const { return V3Hash(funcp()); } virtual V3Hash sameHash() const override { return V3Hash(funcp()); }
virtual bool same(const AstNode* samep) const { virtual bool same(const AstNode* samep) const override {
const AstNodeCCall* asamep = static_cast<const AstNodeCCall*>(samep); const AstNodeCCall* asamep = static_cast<const AstNodeCCall*>(samep);
return (funcp() == asamep->funcp() && argTypes() == asamep->argTypes()); return (funcp() == asamep->funcp() && argTypes() == asamep->argTypes());
} }
AstNode* exprsp() const { return op2p(); } // op2 = expressions to print AstNode* exprsp() const { return op2p(); } // op2 = expressions to print
virtual bool isGateOptimizable() const { return false; } virtual bool isGateOptimizable() const override { return false; }
virtual bool isPredictOptimizable() const { return false; } virtual bool isPredictOptimizable() const override { return false; }
virtual bool isPure() const; virtual bool isPure() const override;
virtual bool isOutputter() const { return !isPure(); } virtual bool isOutputter() const override { return !isPure(); }
AstCFunc* funcp() const { return m_funcp; } AstCFunc* funcp() const { return m_funcp; }
string hiername() const { return m_hiername; } string hiername() const { return m_hiername; }
void hiername(const string& hn) { m_hiername = hn; } void hiername(const string& hn) { m_hiername = hn; }
@ -2665,12 +2669,14 @@ public:
cname(name); // Might be overridden by dpi import/export cname(name); // Might be overridden by dpi import/export
} }
ASTNODE_BASE_FUNCS(NodeFTask) ASTNODE_BASE_FUNCS(NodeFTask)
virtual void dump(std::ostream& str = std::cout) const; virtual void dump(std::ostream& str = std::cout) const override;
virtual string name() const { return m_name; } // * = Var name virtual string name() const override { return m_name; } // * = Var name
virtual bool maybePointedTo() const { return true; } virtual bool maybePointedTo() const override { return true; }
virtual bool isGateOptimizable() const { return !((m_dpiExport || m_dpiImport) && !m_pure); } virtual bool isGateOptimizable() const override {
return !((m_dpiExport || m_dpiImport) && !m_pure);
}
// {AstFunc only} op1 = Range output variable // {AstFunc only} op1 = Range output variable
virtual void name(const string& name) { m_name = name; } virtual void name(const string& name) override { m_name = name; }
string cname() const { return m_cname; } string cname() const { return m_cname; }
void cname(const string& cname) { m_cname = cname; } void cname(const string& cname) { m_cname = cname; }
// op1 = Output variable (functions only, nullptr for tasks) // op1 = Output variable (functions only, nullptr for tasks)
@ -2747,23 +2753,25 @@ public:
addNOp3p(pinsp); addNOp3p(pinsp);
} }
ASTNODE_BASE_FUNCS(NodeFTaskRef) ASTNODE_BASE_FUNCS(NodeFTaskRef)
virtual const char* broken() const { virtual const char* broken() const override {
BROKEN_RTN(m_taskp && !m_taskp->brokeExists()); BROKEN_RTN(m_taskp && !m_taskp->brokeExists());
return nullptr; return nullptr;
} }
virtual void cloneRelink() { virtual void cloneRelink() override {
if (m_taskp && m_taskp->clonep()) { m_taskp = m_taskp->clonep(); } if (m_taskp && m_taskp->clonep()) { m_taskp = m_taskp->clonep(); }
} }
virtual void dump(std::ostream& str = std::cout) const; virtual void dump(std::ostream& str = std::cout) const override;
virtual string name() const { return m_name; } // * = Var name virtual string name() const override { return m_name; } // * = Var name
virtual bool isGateOptimizable() const { return m_taskp && m_taskp->isGateOptimizable(); } virtual bool isGateOptimizable() const override {
return m_taskp && m_taskp->isGateOptimizable();
}
string dotted() const { return m_dotted; } // * = Scope name or "" string dotted() const { return m_dotted; } // * = Scope name or ""
string prettyDotted() const { return prettyName(dotted()); } string prettyDotted() const { return prettyName(dotted()); }
string inlinedDots() const { return m_inlinedDots; } string inlinedDots() const { return m_inlinedDots; }
void inlinedDots(const string& flag) { m_inlinedDots = flag; } void inlinedDots(const string& flag) { m_inlinedDots = flag; }
AstNodeFTask* taskp() const { return m_taskp; } // [After Link] Pointer to variable AstNodeFTask* taskp() const { return m_taskp; } // [After Link] Pointer to variable
void taskp(AstNodeFTask* taskp) { m_taskp = taskp; } void taskp(AstNodeFTask* taskp) { m_taskp = taskp; }
virtual void name(const string& name) { m_name = name; } virtual void name(const string& name) override { m_name = name; }
void dotted(const string& name) { m_dotted = name; } void dotted(const string& name) { m_dotted = name; }
AstNodeModule* packagep() const { return m_packagep; } AstNodeModule* packagep() const { return m_packagep; }
void packagep(AstNodeModule* nodep) { m_packagep = nodep; } void packagep(AstNodeModule* nodep) { m_packagep = nodep; }
@ -2819,9 +2827,9 @@ public:
, m_varNum(0) , m_varNum(0)
, m_typeNum(0) {} , m_typeNum(0) {}
ASTNODE_BASE_FUNCS(NodeModule) ASTNODE_BASE_FUNCS(NodeModule)
virtual void dump(std::ostream& str) const; virtual void dump(std::ostream& str) const override;
virtual bool maybePointedTo() const { return true; } virtual bool maybePointedTo() const override { return true; }
virtual string name() const { return m_name; } virtual string name() const override { return m_name; }
AstNode* stmtsp() const { return op2p(); } // op2 = List of statements AstNode* stmtsp() const { return op2p(); } // op2 = List of statements
AstActive* activesp() const { return VN_CAST(op3p(), Active); } // op3 = List of i/sblocks AstActive* activesp() const { return VN_CAST(op3p(), Active); } // op3 = List of i/sblocks
// METHODS // METHODS
@ -2829,8 +2837,8 @@ public:
void addStmtp(AstNode* nodep) { addNOp2p(nodep); } void addStmtp(AstNode* nodep) { addNOp2p(nodep); }
void addActivep(AstNode* nodep) { addOp3p(nodep); } void addActivep(AstNode* nodep) { addOp3p(nodep); }
// ACCESSORS // ACCESSORS
virtual void name(const string& name) { m_name = name; } virtual void name(const string& name) override { m_name = name; }
virtual string origName() const { return m_origName; } virtual string origName() const override { return m_origName; }
string hierName() const { return m_hierName; } string hierName() const { return m_hierName; }
void hierName(const string& hierName) { m_hierName = hierName; } void hierName(const string& hierName) { m_hierName = hierName; }
bool inLibrary() const { return m_inLibrary; } bool inLibrary() const { return m_inLibrary; }

File diff suppressed because it is too large Load Diff

View File

@ -257,7 +257,7 @@ public:
m_ifDepth = 0; m_ifDepth = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~BeginVisitor() {} virtual ~BeginVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -298,7 +298,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
BeginRelinkVisitor(AstNetlist* nodep, BeginState*) { iterate(nodep); } BeginRelinkVisitor(AstNetlist* nodep, BeginState*) { iterate(nodep); }
virtual ~BeginRelinkVisitor() {} virtual ~BeginRelinkVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -121,7 +121,7 @@ public:
iterateChildren(nodep); iterateChildren(nodep);
calc_tasks(); calc_tasks();
} }
virtual ~BranchVisitor() {} virtual ~BranchVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -191,7 +191,7 @@ public:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
BrokenTable() {} BrokenTable() {}
virtual ~BrokenTable() {} virtual ~BrokenTable() override {}
}; };
BrokenTable::NodeMap BrokenTable::s_nodes; BrokenTable::NodeMap BrokenTable::s_nodes;
@ -231,7 +231,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit BrokenMarkVisitor(AstNetlist* nodep) { iterate(nodep); } explicit BrokenMarkVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~BrokenMarkVisitor() {} virtual ~BrokenMarkVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -286,7 +286,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit BrokenCheckVisitor(AstNetlist* nodep) { iterate(nodep); } explicit BrokenCheckVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~BrokenCheckVisitor() {} virtual ~BrokenCheckVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -111,7 +111,7 @@ public:
, m_impOnly(false) { , m_impOnly(false) {
iterate(nodep); iterate(nodep);
} }
virtual ~CUseDTypeVisitor() {} virtual ~CUseDTypeVisitor() override {}
VL_UNCOPYABLE(CUseDTypeVisitor); VL_UNCOPYABLE(CUseDTypeVisitor);
}; };
@ -212,7 +212,7 @@ public:
: m_state(nodep) { : m_state(nodep) {
iterate(nodep); iterate(nodep);
} }
virtual ~CUseVisitor() {} virtual ~CUseVisitor() override {}
VL_UNCOPYABLE(CUseVisitor); VL_UNCOPYABLE(CUseVisitor);
}; };

View File

@ -113,7 +113,7 @@ public:
m_caseExprp = nullptr; m_caseExprp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~CaseLintVisitor() {} virtual ~CaseLintVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -494,7 +494,7 @@ public:
for (uint32_t i = 0; i < (1UL << CASE_OVERLAP_WIDTH); ++i) m_valueItem[i] = nullptr; for (uint32_t i = 0; i < (1UL << CASE_OVERLAP_WIDTH); ++i) m_valueItem[i] = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~CaseVisitor() { virtual ~CaseVisitor() override {
V3Stats::addStat("Optimizations, Cases parallelized", m_statCaseFast); V3Stats::addStat("Optimizations, Cases parallelized", m_statCaseFast);
V3Stats::addStat("Optimizations, Cases complex", m_statCaseSlow); V3Stats::addStat("Optimizations, Cases complex", m_statCaseSlow);
} }

View File

@ -193,7 +193,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CastVisitor(AstNetlist* nodep) { iterate(nodep); } explicit CastVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~CastVisitor() {} virtual ~CastVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -68,9 +68,9 @@ public:
, m_srcDomainSet(false) , m_srcDomainSet(false)
, m_dstDomainSet(false) , m_dstDomainSet(false)
, m_asyncPath(false) {} , m_asyncPath(false) {}
virtual ~CdcEitherVertex() {} virtual ~CdcEitherVertex() override {}
// ACCESSORS // ACCESSORS
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
AstScope* scopep() const { return m_scopep; } AstScope* scopep() const { return m_scopep; }
AstNode* nodep() const { return m_nodep; } AstNode* nodep() const { return m_nodep; }
AstSenTree* srcDomainp() const { return m_srcDomainp; } AstSenTree* srcDomainp() const { return m_srcDomainp; }
@ -96,11 +96,11 @@ public:
, m_varScp(varScp) , m_varScp(varScp)
, m_cntAsyncRst(0) , m_cntAsyncRst(0)
, m_fromFlop(false) {} , m_fromFlop(false) {}
virtual ~CdcVarVertex() {} virtual ~CdcVarVertex() override {}
// ACCESSORS // ACCESSORS
AstVarScope* varScp() const { return m_varScp; } AstVarScope* varScp() const { return m_varScp; }
virtual string name() const { return (cvtToHex(m_varScp) + " " + varScp()->name()); } virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
virtual string dotColor() const { virtual string dotColor() const override {
return fromFlop() ? "green" : cntAsyncRst() ? "red" : "blue"; return fromFlop() ? "green" : cntAsyncRst() ? "red" : "blue";
} }
int cntAsyncRst() const { return m_cntAsyncRst; } int cntAsyncRst() const { return m_cntAsyncRst; }
@ -121,10 +121,12 @@ public:
srcDomainp(sensenodep); srcDomainp(sensenodep);
dstDomainp(sensenodep); dstDomainp(sensenodep);
} }
virtual ~CdcLogicVertex() {} virtual ~CdcLogicVertex() override {}
// ACCESSORS // ACCESSORS
virtual string name() const { return (cvtToHex(nodep()) + "@" + scopep()->prettyName()); } virtual string name() const override {
virtual string dotColor() const { return hazard() ? "black" : "yellow"; } return (cvtToHex(nodep()) + "@" + scopep()->prettyName());
}
virtual string dotColor() const override { return hazard() ? "black" : "yellow"; }
bool hazard() const { return m_hazard; } bool hazard() const { return m_hazard; }
void setHazard(AstNode* nodep) { void setHazard(AstNode* nodep) {
m_hazard = true; m_hazard = true;
@ -172,7 +174,7 @@ public:
m_prefix = prefix; m_prefix = prefix;
iterate(nodep); iterate(nodep);
} }
virtual ~CdcDumpVisitor() {} virtual ~CdcDumpVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -200,7 +202,7 @@ public:
m_maxFilenameLen = 0; m_maxFilenameLen = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~CdcWidthVisitor() {} virtual ~CdcWidthVisitor() override {}
// ACCESSORS // ACCESSORS
int maxWidth() { int maxWidth() {
size_t width = 1; size_t width = 1;
@ -767,7 +769,7 @@ public:
*m_ofp << endl; *m_ofp << endl;
} }
} }
virtual ~CdcVisitor() { virtual ~CdcVisitor() override {
if (m_ofp) VL_DO_CLEAR(delete m_ofp, m_ofp = nullptr); if (m_ofp) VL_DO_CLEAR(delete m_ofp, m_ofp = nullptr);
} }
}; };

View File

@ -216,7 +216,7 @@ public:
m_newLvEqnp->deleteTree(); m_newLvEqnp->deleteTree();
m_newRvEqnp->deleteTree(); m_newRvEqnp->deleteTree();
} }
virtual ~ChangedInsertVisitor() {} virtual ~ChangedInsertVisitor() override {}
VL_UNCOPYABLE(ChangedInsertVisitor); VL_UNCOPYABLE(ChangedInsertVisitor);
}; };
@ -288,7 +288,7 @@ public:
m_statep = statep; m_statep = statep;
iterate(nodep); iterate(nodep);
} }
virtual ~ChangedVisitor() {} virtual ~ChangedVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -120,7 +120,7 @@ public:
: m_classScopep(nullptr) { : m_classScopep(nullptr) {
iterate(nodep); iterate(nodep);
} }
virtual ~ClassVisitor() { virtual ~ClassVisitor() override {
for (MoveVector::iterator it = m_moves.begin(); it != m_moves.end(); ++it) { for (MoveVector::iterator it = m_moves.begin(); it != m_moves.end(); ++it) {
it->second->addVarp(it->first->unlinkFrBack()); it->second->addVarp(it->first->unlinkFrBack());
} }

View File

@ -304,7 +304,7 @@ public:
m_modp = nullptr; m_modp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~CleanVisitor() {} virtual ~CleanVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -418,7 +418,7 @@ public:
// easily without iterating through the tree. // easily without iterating through the tree.
nodep->evalp(m_evalFuncp); nodep->evalp(m_evalFuncp);
} }
virtual ~ClockVisitor() {} virtual ~ClockVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -54,7 +54,7 @@ protected:
// STATE // STATE
// METHODS // METHODS
virtual ~CombBaseVisitor() {} virtual ~CombBaseVisitor() override {}
VL_DEBUG_FUNC; // Declare debug() VL_DEBUG_FUNC; // Declare debug()
}; };
@ -130,7 +130,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
CombCallVisitor() {} CombCallVisitor() {}
virtual ~CombCallVisitor() {} virtual ~CombCallVisitor() override {}
void main(AstNetlist* nodep) { iterate(nodep); } void main(AstNetlist* nodep) { iterate(nodep); }
}; };
@ -151,7 +151,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CombMarkVisitor(AstNode* nodep) { iterate(nodep); } explicit CombMarkVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~CombMarkVisitor() {} virtual ~CombMarkVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -466,7 +466,7 @@ public:
m_walkLast2p = nullptr; m_walkLast2p = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~CombineVisitor() { // virtual ~CombineVisitor() override { //
V3Stats::addStat("Optimizations, Combined CFuncs", m_statCombs); V3Stats::addStat("Optimizations, Combined CFuncs", m_statCombs);
} }
}; };

View File

@ -52,7 +52,7 @@ public:
AstNode::user4ClearTree(); // Check marked InUse before we're called AstNode::user4ClearTree(); // Check marked InUse before we're called
iterate(nodep); iterate(nodep);
} }
virtual ~ConstVarMarkVisitor() {} virtual ~ConstVarMarkVisitor() override {}
}; };
class ConstVarFindVisitor : public AstNVisitor { class ConstVarFindVisitor : public AstNVisitor {
@ -74,7 +74,7 @@ public:
m_found = false; m_found = false;
iterateAndNextNull(nodep); iterateAndNextNull(nodep);
} }
virtual ~ConstVarFindVisitor() {} virtual ~ConstVarFindVisitor() override {}
// METHODS // METHODS
bool found() const { return m_found; } bool found() const { return m_found; }
}; };
@ -2579,7 +2579,7 @@ public:
} }
// clang-format on // clang-format on
} }
virtual ~ConstVisitor() {} virtual ~ConstVisitor() override {}
AstNode* mainAcceptEdit(AstNode* nodep) { AstNode* mainAcceptEdit(AstNode* nodep) {
// Operate starting at a random place // Operate starting at a random place
return iterateSubtreeReturnEdits(nodep); return iterateSubtreeReturnEdits(nodep);

View File

@ -551,7 +551,7 @@ public:
m_inToggleOff = false; m_inToggleOff = false;
iterateChildren(rootp); iterateChildren(rootp);
} }
virtual ~CoverageVisitor() {} virtual ~CoverageVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -114,7 +114,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit CoverageJoinVisitor(AstNetlist* nodep) { iterate(nodep); } explicit CoverageJoinVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~CoverageJoinVisitor() { virtual ~CoverageJoinVisitor() override {
V3Stats::addStat("Coverage, Toggle points joined", m_statToggleJoins); V3Stats::addStat("Coverage, Toggle points joined", m_statToggleJoins);
} }
}; };

View File

@ -63,7 +63,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit DeadModVisitor(AstNodeModule* nodep) { iterate(nodep); } explicit DeadModVisitor(AstNodeModule* nodep) { iterate(nodep); }
virtual ~DeadModVisitor() {} virtual ~DeadModVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -465,7 +465,7 @@ public:
// We may have removed some datatypes, cleanup // We may have removed some datatypes, cleanup
nodep->typeTablep()->repairCache(); nodep->typeTablep()->repairCache();
} }
virtual ~DeadVisitor() {} virtual ~DeadVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -486,7 +486,7 @@ public:
iterate(nodep); iterate(nodep);
} }
virtual ~DelayedVisitor() { virtual ~DelayedVisitor() override {
V3Stats::addStat("Optimizations, Delayed shared-sets", m_statSharedSet); V3Stats::addStat("Optimizations, Delayed shared-sets", m_statSharedSet);
} }
}; };

View File

@ -160,7 +160,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~DepthVisitor() {} virtual ~DepthVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -127,7 +127,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~DepthBlockVisitor() {} virtual ~DepthBlockVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -301,7 +301,7 @@ public:
, m_needThis(false) { , m_needThis(false) {
iterate(nodep); iterate(nodep);
} }
virtual ~DescopeVisitor() {} virtual ~DescopeVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -1238,7 +1238,7 @@ public:
m_trackText = trackText; m_trackText = trackText;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitCStmts() {} virtual ~EmitCStmts() override {}
}; };
//###################################################################### //######################################################################
@ -1257,12 +1257,12 @@ public:
, m_serial(++m_serialNext) {} , m_serial(++m_serialNext) {}
virtual ~EmitVarTspSorter() {} virtual ~EmitVarTspSorter() {}
// METHODS // METHODS
bool operator<(const TspStateBase& other) const { virtual bool operator<(const TspStateBase& other) const override {
return operator<(dynamic_cast<const EmitVarTspSorter&>(other)); return operator<(dynamic_cast<const EmitVarTspSorter&>(other));
} }
bool operator<(const EmitVarTspSorter& other) const { return m_serial < other.m_serial; } bool operator<(const EmitVarTspSorter& other) const { return m_serial < other.m_serial; }
const MTaskIdSet& mtaskIds() const { return m_mtaskIds; } const MTaskIdSet& mtaskIds() const { return m_mtaskIds; }
virtual int cost(const TspStateBase* otherp) const { virtual int cost(const TspStateBase* otherp) const override {
return cost(dynamic_cast<const EmitVarTspSorter*>(otherp)); return cost(dynamic_cast<const EmitVarTspSorter*>(otherp));
} }
virtual int cost(const EmitVarTspSorter* otherp) const { virtual int cost(const EmitVarTspSorter* otherp) const {
@ -1776,7 +1776,7 @@ public:
m_slow = false; m_slow = false;
m_fast = false; m_fast = false;
} }
virtual ~EmitCImp() {} virtual ~EmitCImp() override {}
void mainImp(AstNodeModule* modp, bool slow); void mainImp(AstNodeModule* modp, bool slow);
void mainInt(AstNodeModule* modp); void mainInt(AstNodeModule* modp);
void mainDoFunc(AstCFunc* nodep) { iterate(nodep); } void mainDoFunc(AstCFunc* nodep) { iterate(nodep); }
@ -3107,7 +3107,7 @@ void EmitCImp::emitInt(AstNodeModule* modp) {
+ "C* tfp, int levels, int options = 0);\n"); + "C* tfp, int levels, int options = 0);\n");
if (optSystemC()) { if (optSystemC()) {
puts("/// SC tracing; avoid overloaded virtual function lint warning\n"); puts("/// SC tracing; avoid overloaded virtual function lint warning\n");
puts("virtual void trace(sc_trace_file* tfp) const { " puts("virtual void trace(sc_trace_file* tfp) const override { "
"::sc_core::sc_module::trace(tfp); }\n"); "::sc_core::sc_module::trace(tfp); }\n");
} }
} }
@ -3769,7 +3769,7 @@ public:
m_slow = slow; m_slow = slow;
m_enumNum = 0; m_enumNum = 0;
} }
virtual ~EmitCTrace() {} virtual ~EmitCTrace() override {}
void main() { void main() {
// Put out the file // Put out the file
newOutCFile(0); newOutCFile(0);

View File

@ -110,7 +110,7 @@ public:
m_ofp = nullptr; m_ofp = nullptr;
m_trackText = false; m_trackText = false;
} }
virtual ~EmitCBaseVisitor() {} virtual ~EmitCBaseVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -132,7 +132,7 @@ public:
m_count = 0; m_count = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitCBaseCounterVisitor() {} virtual ~EmitCBaseCounterVisitor() override {}
int count() const { return m_count; } int count() const { return m_count; }
}; };

View File

@ -31,7 +31,7 @@ class EmitCMain : EmitCBaseVisitor {
// VISITORS // VISITORS
// This visitor doesn't really iterate, but exist to appease base class // This visitor doesn't really iterate, but exist to appease base class
virtual void visit(AstNode* nodep) { iterateChildren(nodep); } // LCOV_EXCL_LINE virtual void visit(AstNode* nodep) override { iterateChildren(nodep); } // LCOV_EXCL_LINE
public: public:
// CONSTRUCTORS // CONSTRUCTORS

View File

@ -665,7 +665,7 @@ public:
m_suppressVarSemi = false; m_suppressVarSemi = false;
m_sensesp = domainp; m_sensesp = domainp;
} }
virtual ~EmitVBaseVisitor() {} virtual ~EmitVBaseVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -676,11 +676,11 @@ class EmitVFileVisitor : public EmitVBaseVisitor {
V3OutFile* m_ofp; V3OutFile* m_ofp;
// METHODS // METHODS
V3OutFile* ofp() const { return m_ofp; } V3OutFile* ofp() const { return m_ofp; }
virtual void puts(const string& str) { ofp()->puts(str); } virtual void puts(const string& str) override { ofp()->puts(str); }
virtual void putbs(const string& str) { ofp()->putbs(str); } virtual void putbs(const string& str) override { ofp()->putbs(str); }
virtual void putfs(AstNode*, const string& str) { putbs(str); } virtual void putfs(AstNode*, const string& str) override { putbs(str); }
virtual void putqs(AstNode*, const string& str) { putbs(str); } virtual void putqs(AstNode*, const string& str) override { putbs(str); }
virtual void putsNoTracking(const string& str) { ofp()->putsNoTracking(str); } virtual void putsNoTracking(const string& str) override { ofp()->putsNoTracking(str); }
public: public:
EmitVFileVisitor(AstNode* nodep, V3OutFile* ofp, bool trackText = false, EmitVFileVisitor(AstNode* nodep, V3OutFile* ofp, bool trackText = false,
@ -690,7 +690,7 @@ public:
m_suppressVarSemi = suppressVarSemi; m_suppressVarSemi = suppressVarSemi;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVFileVisitor() {} virtual ~EmitVFileVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -700,18 +700,18 @@ class EmitVStreamVisitor : public EmitVBaseVisitor {
// MEMBERS // MEMBERS
std::ostream& m_os; std::ostream& m_os;
// METHODS // METHODS
virtual void putsNoTracking(const string& str) { m_os << str; } virtual void putsNoTracking(const string& str) override { m_os << str; }
virtual void puts(const string& str) { putsNoTracking(str); } virtual void puts(const string& str) override { putsNoTracking(str); }
virtual void putbs(const string& str) { puts(str); } virtual void putbs(const string& str) override { puts(str); }
virtual void putfs(AstNode*, const string& str) { putbs(str); } virtual void putfs(AstNode*, const string& str) override { putbs(str); }
virtual void putqs(AstNode*, const string& str) { putbs(str); } virtual void putqs(AstNode*, const string& str) override { putbs(str); }
public: public:
EmitVStreamVisitor(AstNode* nodep, std::ostream& os) EmitVStreamVisitor(AstNode* nodep, std::ostream& os)
: m_os(os) { : m_os(os) {
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVStreamVisitor() {} virtual ~EmitVStreamVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -724,7 +724,7 @@ class EmitVPrefixedFormatter : public V3OutFormatter {
int m_column; // Rough location; need just zero or non-zero int m_column; // Rough location; need just zero or non-zero
FileLine* m_prefixFl; FileLine* m_prefixFl;
// METHODS // METHODS
virtual void putcOutput(char chr) { virtual void putcOutput(char chr) override {
if (chr == '\n') { if (chr == '\n') {
m_column = 0; m_column = 0;
m_os << chr; m_os << chr;
@ -755,7 +755,7 @@ public:
= v3Global.rootp() = v3Global.rootp()
->fileline(); // NETLIST's fileline instead of nullptr to avoid nullptr checks ->fileline(); // NETLIST's fileline instead of nullptr to avoid nullptr checks
} }
virtual ~EmitVPrefixedFormatter() { virtual ~EmitVPrefixedFormatter() override {
if (m_column) puts("\n"); if (m_column) puts("\n");
} }
}; };
@ -765,13 +765,13 @@ class EmitVPrefixedVisitor : public EmitVBaseVisitor {
EmitVPrefixedFormatter m_formatter; // Special verilog formatter (Way down the EmitVPrefixedFormatter m_formatter; // Special verilog formatter (Way down the
// inheritance is another unused V3OutFormatter) // inheritance is another unused V3OutFormatter)
// METHODS // METHODS
virtual void putsNoTracking(const string& str) { m_formatter.putsNoTracking(str); } virtual void putsNoTracking(const string& str) override { m_formatter.putsNoTracking(str); }
virtual void puts(const string& str) { m_formatter.puts(str); } virtual void puts(const string& str) override { m_formatter.puts(str); }
// We don't use m_formatter's putbs because the tokens will change filelines // We don't use m_formatter's putbs because the tokens will change filelines
// and insert returns at the proper locations // and insert returns at the proper locations
virtual void putbs(const string& str) { m_formatter.puts(str); } virtual void putbs(const string& str) override { m_formatter.puts(str); }
virtual void putfs(AstNode* nodep, const string& str) { putfsqs(nodep, str, false); } virtual void putfs(AstNode* nodep, const string& str) override { putfsqs(nodep, str, false); }
virtual void putqs(AstNode* nodep, const string& str) { putfsqs(nodep, str, true); } virtual void putqs(AstNode* nodep, const string& str) override { putfsqs(nodep, str, true); }
void putfsqs(AstNode* nodep, const string& str, bool quiet) { void putfsqs(AstNode* nodep, const string& str, bool quiet) {
if (m_formatter.prefixFl() != nodep->fileline()) { if (m_formatter.prefixFl() != nodep->fileline()) {
m_formatter.prefixFl(nodep->fileline()); m_formatter.prefixFl(nodep->fileline());
@ -789,7 +789,7 @@ public:
if (user3mark) { AstUser3InUse::check(); } if (user3mark) { AstUser3InUse::check(); }
iterate(nodep); iterate(nodep);
} }
virtual ~EmitVPrefixedVisitor() {} virtual ~EmitVPrefixedVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -250,7 +250,7 @@ public:
m_id = 0; m_id = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~EmitXmlFileVisitor() {} virtual ~EmitXmlFileVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -301,7 +301,7 @@ public:
} }
m_os << "</module_files>\n"; m_os << "</module_files>\n";
} }
virtual ~ModuleFilesXmlVisitor() {} virtual ~ModuleFilesXmlVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -368,7 +368,7 @@ public:
// Operate on whole netlist // Operate on whole netlist
nodep->accept(*this); nodep->accept(*this);
} }
virtual ~HierCellsXmlVisitor() {} virtual ~HierCellsXmlVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -882,7 +882,7 @@ public:
m_stmtp = nullptr; m_stmtp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~ExpandVisitor() {} virtual ~ExpandVisitor() override {}
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -182,12 +182,12 @@ class V3OutFile : public V3OutFormatter {
public: public:
V3OutFile(const string& filename, V3OutFormatter::Language lang); V3OutFile(const string& filename, V3OutFormatter::Language lang);
virtual ~V3OutFile(); virtual ~V3OutFile() override;
void putsForceIncs(); void putsForceIncs();
private: private:
// CALLBACKS // CALLBACKS
virtual void putcOutput(char chr) { fputc(chr, m_fp); } virtual void putcOutput(char chr) override { fputc(chr, m_fp); }
}; };
class V3OutCFile : public V3OutFile { class V3OutCFile : public V3OutFile {
@ -199,7 +199,7 @@ public:
, m_guard(false) { , m_guard(false) {
resetPrivate(); resetPrivate();
} }
virtual ~V3OutCFile() {} virtual ~V3OutCFile() override {}
virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); }
virtual void putsIntTopInclude() { putsForceIncs(); } virtual void putsIntTopInclude() { putsForceIncs(); }
virtual void putsGuard(); virtual void putsGuard();
@ -223,9 +223,9 @@ class V3OutScFile : public V3OutCFile {
public: public:
explicit V3OutScFile(const string& filename) explicit V3OutScFile(const string& filename)
: V3OutCFile(filename) {} : V3OutCFile(filename) {}
virtual ~V3OutScFile() {} virtual ~V3OutScFile() override {}
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); } virtual void putsHeader() override { puts("// Verilated -*- SystemC -*-\n"); }
virtual void putsIntTopInclude() { virtual void putsIntTopInclude() override {
putsForceIncs(); putsForceIncs();
puts("#include \"systemc.h\"\n"); puts("#include \"systemc.h\"\n");
puts("#include \"verilated_sc.h\"\n"); puts("#include \"verilated_sc.h\"\n");
@ -236,7 +236,7 @@ class V3OutVFile : public V3OutFile {
public: public:
explicit V3OutVFile(const string& filename) explicit V3OutVFile(const string& filename)
: V3OutFile(filename, V3OutFormatter::LA_VERILOG) {} : V3OutFile(filename, V3OutFormatter::LA_VERILOG) {}
virtual ~V3OutVFile() {} virtual ~V3OutVFile() override {}
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); } virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
}; };
@ -246,7 +246,7 @@ public:
: V3OutFile(filename, V3OutFormatter::LA_XML) { : V3OutFile(filename, V3OutFormatter::LA_XML) {
blockIndent(2); blockIndent(2);
} }
virtual ~V3OutXmlFile() {} virtual ~V3OutXmlFile() override {}
virtual void putsHeader() { puts("<?xml version=\"1.0\" ?>\n"); } virtual void putsHeader() { puts("<?xml version=\"1.0\" ?>\n"); }
}; };
@ -254,7 +254,7 @@ class V3OutMkFile : public V3OutFile {
public: public:
explicit V3OutMkFile(const string& filename) explicit V3OutMkFile(const string& filename)
: V3OutFile(filename, V3OutFormatter::LA_MK) {} : V3OutFile(filename, V3OutFormatter::LA_MK) {}
virtual ~V3OutMkFile() {} virtual ~V3OutMkFile() override {}
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); } virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
// No automatic indentation yet. // No automatic indentation yet.
void puts(const char* strg) { putsNoTracking(strg); } void puts(const char* strg) { putsNoTracking(strg); }

View File

@ -78,9 +78,9 @@ public:
, m_reducible(true) , m_reducible(true)
, m_dedupable(true) , m_dedupable(true)
, m_consumed(false) {} , m_consumed(false) {}
virtual ~GateEitherVertex() {} virtual ~GateEitherVertex() override {}
// ACCESSORS // ACCESSORS
virtual string dotStyle() const { return m_consumed ? "" : "dotted"; } virtual string dotStyle() const override { return m_consumed ? "" : "dotted"; }
AstScope* scopep() const { return m_scopep; } AstScope* scopep() const { return m_scopep; }
bool reducible() const { return m_reducible; } bool reducible() const { return m_reducible; }
bool dedupable() const { return m_dedupable; } bool dedupable() const { return m_dedupable; }
@ -140,11 +140,11 @@ public:
, m_isClock(false) , m_isClock(false)
, m_rstSyncNodep(nullptr) , m_rstSyncNodep(nullptr)
, m_rstAsyncNodep(nullptr) {} , m_rstAsyncNodep(nullptr) {}
virtual ~GateVarVertex() {} virtual ~GateVarVertex() override {}
// ACCESSORS // ACCESSORS
AstVarScope* varScp() const { return m_varScp; } AstVarScope* varScp() const { return m_varScp; }
virtual string name() const { return (cvtToHex(m_varScp) + " " + varScp()->name()); } virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
virtual string dotColor() const { return "blue"; } virtual string dotColor() const override { return "blue"; }
bool isTop() const { return m_isTop; } bool isTop() const { return m_isTop; }
void setIsTop() { m_isTop = true; } void setIsTop() { m_isTop = true; }
bool isClock() const { return m_isClock; } bool isClock() const { return m_isClock; }
@ -165,7 +165,9 @@ public:
setIsClock(); setIsClock();
} }
} }
VNUser accept(GateGraphBaseVisitor& v, VNUser vu = VNUser(0)) { return v.visit(this, vu); } virtual VNUser accept(GateGraphBaseVisitor& v, VNUser vu = VNUser(0)) override {
return v.visit(this, vu);
}
}; };
class GateLogicVertex : public GateEitherVertex { class GateLogicVertex : public GateEitherVertex {
@ -179,15 +181,19 @@ public:
, m_nodep(nodep) , m_nodep(nodep)
, m_activep(activep) , m_activep(activep)
, m_slow(slow) {} , m_slow(slow) {}
virtual ~GateLogicVertex() {} virtual ~GateLogicVertex() override {}
// ACCESSORS // ACCESSORS
virtual string name() const { return (cvtToHex(m_nodep) + "@" + scopep()->prettyName()); } virtual string name() const override {
virtual string dotColor() const { return "purple"; } return (cvtToHex(m_nodep) + "@" + scopep()->prettyName());
virtual FileLine* fileline() const { return nodep()->fileline(); } }
virtual string dotColor() const override { return "purple"; }
virtual FileLine* fileline() const override { return nodep()->fileline(); }
AstNode* nodep() const { return m_nodep; } AstNode* nodep() const { return m_nodep; }
AstActive* activep() const { return m_activep; } AstActive* activep() const { return m_activep; }
bool slow() const { return m_slow; } bool slow() const { return m_slow; }
VNUser accept(GateGraphBaseVisitor& v, VNUser vu = VNUser(0)) { return v.visit(this, vu); } virtual VNUser accept(GateGraphBaseVisitor& v, VNUser vu = VNUser(0)) override {
return v.visit(this, vu);
}
}; };
//###################################################################### //######################################################################
@ -294,7 +300,7 @@ public:
} }
if (debug() >= 9 && !m_isSimple) nodep->dumpTree(cout, " gate!Ok: "); if (debug() >= 9 && !m_isSimple) nodep->dumpTree(cout, " gate!Ok: ");
} }
virtual ~GateOkVisitor() {} virtual ~GateOkVisitor() override {}
// PUBLIC METHODS // PUBLIC METHODS
bool isSimple() const { return m_isSimple; } bool isSimple() const { return m_isSimple; }
AstNode* substTree() const { return m_substTreep; } AstNode* substTree() const { return m_substTreep; }
@ -538,7 +544,7 @@ public:
m_inSlow = false; m_inSlow = false;
iterate(nodep); iterate(nodep);
} }
virtual ~GateVisitor() { 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);
V3Stats::addStat("Optimizations, Gate sigs deduped", m_statDedupLogic); V3Stats::addStat("Optimizations, Gate sigs deduped", m_statDedupLogic);
@ -878,7 +884,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
virtual ~GateElimVisitor() {} virtual ~GateElimVisitor() override {}
GateElimVisitor(AstNode* nodep, AstVarScope* varscp, AstNode* replaceTreep, GateElimVisitor(AstNode* nodep, AstVarScope* varscp, AstNode* replaceTreep,
GateDedupeVarVisitor* varVisp) { GateDedupeVarVisitor* varVisp) {
UINFO(9, " elimvisitor " << nodep << endl); UINFO(9, " elimvisitor " << nodep << endl);
@ -1143,7 +1149,7 @@ private:
GateDedupeVarVisitor m_varVisitor; // Looks for a dupe of the logic GateDedupeVarVisitor m_varVisitor; // Looks for a dupe of the logic
int m_depth; // Iteration depth int m_depth; // Iteration depth
virtual VNUser visit(GateVarVertex* vvertexp, VNUser) { virtual VNUser visit(GateVarVertex* vvertexp, VNUser) override {
// Check that we haven't been here before // Check that we haven't been here before
if (m_depth > GATE_DEDUP_MAX_DEPTH) if (m_depth > GATE_DEDUP_MAX_DEPTH)
return VNUser(0); // Break loops; before user2 set so hit this vertex later return VNUser(0); // Break loops; before user2 set so hit this vertex later
@ -1210,7 +1216,7 @@ private:
// Given iterated logic, starting at vu which was consumer's GateVarVertex // Given iterated logic, starting at vu which was consumer's GateVarVertex
// Returns a varref that has the same logic input; or nullptr if none // Returns a varref that has the same logic input; or nullptr if none
virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) { virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) override {
lvertexp->iterateInEdges(*this); lvertexp->iterateInEdges(*this);
GateVarVertex* consumerVvertexpp = static_cast<GateVarVertex*>(vu.toGraphVertex()); GateVarVertex* consumerVvertexpp = static_cast<GateVarVertex*>(vu.toGraphVertex());
@ -1290,7 +1296,7 @@ private:
} }
} }
virtual VNUser visit(GateVarVertex* vvertexp, VNUser) { virtual VNUser visit(GateVarVertex* vvertexp, VNUser) override {
for (V3GraphEdge* edgep = vvertexp->inBeginp(); edgep;) { for (V3GraphEdge* edgep = vvertexp->inBeginp(); edgep;) {
V3GraphEdge* oldedgep = edgep; V3GraphEdge* oldedgep = edgep;
edgep = edgep->inNextp(); // for recursive since the edge could be deleted edgep = edgep->inNextp(); // for recursive since the edge could be deleted
@ -1363,7 +1369,7 @@ private:
} }
return VNUser(0); return VNUser(0);
} }
virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) { // virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) override { //
return VNUser(0); return VNUser(0);
} }
@ -1433,7 +1439,7 @@ public:
m_found_offset = 0; m_found_offset = 0;
m_found = false; m_found = false;
} }
virtual ~GateConcatVisitor() {} virtual ~GateConcatVisitor() override {}
// PUBLIC METHODS // PUBLIC METHODS
bool concatOffset(AstConcat* concatp, AstVarScope* vscp, int& offsetr) { bool concatOffset(AstConcat* concatp, AstVarScope* vscp, int& offsetr) {
m_vscp = vscp; m_vscp = vscp;
@ -1474,7 +1480,7 @@ private:
int m_total_seen_clk_vectors; int m_total_seen_clk_vectors;
int m_total_decomposed_clk_vectors; int m_total_decomposed_clk_vectors;
virtual VNUser visit(GateVarVertex* vvertexp, VNUser vu) { virtual VNUser visit(GateVarVertex* vvertexp, VNUser vu) override {
// Check that we haven't been here before // Check that we haven't been here before
AstVarScope* vsp = vvertexp->varScp(); AstVarScope* vsp = vvertexp->varScp();
if (vsp->user2SetOnce()) return VNUser(0); if (vsp->user2SetOnce()) return VNUser(0);
@ -1491,7 +1497,7 @@ private:
return VNUser(0); // Unused return VNUser(0); // Unused
} }
virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) { virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) override {
GateClkDecompState* currState = reinterpret_cast<GateClkDecompState*>(vu.c()); GateClkDecompState* currState = reinterpret_cast<GateClkDecompState*>(vu.c());
int clk_offset = currState->m_offset; int clk_offset = currState->m_offset;
if (const AstAssignW* assignp = VN_CAST(lvertexp->nodep(), AssignW)) { if (const AstAssignW* assignp = VN_CAST(lvertexp->nodep(), AssignW)) {
@ -1564,7 +1570,7 @@ public:
m_total_seen_clk_vectors = 0; m_total_seen_clk_vectors = 0;
m_total_decomposed_clk_vectors = 0; m_total_decomposed_clk_vectors = 0;
} }
virtual ~GateClkDecompGraphVisitor() { virtual ~GateClkDecompGraphVisitor() override {
V3Stats::addStat("Optimizations, Clocker seen vectors", m_total_seen_clk_vectors); V3Stats::addStat("Optimizations, Clocker seen vectors", m_total_seen_clk_vectors);
V3Stats::addStat("Optimizations, Clocker decomposed vectors", V3Stats::addStat("Optimizations, Clocker decomposed vectors",
m_total_decomposed_clk_vectors); m_total_decomposed_clk_vectors);
@ -1621,7 +1627,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit GateDeassignVisitor(AstNode* nodep) { iterate(nodep); } explicit GateDeassignVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~GateDeassignVisitor() {} virtual ~GateDeassignVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -124,7 +124,7 @@ public:
m_activep = nullptr; m_activep = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~GenClkRenameVisitor() {} virtual ~GenClkRenameVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -223,7 +223,7 @@ public:
, m_topModp(nullptr) { , m_topModp(nullptr) {
iterate(nodep); iterate(nodep);
} }
virtual ~GenClkReadVisitor() {} virtual ~GenClkReadVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -45,13 +45,13 @@ public:
, m_storedRank(0) , m_storedRank(0)
, m_onWorkList(false) , m_onWorkList(false)
, m_deleted(false) {} , m_deleted(false) {}
virtual ~GraphAcycVertex() {} virtual ~GraphAcycVertex() override {}
V3GraphVertex* origVertexp() const { return m_origVertexp; } V3GraphVertex* origVertexp() const { return m_origVertexp; }
void setDelete() { m_deleted = true; } void setDelete() { m_deleted = true; }
bool isDelete() const { return m_deleted; } bool isDelete() const { return m_deleted; }
virtual string name() const { return m_origVertexp->name(); } virtual string name() const override { return m_origVertexp->name(); }
virtual string dotColor() const { return m_origVertexp->dotColor(); } virtual string dotColor() const override { return m_origVertexp->dotColor(); }
virtual FileLine* fileline() const { return m_origVertexp->fileline(); } virtual FileLine* fileline() const override { return m_origVertexp->fileline(); }
}; };
//-------------------------------------------------------------------- //--------------------------------------------------------------------
@ -70,9 +70,11 @@ public:
GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight, GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
bool cutable = false) bool cutable = false)
: V3GraphEdge(graphp, fromp, top, weight, cutable) {} : V3GraphEdge(graphp, fromp, top, weight, cutable) {}
virtual ~GraphAcycEdge() {} virtual ~GraphAcycEdge() override {}
// yellow=we might still cut it, else oldEdge: yellowGreen=made uncutable, red=uncutable // yellow=we might still cut it, else oldEdge: yellowGreen=made uncutable, red=uncutable
virtual string dotColor() const { return (cutable() ? "yellow" : origEdgep()->dotColor()); } virtual string dotColor() const override {
return (cutable() ? "yellow" : origEdgep()->dotColor());
}
}; };
//-------------------------------------------------------------------- //--------------------------------------------------------------------

View File

@ -62,7 +62,7 @@ class DfaGraph : public V3Graph {
public: public:
// CONSTRUCTORS // CONSTRUCTORS
DfaGraph() {} DfaGraph() {}
virtual ~DfaGraph() {} virtual ~DfaGraph() override {}
// METHODS // METHODS
/// Find start node /// Find start node
DfaVertex* findStart(); DfaVertex* findStart();
@ -93,10 +93,12 @@ public:
virtual DfaVertex* clone(DfaGraph* graphp) { virtual DfaVertex* clone(DfaGraph* graphp) {
return new DfaVertex(graphp, start(), accepting()); return new DfaVertex(graphp, start(), accepting());
} }
virtual ~DfaVertex() {} virtual ~DfaVertex() override {}
// ACCESSORS // ACCESSORS
virtual string dotShape() const { return (accepting() ? "doublecircle" : ""); } virtual string dotShape() const override { return (accepting() ? "doublecircle" : ""); }
virtual string dotColor() const { return start() ? "blue" : (color() ? "red" : "black"); } virtual string dotColor() const override {
return start() ? "blue" : (color() ? "red" : "black");
}
bool start() const { return m_start; } bool start() const { return m_start; }
void start(bool flag) { m_start = flag; } void start(bool flag) { m_start = flag; }
bool accepting() const { return m_accepting; } bool accepting() const { return m_accepting; }
@ -126,16 +128,18 @@ public:
: V3GraphEdge(graphp, fromp, top, copyfrom->weight()) : V3GraphEdge(graphp, fromp, top, copyfrom->weight())
, m_input(copyfrom->input()) , m_input(copyfrom->input())
, m_complement(copyfrom->complement()) {} , m_complement(copyfrom->complement()) {}
virtual ~DfaEdge() {} virtual ~DfaEdge() override {}
// METHODS // METHODS
virtual string dotColor() const { return (na() ? "yellow" : epsilon() ? "green" : "black"); } virtual string dotColor() const override {
virtual string dotLabel() const { return (na() ? "yellow" : epsilon() ? "green" : "black");
}
virtual string dotLabel() const override {
return (na() ? "" return (na() ? ""
: epsilon() ? "e" : epsilon() ? "e"
: complement() ? ("not " + cvtToStr(input().toInt())) : complement() ? ("not " + cvtToStr(input().toInt()))
: cvtToStr(input().toInt())); : cvtToStr(input().toInt()));
} }
virtual string dotStyle() const { return (na() || cutable()) ? "dashed" : ""; } virtual string dotStyle() const override { return (na() || cutable()) ? "dashed" : ""; }
bool epsilon() const { return input().toInt() == EPSILON().toInt(); } bool epsilon() const { return input().toInt() == EPSILON().toInt(); }
bool na() const { return input().toInt() == NA().toInt(); } bool na() const { return input().toInt() == NA().toInt(); }
bool complement() const { return m_complement; } bool complement() const { return m_complement; }

View File

@ -57,18 +57,18 @@ public:
V3GraphTestVertex(V3Graph* graphp, const string& name) V3GraphTestVertex(V3Graph* graphp, const string& name)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_name(name) {} , m_name(name) {}
virtual ~V3GraphTestVertex() {} virtual ~V3GraphTestVertex() override {}
// ACCESSORS // ACCESSORS
virtual string name() const { return m_name; } virtual string name() const override { return m_name; }
}; };
class V3GraphTestVarVertex : public V3GraphTestVertex { class V3GraphTestVarVertex : public V3GraphTestVertex {
public: public:
V3GraphTestVarVertex(V3Graph* graphp, const string& name) V3GraphTestVarVertex(V3Graph* graphp, const string& name)
: V3GraphTestVertex(graphp, name) {} : V3GraphTestVertex(graphp, name) {}
virtual ~V3GraphTestVarVertex() {} virtual ~V3GraphTestVarVertex() override {}
// ACCESSORS // ACCESSORS
virtual string dotColor() const { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
//###################################################################### //######################################################################
@ -77,8 +77,8 @@ public:
class V3GraphTestStrong : public V3GraphTest { class V3GraphTestStrong : public V3GraphTest {
public: public:
virtual string name() { return "strong"; } virtual string name() override { return "strong"; }
virtual void runTest() { virtual void runTest() override {
V3Graph* gp = &m_graph; V3Graph* gp = &m_graph;
// Verify we break edges at a good point // Verify we break edges at a good point
// A simple alg would make 3 breaks, below only requires b->i to break // A simple alg would make 3 breaks, below only requires b->i to break
@ -115,8 +115,8 @@ public:
class V3GraphTestAcyc : public V3GraphTest { class V3GraphTestAcyc : public V3GraphTest {
public: public:
virtual string name() { return "acyc"; } virtual string name() override { return "acyc"; }
virtual void runTest() { virtual void runTest() override {
V3Graph* gp = &m_graph; V3Graph* gp = &m_graph;
// Verify we break edges at a good point // Verify we break edges at a good point
// A simple alg would make 3 breaks, below only requires b->i to break // A simple alg would make 3 breaks, below only requires b->i to break
@ -143,8 +143,8 @@ public:
class V3GraphTestVars : public V3GraphTest { class V3GraphTestVars : public V3GraphTest {
public: public:
virtual string name() { return "vars"; } virtual string name() override { return "vars"; }
virtual void runTest() { virtual void runTest() override {
V3Graph* gp = &m_graph; V3Graph* gp = &m_graph;
V3GraphTestVertex* clk = new V3GraphTestVarVertex(gp, "$clk"); V3GraphTestVertex* clk = new V3GraphTestVarVertex(gp, "$clk");
@ -267,16 +267,16 @@ public:
DfaTestVertex(DfaGraph* graphp, const string& name) DfaTestVertex(DfaGraph* graphp, const string& name)
: DfaVertex(graphp) : DfaVertex(graphp)
, m_name(name) {} , m_name(name) {}
virtual ~DfaTestVertex() {} virtual ~DfaTestVertex() override {}
// ACCESSORS // ACCESSORS
virtual string name() const { return m_name; } virtual string name() const override { return m_name; }
}; };
class V3GraphTestDfa : public V3GraphTest { class V3GraphTestDfa : public V3GraphTest {
public: public:
virtual string name() { return "dfa"; } virtual string name() override { return "dfa"; }
virtual void runTest() { virtual void runTest() override {
DfaGraph* gp = &m_graph; DfaGraph* gp = &m_graph;
// NFA Pattern for ( (LR) | (L*R)) Z // NFA Pattern for ( (LR) | (L*R)) Z
@ -330,8 +330,8 @@ class V3GraphTestImport : public V3GraphTest {
#endif #endif
public: public:
virtual string name() { return "import"; } virtual string name() override { return "import"; }
virtual void runTest() { virtual void runTest() override {
DfaGraph* gp = &m_graph; DfaGraph* gp = &m_graph;
if (V3GraphTest::debug()) DfaGraph::debug(9); if (V3GraphTest::debug()) DfaGraph::debug(9);
dotImport(); dotImport();

View File

@ -103,7 +103,7 @@ public:
nodeHashIterate(const_cast<AstNode*>(nodep)); nodeHashIterate(const_cast<AstNode*>(nodep));
} }
V3Hash finalHash() const { return m_lowerHash; } V3Hash finalHash() const { return m_lowerHash; }
virtual ~HashedVisitor() {} virtual ~HashedVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -223,7 +223,7 @@ public:
m_modp = nullptr; m_modp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~InlineMarkVisitor() { virtual ~InlineMarkVisitor() override {
V3Stats::addStat("Optimizations, Inline unsupported", m_statUnsup); V3Stats::addStat("Optimizations, Inline unsupported", m_statUnsup);
// Done with these, are not outputs // Done with these, are not outputs
AstNode::user2ClearTree(); AstNode::user2ClearTree();
@ -257,7 +257,7 @@ public:
explicit InlineCollectVisitor(AstNodeModule* nodep) { // passed OLD module, not new one explicit InlineCollectVisitor(AstNodeModule* nodep) { // passed OLD module, not new one
iterate(nodep); iterate(nodep);
} }
virtual ~InlineCollectVisitor() {} virtual ~InlineCollectVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -475,7 +475,7 @@ public:
m_cellp = cellp; m_cellp = cellp;
iterate(cloneModp); iterate(cloneModp);
} }
virtual ~InlineRelinkVisitor() {} virtual ~InlineRelinkVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -618,7 +618,7 @@ public:
m_modp = nullptr; m_modp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~InlineVisitor() { // virtual ~InlineVisitor() override { //
V3Stats::addStat("Optimizations, Inlined cells", m_statCells); V3Stats::addStat("Optimizations, Inlined cells", m_statCells);
} }
}; };
@ -709,7 +709,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit InlineIntfRefVisitor(AstNode* nodep) { iterate(nodep); } explicit InlineIntfRefVisitor(AstNode* nodep) { iterate(nodep); }
virtual ~InlineIntfRefVisitor() {} virtual ~InlineIntfRefVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -136,7 +136,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~InstVisitor() {} virtual ~InstVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -190,7 +190,7 @@ public:
m_modVarNameMap.clear(); m_modVarNameMap.clear();
iterate(nodep); iterate(nodep);
} }
virtual ~InstDeModVarVisitor() {} virtual ~InstDeModVarVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -472,7 +472,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~InstDeVisitor() {} virtual ~InstDeVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -77,7 +77,7 @@ public:
, m_osp(osp) { , m_osp(osp) {
if (nodep) iterate(nodep); if (nodep) iterate(nodep);
} }
virtual ~InstrCountVisitor() {} virtual ~InstrCountVisitor() override {}
// METHODS // METHODS
uint32_t instrCount() const { return m_instrCount; } uint32_t instrCount() const { return m_instrCount; }
@ -280,7 +280,7 @@ public:
UASSERT_OBJ(osp, nodep, "Don't call if not dumping"); UASSERT_OBJ(osp, nodep, "Don't call if not dumping");
if (nodep) iterate(nodep); if (nodep) iterate(nodep);
} }
virtual ~InstrCountDumpVisitor() {} virtual ~InstrCountDumpVisitor() override {}
private: private:
// METHODS // METHODS

View File

@ -453,7 +453,7 @@ public:
if (m_lifep) VL_DO_CLEAR(delete m_lifep, m_lifep = nullptr); if (m_lifep) VL_DO_CLEAR(delete m_lifep, m_lifep = nullptr);
} }
} }
virtual ~LifeVisitor() { virtual ~LifeVisitor() override {
if (m_lifep) VL_DO_CLEAR(delete m_lifep, m_lifep = nullptr); if (m_lifep) VL_DO_CLEAR(delete m_lifep, m_lifep = nullptr);
} }
VL_UNCOPYABLE(LifeVisitor); VL_UNCOPYABLE(LifeVisitor);
@ -490,7 +490,7 @@ public:
m_statep = statep; m_statep = statep;
iterate(nodep); iterate(nodep);
} }
virtual ~LifeTopVisitor() {} virtual ~LifeTopVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -94,7 +94,7 @@ public:
: m_tracingCall(false) { : m_tracingCall(false) {
iterate(nodep); iterate(nodep);
} }
virtual ~LifePostElimVisitor() {} virtual ~LifePostElimVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -354,7 +354,7 @@ public:
, m_mtasksGraphp(nullptr) { , m_mtasksGraphp(nullptr) {
iterate(nodep); iterate(nodep);
} }
virtual ~LifePostDlyVisitor() { virtual ~LifePostDlyVisitor() override {
V3Stats::addStat("Optimizations, Lifetime postassign deletions", m_statAssnDel); V3Stats::addStat("Optimizations, Lifetime postassign deletions", m_statAssnDel);
} }
}; };

View File

@ -44,8 +44,8 @@
class LinkCellsGraph : public V3Graph { class LinkCellsGraph : public V3Graph {
public: public:
LinkCellsGraph() {} LinkCellsGraph() {}
virtual ~LinkCellsGraph() {} virtual ~LinkCellsGraph() override {}
virtual void loopsMessageCb(V3GraphVertex* vertexp); virtual void loopsMessageCb(V3GraphVertex* vertexp) override;
}; };
class LinkCellsVertex : public V3GraphVertex { class LinkCellsVertex : public V3GraphVertex {
@ -55,12 +55,12 @@ public:
LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp) LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_modp(modp) {} , m_modp(modp) {}
virtual ~LinkCellsVertex() {} virtual ~LinkCellsVertex() override {}
AstNodeModule* modp() const { return m_modp; } AstNodeModule* modp() const { return m_modp; }
virtual string name() const { return modp()->name(); } virtual string name() const override { return modp()->name(); }
virtual FileLine* fileline() const { return modp()->fileline(); } virtual FileLine* fileline() const override { return modp()->fileline(); }
// Recursive modules get space for maximum recursion // Recursive modules get space for maximum recursion
virtual uint32_t rankAdder() const { virtual uint32_t rankAdder() const override {
return m_modp->recursiveClone() ? (1 + v3Global.opt.moduleRecursionDepth()) : 1; return m_modp->recursiveClone() ? (1 + v3Global.opt.moduleRecursionDepth()) : 1;
} }
}; };
@ -69,8 +69,8 @@ class LibraryVertex : public V3GraphVertex {
public: public:
explicit LibraryVertex(V3Graph* graphp) explicit LibraryVertex(V3Graph* graphp)
: V3GraphVertex(graphp) {} : V3GraphVertex(graphp) {}
virtual ~LibraryVertex() {} virtual ~LibraryVertex() override {}
virtual string name() const { return "*LIBRARY*"; } virtual string name() const override { return "*LIBRARY*"; }
}; };
void LinkCellsGraph::loopsMessageCb(V3GraphVertex* vertexp) { void LinkCellsGraph::loopsMessageCb(V3GraphVertex* vertexp) {
@ -521,7 +521,7 @@ public:
} }
iterate(nodep); iterate(nodep);
} }
virtual ~LinkCellsVisitor() {} virtual ~LinkCellsVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -78,19 +78,19 @@
class LinkNodeMatcherFTask : public VNodeMatcher { class LinkNodeMatcherFTask : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { return VN_IS(nodep, NodeFTask); } virtual bool nodeMatch(const AstNode* nodep) const override { return VN_IS(nodep, NodeFTask); }
}; };
class LinkNodeMatcherModport : public VNodeMatcher { class LinkNodeMatcherModport : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { return VN_IS(nodep, Modport); } virtual bool nodeMatch(const AstNode* nodep) const override { return VN_IS(nodep, Modport); }
}; };
class LinkNodeMatcherVar : public VNodeMatcher { class LinkNodeMatcherVar : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { return VN_IS(nodep, Var); } virtual bool nodeMatch(const AstNode* nodep) const override { return VN_IS(nodep, Var); }
}; };
class LinkNodeMatcherVarIO : public VNodeMatcher { class LinkNodeMatcherVarIO : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { virtual bool nodeMatch(const AstNode* nodep) const override {
const AstVar* varp = VN_CAST_CONST(nodep, Var); const AstVar* varp = VN_CAST_CONST(nodep, Var);
if (!varp) return false; if (!varp) return false;
return varp->isIO(); return varp->isIO();
@ -98,7 +98,7 @@ public:
}; };
class LinkNodeMatcherVarParam : public VNodeMatcher { class LinkNodeMatcherVarParam : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { virtual bool nodeMatch(const AstNode* nodep) const override {
const AstVar* varp = VN_CAST_CONST(nodep, Var); const AstVar* varp = VN_CAST_CONST(nodep, Var);
if (!varp) return false; if (!varp) return false;
return varp->isParam(); return varp->isParam();
@ -106,7 +106,7 @@ public:
}; };
class LinkNodeMatcherVarOrScope : public VNodeMatcher { class LinkNodeMatcherVarOrScope : public VNodeMatcher {
public: public:
virtual bool nodeMatch(const AstNode* nodep) const { virtual bool nodeMatch(const AstNode* nodep) const override {
return VN_IS(nodep, Var) || VN_IS(nodep, Scope); return VN_IS(nodep, Var) || VN_IS(nodep, Scope);
} }
}; };
@ -1267,7 +1267,7 @@ public:
// //
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotFindVisitor() {} virtual ~LinkDotFindVisitor() override {}
}; };
//====================================================================== //======================================================================
@ -1434,7 +1434,7 @@ public:
// //
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotParamVisitor() {} virtual ~LinkDotParamVisitor() override {}
}; };
//====================================================================== //======================================================================
@ -1590,7 +1590,7 @@ public:
// //
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotScopeVisitor() {} virtual ~LinkDotScopeVisitor() override {}
}; };
//====================================================================== //======================================================================
@ -1675,7 +1675,7 @@ public:
m_statep = statep; m_statep = statep;
iterate(nodep); iterate(nodep);
} }
virtual ~LinkDotIfaceVisitor() {} virtual ~LinkDotIfaceVisitor() override {}
}; };
void LinkDotState::computeIfaceModSyms() { void LinkDotState::computeIfaceModSyms() {
@ -2825,7 +2825,7 @@ public:
// //
iterate(rootp); iterate(rootp);
} }
virtual ~LinkDotResolveVisitor() {} virtual ~LinkDotResolveVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -241,7 +241,7 @@ public:
m_unsupportedHere = false; m_unsupportedHere = false;
iterate(nodep); iterate(nodep);
} }
virtual ~LinkIncVisitor() {} virtual ~LinkIncVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -294,7 +294,7 @@ public:
m_modRepeatNum = 0; m_modRepeatNum = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~LinkJumpVisitor() {} virtual ~LinkJumpVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -303,7 +303,7 @@ public:
m_ftaskp = nullptr; m_ftaskp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~LinkLValueVisitor() {} virtual ~LinkLValueVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -604,7 +604,7 @@ public:
m_valueModp = nullptr; m_valueModp = nullptr;
iterate(rootp); iterate(rootp);
} }
virtual ~LinkParseVisitor() {} virtual ~LinkParseVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -530,7 +530,7 @@ public:
m_senitemCvtNum = 0; m_senitemCvtNum = 0;
iterate(rootp); iterate(rootp);
} }
virtual ~LinkResolveVisitor() {} virtual ~LinkResolveVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -574,7 +574,7 @@ public:
// //
iterate(rootp); iterate(rootp);
} }
virtual ~LinkBotupVisitor() {} virtual ~LinkBotupVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -85,7 +85,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
explicit LocalizeDehierVisitor(AstNetlist* nodep) { iterate(nodep); } explicit LocalizeDehierVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~LocalizeDehierVisitor() {} virtual ~LocalizeDehierVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -225,7 +225,7 @@ public:
m_cfuncp = nullptr; m_cfuncp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~LocalizeVisitor() { virtual ~LocalizeVisitor() override {
V3Stats::addStat("Optimizations, Vars localized", m_statLocVars); V3Stats::addStat("Optimizations, Vars localized", m_statLocVars);
} }
}; };

View File

@ -329,7 +329,7 @@ public:
m_markVars.clear(); m_markVars.clear();
iterate(nodep); iterate(nodep);
} }
virtual ~MergeCondVisitor() { virtual ~MergeCondVisitor() override {
V3Stats::addStat("Optimizations, MergeCond merges", m_statMerges); V3Stats::addStat("Optimizations, MergeCond merges", m_statMerges);
V3Stats::addStat("Optimizations, MergeCond merged items", m_statMergedItems); V3Stats::addStat("Optimizations, MergeCond merged items", m_statMergedItems);
V3Stats::addStat("Optimizations, MergeCond longest merge", m_statLongestList); V3Stats::addStat("Optimizations, MergeCond longest merge", m_statLongestList);

View File

@ -140,7 +140,7 @@ public:
m_modp = nullptr; m_modp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~NameVisitor() {} virtual ~NameVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -371,7 +371,7 @@ public:
iterate(nodep); iterate(nodep);
} while (m_newClkMarked); } while (m_newClkMarked);
} }
virtual ~OrderClkMarkVisitor() {} virtual ~OrderClkMarkVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -405,7 +405,7 @@ public:
m_clkAss = false; m_clkAss = false;
iterate(nodep); iterate(nodep);
} }
virtual ~OrderClkAssVisitor() {} virtual ~OrderClkAssVisitor() override {}
// METHODS // METHODS
bool isClkAss() { return m_clkAss; } bool isClkAss() { return m_clkAss; }
}; };
@ -1240,7 +1240,7 @@ public:
m_pomNewStmts = 0; m_pomNewStmts = 0;
if (debug()) m_graph.debug(5); // 3 is default if global debug; we want acyc debugging if (debug()) m_graph.debug(5); // 3 is default if global debug; we want acyc debugging
} }
virtual ~OrderVisitor() { virtual ~OrderVisitor() override {
// Stats // Stats
for (int type = 0; type < OrderVEdgeType::_ENUM_END; type++) { for (int type = 0; type < OrderVEdgeType::_ENUM_END; type++) {
double count = double(m_statCut[type]); double count = double(m_statCut[type]);

View File

@ -113,9 +113,9 @@ inline bool operator==(OrderVEdgeType::en lhs, const OrderVEdgeType& rhs) {
class OrderGraph : public V3Graph { class OrderGraph : public V3Graph {
public: public:
OrderGraph() {} OrderGraph() {}
virtual ~OrderGraph() {} virtual ~OrderGraph() override {}
// Methods // Methods
virtual void loopsVertexCb(V3GraphVertex* vertexp); virtual void loopsVertexCb(V3GraphVertex* vertexp) override;
}; };
//###################################################################### //######################################################################
@ -138,12 +138,12 @@ public:
, m_scopep(scopep) , m_scopep(scopep)
, m_domainp(domainp) , m_domainp(domainp)
, m_isFromInput(false) {} , m_isFromInput(false) {}
virtual ~OrderEitherVertex() {} virtual ~OrderEitherVertex() override {}
virtual OrderEitherVertex* clone(V3Graph* graphp) const = 0; virtual OrderEitherVertex* clone(V3Graph* graphp) const override = 0;
// Methods // Methods
virtual OrderVEdgeType type() const = 0; virtual OrderVEdgeType type() const = 0;
virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex virtual bool domainMatters() = 0; // Must be in same domain when cross edge to this vertex
virtual string dotName() const { return cvtToHex(m_scopep) + "_"; } virtual string dotName() const override { return cvtToHex(m_scopep) + "_"; }
// ACCESSORS // ACCESSORS
void domainp(AstSenTree* domainp) { m_domainp = domainp; } void domainp(AstSenTree* domainp) { m_domainp = domainp; }
AstScope* scopep() const { return m_scopep; } AstScope* scopep() const { return m_scopep; }
@ -161,15 +161,15 @@ public:
: OrderEitherVertex(graphp, nullptr, domainp) { : OrderEitherVertex(graphp, nullptr, domainp) {
isFromInput(true); // By definition isFromInput(true); // By definition
} }
virtual ~OrderInputsVertex() {} virtual ~OrderInputsVertex() override {}
virtual OrderInputsVertex* clone(V3Graph* graphp) const { virtual OrderInputsVertex* clone(V3Graph* graphp) const override {
return new OrderInputsVertex(graphp, *this); return new OrderInputsVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_INPUTS; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_INPUTS; }
virtual string name() const { return "*INPUTS*"; } virtual string name() const override { return "*INPUTS*"; }
virtual string dotColor() const { return "green"; } virtual string dotColor() const override { return "green"; }
virtual string dotName() const { return ""; } virtual string dotName() const override { return ""; }
virtual bool domainMatters() { return false; } virtual bool domainMatters() override { return false; }
}; };
class OrderLogicVertex : public OrderEitherVertex { class OrderLogicVertex : public OrderEitherVertex {
@ -184,18 +184,18 @@ public:
OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep) OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep)
: OrderEitherVertex(graphp, scopep, domainp) : OrderEitherVertex(graphp, scopep, domainp)
, m_nodep(nodep) {} , m_nodep(nodep) {}
virtual ~OrderLogicVertex() {} virtual ~OrderLogicVertex() override {}
virtual OrderLogicVertex* clone(V3Graph* graphp) const { virtual OrderLogicVertex* clone(V3Graph* graphp) const override {
return new OrderLogicVertex(graphp, *this); return new OrderLogicVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_LOGIC; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_LOGIC; }
virtual bool domainMatters() { return true; } virtual bool domainMatters() override { return true; }
// ACCESSORS // ACCESSORS
virtual string name() const { virtual string name() const override {
return (cvtToHex(m_nodep) + "\\n " + cvtToStr(nodep()->typeName())); return (cvtToHex(m_nodep) + "\\n " + cvtToStr(nodep()->typeName()));
} }
AstNode* nodep() const { return m_nodep; } AstNode* nodep() const { return m_nodep; }
virtual string dotColor() const { return "yellow"; } virtual string dotColor() const override { return "yellow"; }
}; };
class OrderVarVertex : public OrderEitherVertex { class OrderVarVertex : public OrderEitherVertex {
@ -215,10 +215,10 @@ public:
, m_varScp(varScp) , m_varScp(varScp)
, m_isClock(false) , m_isClock(false)
, m_isDelayed(false) {} , m_isDelayed(false) {}
virtual ~OrderVarVertex() {} virtual ~OrderVarVertex() override {}
virtual OrderVarVertex* clone(V3Graph* graphp) const = 0; virtual OrderVarVertex* clone(V3Graph* graphp) const override = 0;
virtual OrderVEdgeType type() const = 0; virtual OrderVEdgeType type() const override = 0;
virtual FileLine* fileline() const { return varScp()->fileline(); } virtual FileLine* fileline() const override { return varScp()->fileline(); }
// ACCESSORS // ACCESSORS
AstVarScope* varScp() const { return m_varScp; } AstVarScope* varScp() const { return m_varScp; }
void isClock(bool flag) { m_isClock = flag; } void isClock(bool flag) { m_isClock = flag; }
@ -234,14 +234,16 @@ class OrderVarStdVertex : public OrderVarVertex {
public: public:
OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex(graphp, scopep, varScp) {} : OrderVarVertex(graphp, scopep, varScp) {}
virtual ~OrderVarStdVertex() {} virtual ~OrderVarStdVertex() override {}
virtual OrderVarStdVertex* clone(V3Graph* graphp) const { virtual OrderVarStdVertex* clone(V3Graph* graphp) const override {
return new OrderVarStdVertex(graphp, *this); return new OrderVarStdVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSTD; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARSTD; }
virtual string name() const { return (cvtToHex(varScp()) + "\\n " + varScp()->name()); } virtual string name() const override {
virtual string dotColor() const { return "skyblue"; } return (cvtToHex(varScp()) + "\\n " + varScp()->name());
virtual bool domainMatters() { return true; } }
virtual string dotColor() const override { return "skyblue"; }
virtual bool domainMatters() override { return true; }
}; };
class OrderVarPreVertex : public OrderVarVertex { class OrderVarPreVertex : public OrderVarVertex {
OrderVarPreVertex(V3Graph* graphp, const OrderVarPreVertex& old) OrderVarPreVertex(V3Graph* graphp, const OrderVarPreVertex& old)
@ -250,14 +252,16 @@ class OrderVarPreVertex : public OrderVarVertex {
public: public:
OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex(graphp, scopep, varScp) {} : OrderVarVertex(graphp, scopep, varScp) {}
virtual ~OrderVarPreVertex() {} virtual ~OrderVarPreVertex() override {}
virtual OrderVarPreVertex* clone(V3Graph* graphp) const { virtual OrderVarPreVertex* clone(V3Graph* graphp) const override {
return new OrderVarPreVertex(graphp, *this); return new OrderVarPreVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPRE; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPRE; }
virtual string name() const { return (cvtToHex(varScp()) + " PRE\\n " + varScp()->name()); } virtual string name() const override {
virtual string dotColor() const { return "lightblue"; } return (cvtToHex(varScp()) + " PRE\\n " + varScp()->name());
virtual bool domainMatters() { return false; } }
virtual string dotColor() const override { return "lightblue"; }
virtual bool domainMatters() override { return false; }
}; };
class OrderVarPostVertex : public OrderVarVertex { class OrderVarPostVertex : public OrderVarVertex {
OrderVarPostVertex(V3Graph* graphp, const OrderVarPostVertex& old) OrderVarPostVertex(V3Graph* graphp, const OrderVarPostVertex& old)
@ -266,14 +270,16 @@ class OrderVarPostVertex : public OrderVarVertex {
public: public:
OrderVarPostVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarPostVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex(graphp, scopep, varScp) {} : OrderVarVertex(graphp, scopep, varScp) {}
virtual OrderVarPostVertex* clone(V3Graph* graphp) const { virtual OrderVarPostVertex* clone(V3Graph* graphp) const override {
return new OrderVarPostVertex(graphp, *this); return new OrderVarPostVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPOST; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPOST; }
virtual ~OrderVarPostVertex() {} virtual ~OrderVarPostVertex() override {}
virtual string name() const { return (cvtToHex(varScp()) + " POST\\n " + varScp()->name()); } virtual string name() const override {
virtual string dotColor() const { return "CadetBlue"; } return (cvtToHex(varScp()) + " POST\\n " + varScp()->name());
virtual bool domainMatters() { return false; } }
virtual string dotColor() const override { return "CadetBlue"; }
virtual bool domainMatters() override { return false; }
}; };
class OrderVarPordVertex : public OrderVarVertex { class OrderVarPordVertex : public OrderVarVertex {
OrderVarPordVertex(V3Graph* graphp, const OrderVarPordVertex& old) OrderVarPordVertex(V3Graph* graphp, const OrderVarPordVertex& old)
@ -282,14 +288,16 @@ class OrderVarPordVertex : public OrderVarVertex {
public: public:
OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex(graphp, scopep, varScp) {} : OrderVarVertex(graphp, scopep, varScp) {}
virtual ~OrderVarPordVertex() {} virtual ~OrderVarPordVertex() override {}
virtual OrderVarPordVertex* clone(V3Graph* graphp) const { virtual OrderVarPordVertex* clone(V3Graph* graphp) const override {
return new OrderVarPordVertex(graphp, *this); return new OrderVarPordVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPORD; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPORD; }
virtual string name() const { return (cvtToHex(varScp()) + " PORD\\n " + varScp()->name()); } virtual string name() const override {
virtual string dotColor() const { return "NavyBlue"; } return (cvtToHex(varScp()) + " PORD\\n " + varScp()->name());
virtual bool domainMatters() { return false; } }
virtual string dotColor() const override { return "NavyBlue"; }
virtual bool domainMatters() override { return false; }
}; };
class OrderVarSettleVertex : public OrderVarVertex { class OrderVarSettleVertex : public OrderVarVertex {
OrderVarSettleVertex(V3Graph* graphp, const OrderVarSettleVertex& old) OrderVarSettleVertex(V3Graph* graphp, const OrderVarSettleVertex& old)
@ -298,14 +306,16 @@ class OrderVarSettleVertex : public OrderVarVertex {
public: public:
OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp) OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
: OrderVarVertex(graphp, scopep, varScp) {} : OrderVarVertex(graphp, scopep, varScp) {}
virtual ~OrderVarSettleVertex() {} virtual ~OrderVarSettleVertex() override {}
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const { virtual OrderVarSettleVertex* clone(V3Graph* graphp) const override {
return new OrderVarSettleVertex(graphp, *this); return new OrderVarSettleVertex(graphp, *this);
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSETTLE; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARSETTLE; }
virtual string name() const { return (cvtToHex(varScp()) + " STL\\n " + varScp()->name()); } virtual string name() const override {
virtual string dotColor() const { return "PowderBlue"; } return (cvtToHex(varScp()) + " STL\\n " + varScp()->name());
virtual bool domainMatters() { return false; } }
virtual string dotColor() const override { return "PowderBlue"; }
virtual bool domainMatters() override { return false; }
}; };
//###################################################################### //######################################################################
@ -332,28 +342,28 @@ public:
, m_logicp(logicp) , m_logicp(logicp)
, m_state(POM_WAIT) , m_state(POM_WAIT)
, m_domScopep(nullptr) {} , m_domScopep(nullptr) {}
virtual ~OrderMoveVertex() {} virtual ~OrderMoveVertex() override {}
virtual OrderMoveVertex* clone(V3Graph* graphp) const { virtual OrderMoveVertex* clone(V3Graph* graphp) const override {
v3fatalSrc("Unsupported"); v3fatalSrc("Unsupported");
return nullptr; return nullptr;
} }
// METHODS // METHODS
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; } virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; }
virtual string dotColor() const { virtual string dotColor() const override {
if (logicp()) { if (logicp()) {
return logicp()->dotColor(); return logicp()->dotColor();
} else { } else {
return ""; return "";
} }
} }
virtual FileLine* fileline() const { virtual FileLine* fileline() const override {
if (logicp()) { if (logicp()) {
return logicp()->fileline(); return logicp()->fileline();
} else { } else {
return nullptr; return nullptr;
} }
} }
virtual string name() const { virtual string name() const override {
string nm; string nm;
if (VL_UNCOVERABLE(!logicp())) { // Avoid crash when debugging if (VL_UNCOVERABLE(!logicp())) { // Avoid crash when debugging
nm = "nul"; // LCOV_EXCL_LINE nm = "nul"; // LCOV_EXCL_LINE
@ -402,20 +412,20 @@ public:
, m_domainp(domainp) { , m_domainp(domainp) {
UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n"); UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n");
} }
virtual ~MTaskMoveVertex() {} virtual ~MTaskMoveVertex() override {}
virtual MTaskMoveVertex* clone(V3Graph* graphp) const { virtual MTaskMoveVertex* clone(V3Graph* graphp) const override {
v3fatalSrc("Unsupported"); v3fatalSrc("Unsupported");
return nullptr; return nullptr;
} }
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; } virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; }
virtual string dotColor() const { virtual string dotColor() const override {
if (logicp()) { if (logicp()) {
return logicp()->dotColor(); return logicp()->dotColor();
} else { } else {
return "yellow"; return "yellow";
} }
} }
virtual string name() const { virtual string name() const override {
string nm; string nm;
if (logicp()) { if (logicp()) {
nm = logicp()->name(); nm = logicp()->name();
@ -447,9 +457,10 @@ public:
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight, OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
bool cutable = false) bool cutable = false)
: V3GraphEdge(graphp, fromp, top, weight, cutable) {} : V3GraphEdge(graphp, fromp, top, weight, cutable) {}
virtual ~OrderEdge() {} virtual ~OrderEdge() override {}
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; } virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_STD; }
virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) const { virtual OrderEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const override {
return new OrderEdge(graphp, fromp, top, *this); return new OrderEdge(graphp, fromp, top, *this);
} }
// When ordering combo blocks with stronglyConnected, follow edges not // When ordering combo blocks with stronglyConnected, follow edges not
@ -473,14 +484,14 @@ class OrderComboCutEdge : public OrderEdge {
public: public:
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {} : OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_COMBOCUT; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_COMBOCUT; }
virtual ~OrderComboCutEdge() {} virtual ~OrderComboCutEdge() override {}
virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const { V3GraphVertex* top) const override {
return new OrderComboCutEdge(graphp, fromp, top, *this); return new OrderComboCutEdge(graphp, fromp, top, *this);
} }
virtual string dotColor() const { return "yellowGreen"; } virtual string dotColor() const override { return "yellowGreen"; }
virtual bool followComboConnected() const { return true; } virtual bool followComboConnected() const override { return true; }
}; };
class OrderPostCutEdge : public OrderEdge { class OrderPostCutEdge : public OrderEdge {
@ -494,14 +505,14 @@ class OrderPostCutEdge : public OrderEdge {
public: public:
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {} : OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_POSTCUT; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_POSTCUT; }
virtual ~OrderPostCutEdge() {} virtual ~OrderPostCutEdge() override {}
virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const { V3GraphVertex* top) const override {
return new OrderPostCutEdge(graphp, fromp, top, *this); return new OrderPostCutEdge(graphp, fromp, top, *this);
} }
virtual string dotColor() const { return "PaleGreen"; } virtual string dotColor() const override { return "PaleGreen"; }
virtual bool followComboConnected() const { return false; } virtual bool followComboConnected() const override { return false; }
}; };
class OrderPreCutEdge : public OrderEdge { class OrderPreCutEdge : public OrderEdge {
@ -515,14 +526,14 @@ class OrderPreCutEdge : public OrderEdge {
public: public:
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: OrderEdge(graphp, fromp, top, WEIGHT_PRE, CUTABLE) {} : OrderEdge(graphp, fromp, top, WEIGHT_PRE, CUTABLE) {}
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_PRECUT; } virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_PRECUT; }
virtual OrderPreCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp, virtual OrderPreCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
V3GraphVertex* top) const { V3GraphVertex* top) const override {
return new OrderPreCutEdge(graphp, fromp, top, *this); return new OrderPreCutEdge(graphp, fromp, top, *this);
} }
virtual ~OrderPreCutEdge() {} virtual ~OrderPreCutEdge() override {}
virtual string dotColor() const { return "khaki"; } virtual string dotColor() const override { return "khaki"; }
virtual bool followComboConnected() const { return false; } virtual bool followComboConnected() const override { return false; }
}; };
#endif // Guard #endif // Guard

View File

@ -796,7 +796,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~ParamVisitor() {} virtual ~ParamVisitor() override {}
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -495,7 +495,7 @@ public:
m_vertices.splice(m_vertices.end(), otherp->m_vertices); m_vertices.splice(m_vertices.end(), otherp->m_vertices);
m_cost += otherp->m_cost; m_cost += otherp->m_cost;
} }
virtual const VxList* vertexListp() const { return &m_vertices; } virtual const VxList* vertexListp() const override { return &m_vertices; }
static vluint64_t incGeneration() { static vluint64_t incGeneration() {
static vluint64_t s_generation = 0; static vluint64_t s_generation = 0;
++s_generation; ++s_generation;
@ -505,10 +505,10 @@ public:
// Use this instead of pointer-compares to compare LogicMTasks. Avoids // Use this instead of pointer-compares to compare LogicMTasks. Avoids
// nondeterministic output. Also name mtasks based on this number in // nondeterministic output. Also name mtasks based on this number in
// the final C++ output. // the final C++ output.
virtual uint32_t id() const { return m_serialId; } virtual uint32_t id() const override { return m_serialId; }
void id(uint32_t id) { m_serialId = id; } void id(uint32_t id) { m_serialId = id; }
// Abstract cost of every logic mtask // Abstract cost of every logic mtask
virtual uint32_t cost() const { return m_cost; } virtual uint32_t cost() const override { return m_cost; }
void setCost(uint32_t cost) { m_cost = cost; } // For tests only void setCost(uint32_t cost) { m_cost = cost; } // For tests only
uint32_t stepCost() const { return stepCost(m_cost); } uint32_t stepCost() const { return stepCost(m_cost); }
static uint32_t stepCost(uint32_t cost) { static uint32_t stepCost(uint32_t cost) {
@ -559,7 +559,7 @@ public:
} }
} }
virtual string name() const { virtual string name() const override {
// Display forward and reverse critical path costs. This gives a quick // Display forward and reverse critical path costs. This gives a quick
// read on whether graph partitioning looks reasonable or bad. // read on whether graph partitioning looks reasonable or bad.
std::ostringstream out; std::ostringstream out;
@ -792,7 +792,7 @@ public:
fromp->addRelative(GraphWay::FORWARD, top); fromp->addRelative(GraphWay::FORWARD, top);
top->addRelative(GraphWay::REVERSE, fromp); top->addRelative(GraphWay::REVERSE, fromp);
} }
virtual ~MTaskEdge() { virtual ~MTaskEdge() override {
fromMTaskp()->removeRelative(GraphWay::FORWARD, toMTaskp()); fromMTaskp()->removeRelative(GraphWay::FORWARD, toMTaskp());
toMTaskp()->removeRelative(GraphWay::REVERSE, fromMTaskp()); toMTaskp()->removeRelative(GraphWay::REVERSE, fromMTaskp());
} }
@ -802,7 +802,7 @@ public:
} }
LogicMTask* fromMTaskp() const { return dynamic_cast<LogicMTask*>(fromp()); } LogicMTask* fromMTaskp() const { return dynamic_cast<LogicMTask*>(fromp()); }
LogicMTask* toMTaskp() const { return dynamic_cast<LogicMTask*>(top()); } LogicMTask* toMTaskp() const { return dynamic_cast<LogicMTask*>(top()); }
virtual bool mergeWouldCreateCycle() const { virtual bool mergeWouldCreateCycle() const override {
return LogicMTask::pathExistsFrom(fromMTaskp(), toMTaskp(), this); return LogicMTask::pathExistsFrom(fromMTaskp(), toMTaskp(), this);
} }
static MTaskEdge* cast(V3GraphEdge* edgep) { static MTaskEdge* cast(V3GraphEdge* edgep) {
@ -1702,7 +1702,7 @@ public:
iterate(nodep); iterate(nodep);
} }
bool hasDpiHazard() const { return m_hasDpiHazard; } bool hasDpiHazard() const { return m_hasDpiHazard; }
virtual ~DpiImportCallVisitor() {} virtual ~DpiImportCallVisitor() override {}
private: private:
VL_UNCOPYABLE(DpiImportCallVisitor); VL_UNCOPYABLE(DpiImportCallVisitor);

View File

@ -32,7 +32,7 @@ class AbstractMTask : public V3GraphVertex {
public: public:
AbstractMTask(V3Graph* graphp) AbstractMTask(V3Graph* graphp)
: V3GraphVertex(graphp) {} : V3GraphVertex(graphp) {}
virtual ~AbstractMTask() {} virtual ~AbstractMTask() override {}
virtual uint32_t id() const = 0; virtual uint32_t id() const = 0;
virtual uint32_t cost() const = 0; virtual uint32_t cost() const = 0;
}; };
@ -44,12 +44,12 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
AbstractLogicMTask(V3Graph* graphp) AbstractLogicMTask(V3Graph* graphp)
: AbstractMTask(graphp) {} : AbstractMTask(graphp) {}
virtual ~AbstractLogicMTask() {} virtual ~AbstractLogicMTask() override {}
// METHODS // METHODS
// Set of logic vertices in this mtask. Order is not significant. // Set of logic vertices in this mtask. Order is not significant.
virtual const VxList* vertexListp() const = 0; virtual const VxList* vertexListp() const = 0;
virtual uint32_t id() const = 0; // Unique id of this mtask. virtual uint32_t id() const override = 0; // Unique id of this mtask.
virtual uint32_t cost() const = 0; virtual uint32_t cost() const override = 0;
}; };
class ExecMTask : public AbstractMTask { class ExecMTask : public AbstractMTask {
@ -78,10 +78,10 @@ public:
, m_packNextp(nullptr) , m_packNextp(nullptr)
, m_threadRoot(false) {} , m_threadRoot(false) {}
AstMTaskBody* bodyp() const { return m_bodyp; } AstMTaskBody* bodyp() const { return m_bodyp; }
virtual uint32_t id() const { return m_id; } virtual uint32_t id() const override { return m_id; }
uint32_t priority() const { return m_priority; } uint32_t priority() const { return m_priority; }
void priority(uint32_t pri) { m_priority = pri; } void priority(uint32_t pri) { m_priority = pri; }
virtual uint32_t cost() const { return m_cost; } virtual uint32_t cost() const override { return m_cost; }
void cost(uint32_t cost) { m_cost = cost; } void cost(uint32_t cost) { m_cost = cost; }
void thread(uint32_t thread) { m_thread = thread; } void thread(uint32_t thread) { m_thread = thread; }
uint32_t thread() const { return m_thread; } uint32_t thread() const { return m_thread; }
@ -93,7 +93,7 @@ public:
// If this MTask maps to a C function, this should be the name // If this MTask maps to a C function, this should be the name
return string("__Vmtask") + "__" + cvtToStr(m_id); return string("__Vmtask") + "__" + cvtToStr(m_id);
} }
string name() const { return string("mt") + cvtToStr(id()); } virtual string name() const override { return string("mt") + cvtToStr(id()); }
void dump(std::ostream& str) const { void dump(std::ostream& str) const {
str << name() << "." << cvtToHex(this); str << name() << "." << cvtToHex(this);
if (priority() || cost()) str << " [pr=" << priority() << " c=" << cvtToStr(cost()) << "]"; if (priority() || cost()) str << " [pr=" << priority() << " c=" << cvtToStr(cost()) << "]";

View File

@ -76,7 +76,7 @@ public:
m_noopt = false; m_noopt = false;
iterate(nodep); iterate(nodep);
} }
virtual ~PremitAssignVisitor() {} virtual ~PremitAssignVisitor() override {}
bool noOpt() const { return m_noopt; } bool noOpt() const { return m_noopt; }
}; };
@ -408,7 +408,7 @@ public:
m_assignLhs = false; m_assignLhs = false;
iterate(nodep); iterate(nodep);
} }
virtual ~PremitVisitor() {} virtual ~PremitVisitor() override {}
}; };
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -251,7 +251,7 @@ public:
m_mgIndexHi = 0; m_mgIndexHi = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~ReloopVisitor() { virtual ~ReloopVisitor() override {
V3Stats::addStat("Optimizations, Reloops", m_statReloops); V3Stats::addStat("Optimizations, Reloops", m_statReloops);
V3Stats::addStat("Optimizations, Reloop iterations", m_statReItems); V3Stats::addStat("Optimizations, Reloop iterations", m_statReItems);
} }

View File

@ -328,7 +328,7 @@ public:
// //
iterate(nodep); iterate(nodep);
} }
virtual ~ScopeVisitor() {} virtual ~ScopeVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -406,7 +406,7 @@ public:
m_scopep = nullptr; m_scopep = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~ScopeCleanupVisitor() {} virtual ~ScopeCleanupVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -1131,7 +1131,7 @@ public:
setMode(false /*scoped*/, false /*checking*/, true /*params*/); setMode(false /*scoped*/, false /*checking*/, true /*params*/);
mainGuts(nodep); mainGuts(nodep);
} }
virtual ~SimulateVisitor() { virtual ~SimulateVisitor() override {
for (ConstPile::iterator it = m_constAllps.begin(); it != m_constAllps.end(); ++it) { for (ConstPile::iterator it = m_constAllps.begin(); it != m_constAllps.end(); ++it) {
for (ConstDeque::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) { for (ConstDeque::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
delete (*it2); delete (*it2);

View File

@ -229,7 +229,7 @@ public:
m_assignError = false; m_assignError = false;
iterate(nodep); iterate(nodep);
} }
virtual ~SliceVisitor() {} virtual ~SliceVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -102,12 +102,14 @@ protected:
SplitNodeVertex(V3Graph* graphp, AstNode* nodep) SplitNodeVertex(V3Graph* graphp, AstNode* nodep)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_nodep(nodep) {} , m_nodep(nodep) {}
virtual ~SplitNodeVertex() {} virtual ~SplitNodeVertex() override {}
// ACCESSORS // ACCESSORS
// Do not make accessor for nodep(), It may change due to // Do not make accessor for nodep(), It may change due to
// reordering a lower block, but we don't repair it // reordering a lower block, but we don't repair it
virtual string name() const { return cvtToHex(m_nodep) + ' ' + m_nodep->prettyTypeName(); } virtual string name() const override {
virtual FileLine* fileline() const { return nodep()->fileline(); } return cvtToHex(m_nodep) + ' ' + m_nodep->prettyTypeName();
}
virtual FileLine* fileline() const override { return nodep()->fileline(); }
public: public:
virtual AstNode* nodep() const { return m_nodep; } virtual AstNode* nodep() const { return m_nodep; }
@ -117,34 +119,34 @@ class SplitPliVertex : public SplitNodeVertex {
public: public:
explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep) explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex(graphp, nodep) {} : SplitNodeVertex(graphp, nodep) {}
virtual ~SplitPliVertex() {} virtual ~SplitPliVertex() override {}
virtual string name() const { return "*PLI*"; } virtual string name() const override { return "*PLI*"; }
virtual string dotColor() const { return "green"; } virtual string dotColor() const override { return "green"; }
}; };
class SplitLogicVertex : public SplitNodeVertex { class SplitLogicVertex : public SplitNodeVertex {
public: public:
SplitLogicVertex(V3Graph* graphp, AstNode* nodep) SplitLogicVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex(graphp, nodep) {} : SplitNodeVertex(graphp, nodep) {}
virtual ~SplitLogicVertex() {} virtual ~SplitLogicVertex() override {}
virtual string dotColor() const { return "yellow"; } virtual string dotColor() const override { return "yellow"; }
}; };
class SplitVarStdVertex : public SplitNodeVertex { class SplitVarStdVertex : public SplitNodeVertex {
public: public:
SplitVarStdVertex(V3Graph* graphp, AstNode* nodep) SplitVarStdVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex(graphp, nodep) {} : SplitNodeVertex(graphp, nodep) {}
virtual ~SplitVarStdVertex() {} virtual ~SplitVarStdVertex() override {}
virtual string dotColor() const { return "skyblue"; } virtual string dotColor() const override { return "skyblue"; }
}; };
class SplitVarPostVertex : public SplitNodeVertex { class SplitVarPostVertex : public SplitNodeVertex {
public: public:
SplitVarPostVertex(V3Graph* graphp, AstNode* nodep) SplitVarPostVertex(V3Graph* graphp, AstNode* nodep)
: SplitNodeVertex(graphp, nodep) {} : SplitNodeVertex(graphp, nodep) {}
virtual ~SplitVarPostVertex() {} virtual ~SplitVarPostVertex() override {}
virtual string name() const { return string("POST ") + SplitNodeVertex::name(); } virtual string name() const override { return string("POST ") + SplitNodeVertex::name(); }
virtual string dotColor() const { return "CadetBlue"; } virtual string dotColor() const override { return "CadetBlue"; }
}; };
//###################################################################### //######################################################################
@ -159,7 +161,7 @@ protected:
bool cutable = CUTABLE) bool cutable = CUTABLE)
: V3GraphEdge(graphp, fromp, top, weight, cutable) : V3GraphEdge(graphp, fromp, top, weight, cutable)
, m_ignoreInStep(0) {} , m_ignoreInStep(0) {}
virtual ~SplitEdge() {} virtual ~SplitEdge() override {}
public: public:
// Iterator for graph functions // Iterator for graph functions
@ -178,7 +180,7 @@ public:
if (!oedgep) v3fatalSrc("Following edge of non-SplitEdge type"); if (!oedgep) v3fatalSrc("Following edge of non-SplitEdge type");
return (!oedgep->ignoreThisStep()); return (!oedgep->ignoreThisStep());
} }
virtual string dotStyle() const { virtual string dotStyle() const override {
return ignoreThisStep() ? "dotted" : V3GraphEdge::dotStyle(); return ignoreThisStep() ? "dotted" : V3GraphEdge::dotStyle();
} }
}; };
@ -188,36 +190,36 @@ class SplitPostEdge : public SplitEdge {
public: public:
SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {} : SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
virtual ~SplitPostEdge() {} virtual ~SplitPostEdge() override {}
virtual bool followScoreboard() const { return false; } virtual bool followScoreboard() const override { return false; }
virtual string dotColor() const { return "khaki"; } virtual string dotColor() const override { return "khaki"; }
}; };
class SplitLVEdge : public SplitEdge { class SplitLVEdge : public SplitEdge {
public: public:
SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {} : SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
virtual ~SplitLVEdge() {} virtual ~SplitLVEdge() override {}
virtual bool followScoreboard() const { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const { return "yellowGreen"; } virtual string dotColor() const override { return "yellowGreen"; }
}; };
class SplitRVEdge : public SplitEdge { class SplitRVEdge : public SplitEdge {
public: public:
SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {} : SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
virtual ~SplitRVEdge() {} virtual ~SplitRVEdge() override {}
virtual bool followScoreboard() const { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const { return "green"; } virtual string dotColor() const override { return "green"; }
}; };
struct SplitScorebdEdge : public SplitEdge { struct SplitScorebdEdge : public SplitEdge {
public: public:
SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {} : SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
virtual ~SplitScorebdEdge() {} virtual ~SplitScorebdEdge() override {}
virtual bool followScoreboard() const { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
struct SplitStrictEdge : public SplitEdge { struct SplitStrictEdge : public SplitEdge {
@ -226,9 +228,9 @@ struct SplitStrictEdge : public SplitEdge {
public: public:
SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top) SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE) {} : SplitEdge(graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE) {}
virtual ~SplitStrictEdge() {} virtual ~SplitStrictEdge() override {}
virtual bool followScoreboard() const { return true; } virtual bool followScoreboard() const override { return true; }
virtual string dotColor() const { return "blue"; } virtual string dotColor() const override { return "blue"; }
}; };
//###################################################################### //######################################################################
@ -261,7 +263,7 @@ protected:
// CONSTRUCTORS // CONSTRUCTORS
public: public:
SplitReorderBaseVisitor() { scoreboardClear(); } SplitReorderBaseVisitor() { scoreboardClear(); }
virtual ~SplitReorderBaseVisitor() { virtual ~SplitReorderBaseVisitor() override {
V3Stats::addStat("Optimizations, Split always", m_statSplits); V3Stats::addStat("Optimizations, Split always", m_statSplits);
} }
@ -444,7 +446,7 @@ class ReorderVisitor : public SplitReorderBaseVisitor {
// CONSTRUCTORS // CONSTRUCTORS
public: public:
explicit ReorderVisitor(AstNetlist* nodep) { iterate(nodep); } explicit ReorderVisitor(AstNetlist* nodep) { iterate(nodep); }
virtual ~ReorderVisitor() {} virtual ~ReorderVisitor() override {}
// METHODS // METHODS
protected: protected:
@ -641,7 +643,7 @@ public:
// Visit through *nodep and map each AstNodeIf within to the set of // Visit through *nodep and map each AstNodeIf within to the set of
// colors it will participate in. Also find the whole set of colors. // colors it will participate in. Also find the whole set of colors.
explicit IfColorVisitor(AstAlways* nodep) { iterate(nodep); } explicit IfColorVisitor(AstAlways* nodep) { iterate(nodep); }
virtual ~IfColorVisitor() {} virtual ~IfColorVisitor() override {}
// METHODS // METHODS
const ColorSet& colors() const { return m_colors; } const ColorSet& colors() const { return m_colors; }
@ -706,7 +708,7 @@ public:
UINFO(6, " splitting always " << nodep << endl); UINFO(6, " splitting always " << nodep << endl);
} }
virtual ~EmitSplitVisitor() {} virtual ~EmitSplitVisitor() override {}
// METHODS // METHODS
void go() { void go() {
@ -812,7 +814,7 @@ public:
VL_DO_DANGLING(np->deleteTree(), np); VL_DO_DANGLING(np->deleteTree(), np);
} }
} }
virtual ~RemovePlaceholdersVisitor() {} virtual ~RemovePlaceholdersVisitor() override {}
virtual void visit(AstSplitPlaceholder* nodep) override { m_removeSet.insert(nodep); } virtual void visit(AstSplitPlaceholder* nodep) override { m_removeSet.insert(nodep); }
virtual void visit(AstNode* nodep) override { iterateChildren(nodep); } virtual void visit(AstNode* nodep) override { iterateChildren(nodep); }
@ -853,7 +855,7 @@ public:
} }
} }
virtual ~SplitVisitor() {} virtual ~SplitVisitor() override {}
// METHODS // METHODS
protected: protected:

View File

@ -61,7 +61,7 @@ public:
m_splitVscp = nullptr; m_splitVscp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~SplitAsFindVisitor() {} virtual ~SplitAsFindVisitor() override {}
// METHODS // METHODS
AstVarScope* splitVscp() const { return m_splitVscp; } AstVarScope* splitVscp() const { return m_splitVscp; }
}; };
@ -123,7 +123,7 @@ public:
m_matches = false; m_matches = false;
iterate(nodep); iterate(nodep);
} }
virtual ~SplitAsCleanVisitor() {} virtual ~SplitAsCleanVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -193,7 +193,7 @@ public:
AstNode::user1ClearTree(); // user1p() used on entire tree AstNode::user1ClearTree(); // user1p() used on entire tree
iterate(nodep); iterate(nodep);
} }
virtual ~SplitAsVisitor() { virtual ~SplitAsVisitor() override {
V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits); V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits);
} }
}; };

View File

@ -220,7 +220,7 @@ public:
// Process // Process
iterate(nodep); iterate(nodep);
} }
virtual ~StatsVisitor() { virtual ~StatsVisitor() override {
// Done. Publish statistics // Done. Publish statistics
V3Stats::addStat(m_stage, "Instruction count, TOTAL", m_statInstr); V3Stats::addStat(m_stage, "Instruction count, TOTAL", m_statInstr);
V3Stats::addStat(m_stage, "Instruction count, fast critical", m_statInstrFast); V3Stats::addStat(m_stage, "Instruction count, fast critical", m_statInstrFast);

View File

@ -216,7 +216,7 @@ public:
m_origStep = origStep; m_origStep = origStep;
iterate(nodep); iterate(nodep);
} }
virtual ~SubstUseVisitor() {} virtual ~SubstUseVisitor() override {}
// METHODS // METHODS
bool ok() const { return m_ok; } bool ok() const { return m_ok; }
}; };
@ -375,7 +375,7 @@ public:
m_assignStep = 0; m_assignStep = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~SubstVisitor() { virtual ~SubstVisitor() override {
V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts); V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts);
for (std::vector<SubstVarEntry*>::iterator it = m_entryps.begin(); it != m_entryps.end(); for (std::vector<SubstVarEntry*>::iterator it = m_entryps.begin(); it != m_entryps.end();
++it) { ++it) {

View File

@ -59,7 +59,7 @@ public:
TspVertexTmpl(V3Graph* graphp, const T_Key& k) TspVertexTmpl(V3Graph* graphp, const T_Key& k)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_key(k) {} , m_key(k) {}
virtual ~TspVertexTmpl() {} virtual ~TspVertexTmpl() override {}
const T_Key& key() const { return m_key; } const T_Key& key() const { return m_key; }
private: private:
@ -80,7 +80,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
TspGraphTmpl() TspGraphTmpl()
: V3Graph() {} : V3Graph() {}
virtual ~TspGraphTmpl() {} virtual ~TspGraphTmpl() override {}
// METHODS // METHODS
void addVertex(const T_Key& key) { void addVertex(const T_Key& key) {
@ -507,7 +507,7 @@ public:
, m_ypos(ypos) , m_ypos(ypos)
, m_serial(++m_serialNext) {} , m_serial(++m_serialNext) {}
~TspTestState() {} ~TspTestState() {}
virtual int cost(const TspStateBase* otherp) const { virtual int cost(const TspStateBase* otherp) const override {
return cost(dynamic_cast<const TspTestState*>(otherp)); return cost(dynamic_cast<const TspTestState*>(otherp));
} }
static unsigned diff(unsigned a, unsigned b) { static unsigned diff(unsigned a, unsigned b) {
@ -527,7 +527,7 @@ public:
unsigned xpos() const { return m_xpos; } unsigned xpos() const { return m_xpos; }
unsigned ypos() const { return m_ypos; } unsigned ypos() const { return m_ypos; }
bool operator<(const TspStateBase& other) const { bool operator<(const TspStateBase& other) const override {
return operator<(dynamic_cast<const TspTestState&>(other)); return operator<(dynamic_cast<const TspTestState&>(other));
} }
bool operator<(const TspTestState& other) const { return m_serial < other.m_serial; } bool operator<(const TspTestState& other) const { return m_serial < other.m_serial; }

View File

@ -54,11 +54,11 @@ class TableSimulateVisitor : public SimulateVisitor {
public: public:
///< Call other-this function on all new var references ///< Call other-this function on all new var references
virtual void varRefCb(AstVarRef* nodep); virtual void varRefCb(AstVarRef* nodep) override;
// CONSTRUCTORS // CONSTRUCTORS
explicit TableSimulateVisitor(TableVisitor* cbthis) { m_cbthis = cbthis; } explicit TableSimulateVisitor(TableVisitor* cbthis) { m_cbthis = cbthis; }
virtual ~TableSimulateVisitor() {} virtual ~TableSimulateVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -461,7 +461,7 @@ public:
m_totalBytes = 0; m_totalBytes = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~TableVisitor() { // virtual ~TableVisitor() override { //
V3Stats::addStat("Optimizations, Tables created", m_statTablesCre); V3Stats::addStat("Optimizations, Tables created", m_statTablesCre);
} }
}; };

View File

@ -47,7 +47,7 @@ public:
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_impurep(nullptr) , m_impurep(nullptr)
, m_noInline(false) {} , m_noInline(false) {}
virtual ~TaskBaseVertex() {} virtual ~TaskBaseVertex() override {}
bool pure() const { return m_impurep == nullptr; } bool pure() const { return m_impurep == nullptr; }
AstNode* impureNode() const { return m_impurep; } AstNode* impureNode() const { return m_impurep; }
void impure(AstNode* nodep) { m_impurep = nodep; } void impure(AstNode* nodep) { m_impurep = nodep; }
@ -66,11 +66,11 @@ public:
, m_nodep(nodep) { , m_nodep(nodep) {
m_cFuncp = nullptr; m_cFuncp = nullptr;
} }
virtual ~TaskFTaskVertex() {} virtual ~TaskFTaskVertex() override {}
AstNodeFTask* nodep() const { return m_nodep; } AstNodeFTask* nodep() const { return m_nodep; }
virtual string name() const { return nodep()->name(); } virtual string name() const override { return nodep()->name(); }
virtual string dotColor() const { return pure() ? "black" : "red"; } virtual string dotColor() const override { return pure() ? "black" : "red"; }
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
AstCFunc* cFuncp() const { return m_cFuncp; } AstCFunc* cFuncp() const { return m_cFuncp; }
void cFuncp(AstCFunc* nodep) { m_cFuncp = nodep; } void cFuncp(AstCFunc* nodep) { m_cFuncp = nodep; }
}; };
@ -80,17 +80,17 @@ class TaskCodeVertex : public TaskBaseVertex {
public: public:
explicit TaskCodeVertex(V3Graph* graphp) explicit TaskCodeVertex(V3Graph* graphp)
: TaskBaseVertex(graphp) {} : TaskBaseVertex(graphp) {}
virtual ~TaskCodeVertex() {} virtual ~TaskCodeVertex() override {}
virtual string name() const { return "*CODE*"; } virtual string name() const override { return "*CODE*"; }
virtual string dotColor() const { return "green"; } virtual string dotColor() const override { return "green"; }
}; };
class TaskEdge : public V3GraphEdge { class TaskEdge : public V3GraphEdge {
public: public:
TaskEdge(V3Graph* graphp, TaskBaseVertex* fromp, TaskBaseVertex* top) TaskEdge(V3Graph* graphp, TaskBaseVertex* fromp, TaskBaseVertex* top)
: V3GraphEdge(graphp, fromp, top, 1, false) {} : V3GraphEdge(graphp, fromp, top, 1, false) {}
virtual ~TaskEdge() {} virtual ~TaskEdge() override {}
virtual string dotLabel() const { return "w" + cvtToStr(weight()); } virtual string dotLabel() const override { return "w" + cvtToStr(weight()); }
}; };
//###################################################################### //######################################################################
@ -273,7 +273,7 @@ public:
m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue); m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue);
m_callGraph.dumpDotFilePrefixed("task_call"); m_callGraph.dumpDotFilePrefixed("task_call");
} }
virtual ~TaskStateVisitor() {} virtual ~TaskStateVisitor() override {}
VL_UNCOPYABLE(TaskStateVisitor); VL_UNCOPYABLE(TaskStateVisitor);
}; };
@ -309,7 +309,7 @@ public:
explicit TaskRelinkVisitor(AstBegin* nodep) { // Passed temporary tree explicit TaskRelinkVisitor(AstBegin* nodep) { // Passed temporary tree
iterate(nodep); iterate(nodep);
} }
virtual ~TaskRelinkVisitor() {} virtual ~TaskRelinkVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -1367,7 +1367,7 @@ public:
AstNode::user1ClearTree(); AstNode::user1ClearTree();
iterate(nodep); iterate(nodep);
} }
virtual ~TaskVisitor() {} virtual ~TaskVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -71,20 +71,20 @@ public:
m_activityCode = code; m_activityCode = code;
m_slow = false; m_slow = false;
} }
virtual ~TraceActivityVertex() {} virtual ~TraceActivityVertex() override {}
// ACCESSORS // ACCESSORS
AstNode* insertp() const { AstNode* insertp() const {
if (!m_insertp) v3fatalSrc("Null insertp; probably called on a special always/slow."); if (!m_insertp) v3fatalSrc("Null insertp; probably called on a special always/slow.");
return m_insertp; return m_insertp;
} }
virtual string name() const { virtual string name() const override {
if (activityAlways()) { if (activityAlways()) {
return "*ALWAYS*"; return "*ALWAYS*";
} else { } else {
return (string(slow() ? "*SLOW* " : "")) + insertp()->name(); return (string(slow() ? "*SLOW* " : "")) + insertp()->name();
} }
} }
virtual string dotColor() const { return slow() ? "yellowGreen" : "green"; } virtual string dotColor() const override { return slow() ? "yellowGreen" : "green"; }
vlsint32_t activityCode() const { return m_activityCode; } vlsint32_t activityCode() const { return m_activityCode; }
bool activityAlways() const { return activityCode() == ACTIVITY_ALWAYS; } bool activityAlways() const { return activityCode() == ACTIVITY_ALWAYS; }
bool activitySlow() const { return activityCode() == ACTIVITY_SLOW; } bool activitySlow() const { return activityCode() == ACTIVITY_SLOW; }
@ -102,12 +102,12 @@ public:
TraceCFuncVertex(V3Graph* graphp, AstCFunc* nodep) TraceCFuncVertex(V3Graph* graphp, AstCFunc* nodep)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_nodep(nodep) {} , m_nodep(nodep) {}
virtual ~TraceCFuncVertex() {} virtual ~TraceCFuncVertex() override {}
// ACCESSORS // ACCESSORS
AstCFunc* nodep() const { return m_nodep; } AstCFunc* nodep() const { return m_nodep; }
virtual string name() const { return nodep()->name(); } virtual string name() const override { return nodep()->name(); }
virtual string dotColor() const { return "yellow"; } virtual string dotColor() const override { return "yellow"; }
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
}; };
class TraceTraceVertex : public V3GraphVertex { class TraceTraceVertex : public V3GraphVertex {
@ -120,12 +120,12 @@ public:
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_nodep(nodep) , m_nodep(nodep)
, m_duplicatep(nullptr) {} , m_duplicatep(nullptr) {}
virtual ~TraceTraceVertex() {} virtual ~TraceTraceVertex() override {}
// ACCESSORS // ACCESSORS
AstTraceDecl* nodep() const { return m_nodep; } AstTraceDecl* nodep() const { return m_nodep; }
virtual string name() const { return nodep()->name(); } virtual string name() const override { return nodep()->name(); }
virtual string dotColor() const { return "red"; } virtual string dotColor() const override { return "red"; }
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
TraceTraceVertex* duplicatep() const { return m_duplicatep; } TraceTraceVertex* duplicatep() const { return m_duplicatep; }
void duplicatep(TraceTraceVertex* dupp) { void duplicatep(TraceTraceVertex* dupp) {
UASSERT_OBJ(!duplicatep(), nodep(), "Assigning duplicatep() to already duplicated node"); UASSERT_OBJ(!duplicatep(), nodep(), "Assigning duplicatep() to already duplicated node");
@ -140,12 +140,12 @@ public:
TraceVarVertex(V3Graph* graphp, AstVarScope* nodep) TraceVarVertex(V3Graph* graphp, AstVarScope* nodep)
: V3GraphVertex(graphp) : V3GraphVertex(graphp)
, m_nodep(nodep) {} , m_nodep(nodep) {}
virtual ~TraceVarVertex() {} virtual ~TraceVarVertex() override {}
// ACCESSORS // ACCESSORS
AstVarScope* nodep() const { return m_nodep; } AstVarScope* nodep() const { return m_nodep; }
virtual string name() const { return nodep()->name(); } virtual string name() const override { return nodep()->name(); }
virtual string dotColor() const { return "skyblue"; } virtual string dotColor() const override { return "skyblue"; }
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
}; };
//###################################################################### //######################################################################
@ -885,7 +885,7 @@ public:
m_code = 0; m_code = 0;
iterate(nodep); iterate(nodep);
} }
virtual ~TraceVisitor() { virtual ~TraceVisitor() override {
V3Stats::addStat("Tracing, Unique changing signals", m_statChgSigs); V3Stats::addStat("Tracing, Unique changing signals", m_statChgSigs);
V3Stats::addStat("Tracing, Unique traced signals", m_statUniqSigs); V3Stats::addStat("Tracing, Unique traced signals", m_statUniqSigs);
V3Stats::addStat("Tracing, Unique trace codes", m_statUniqCodes); V3Stats::addStat("Tracing, Unique trace codes", m_statUniqCodes);

View File

@ -349,7 +349,7 @@ public:
m_interface = false; m_interface = false;
iterate(nodep); iterate(nodep);
} }
virtual ~TraceDeclVisitor() { virtual ~TraceDeclVisitor() override {
V3Stats::addStat("Tracing, Traced signals", m_statSigs); V3Stats::addStat("Tracing, Traced signals", m_statSigs);
V3Stats::addStat("Tracing, Ignored signals", m_statIgnSigs); V3Stats::addStat("Tracing, Ignored signals", m_statIgnSigs);
} }

View File

@ -90,19 +90,19 @@ public:
, m_isTristate(false) , m_isTristate(false)
, m_feedsTri(false) , m_feedsTri(false)
, m_processed(false) {} , m_processed(false) {}
virtual ~TristateVertex() {} virtual ~TristateVertex() override {}
// ACCESSORS // ACCESSORS
AstNode* nodep() const { return m_nodep; } AstNode* nodep() const { return m_nodep; }
AstVar* varp() const { return VN_CAST(nodep(), Var); } AstVar* varp() const { return VN_CAST(nodep(), Var); }
virtual string name() const { virtual string name() const override {
return ((isTristate() ? "tri\\n" : feedsTri() ? "feed\\n" : "-\\n") return ((isTristate() ? "tri\\n" : feedsTri() ? "feed\\n" : "-\\n")
+ (nodep()->prettyTypeName() + " " + cvtToHex(nodep()))); + (nodep()->prettyTypeName() + " " + cvtToHex(nodep())));
} }
virtual string dotColor() const { virtual string dotColor() const override {
return (varp() ? (isTristate() ? "darkblue" : feedsTri() ? "blue" : "lightblue") return (varp() ? (isTristate() ? "darkblue" : feedsTri() ? "blue" : "lightblue")
: (isTristate() ? "darkgreen" : feedsTri() ? "green" : "lightgreen")); : (isTristate() ? "darkgreen" : feedsTri() ? "green" : "lightgreen"));
} }
virtual FileLine* fileline() const { return nodep()->fileline(); } virtual FileLine* fileline() const override { return nodep()->fileline(); }
void isTristate(bool flag) { m_isTristate = flag; } void isTristate(bool flag) { m_isTristate = flag; }
bool isTristate() const { return m_isTristate; } bool isTristate() const { return m_isTristate; }
void feedsTri(bool flag) { m_feedsTri = flag; } void feedsTri(bool flag) { m_feedsTri = flag; }
@ -309,7 +309,7 @@ public:
, m_lvalue(lvalue) { , m_lvalue(lvalue) {
iterate(nodep); iterate(nodep);
} }
virtual ~TristatePinVisitor() {} virtual ~TristatePinVisitor() override {}
}; };
//###################################################################### //######################################################################
@ -1357,7 +1357,7 @@ public:
m_tgraph.clear(); m_tgraph.clear();
iterate(nodep); iterate(nodep);
} }
virtual ~TristateVisitor() { virtual ~TristateVisitor() override {
V3Stats::addStat("Tristate, Tristate resolved nets", m_statTriSigs); V3Stats::addStat("Tristate, Tristate resolved nets", m_statTriSigs);
} }
}; };

View File

@ -447,7 +447,7 @@ public:
m_alwaysCombp = nullptr; m_alwaysCombp = nullptr;
iterate(nodep); iterate(nodep);
} }
virtual ~UndrivenVisitor() { virtual ~UndrivenVisitor() override {
for (std::vector<UndrivenVarEntry*>::iterator it = m_entryps[1].begin(); for (std::vector<UndrivenVarEntry*>::iterator it = m_entryps[1].begin();
it != m_entryps[1].end(); ++it) { it != m_entryps[1].end(); ++it) {
(*it)->reportViolations(); (*it)->reportViolations();

View File

@ -435,7 +435,7 @@ public:
m_constXCvt = false; m_constXCvt = false;
iterate(nodep); iterate(nodep);
} }
virtual ~UnknownVisitor() { // virtual ~UnknownVisitor() override { //
V3Stats::addStat("Unknowns, variables created", m_statUnkVars); V3Stats::addStat("Unknowns, variables created", m_statUnkVars);
} }
}; };

View File

@ -471,7 +471,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
UnrollVisitor() { init(false, ""); } UnrollVisitor() { init(false, ""); }
virtual ~UnrollVisitor() { virtual ~UnrollVisitor() override {
V3Stats::addStatSum("Optimizations, Unrolled Loops", m_statLoops); V3Stats::addStatSum("Optimizations, Unrolled Loops", m_statLoops);
V3Stats::addStatSum("Optimizations, Unrolled Iterations", m_statIters); V3Stats::addStatSum("Optimizations, Unrolled Iterations", m_statIters);
} }

View File

@ -5419,7 +5419,7 @@ public:
AstNode* mainAcceptEdit(AstNode* nodep) { AstNode* mainAcceptEdit(AstNode* nodep) {
return userIterateSubtreeReturnEdits(nodep, WidthVP(SELF, BOTH).p()); return userIterateSubtreeReturnEdits(nodep, WidthVP(SELF, BOTH).p());
} }
virtual ~WidthVisitor() {} virtual ~WidthVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -56,7 +56,7 @@ private:
public: public:
// CONSTRUCTORS // CONSTRUCTORS
WidthRemoveVisitor() {} WidthRemoveVisitor() {}
virtual ~WidthRemoveVisitor() {} virtual ~WidthRemoveVisitor() override {}
AstNode* mainAcceptEdit(AstNode* nodep) { return iterateSubtreeReturnEdits(nodep); } AstNode* mainAcceptEdit(AstNode* nodep) { return iterateSubtreeReturnEdits(nodep); }
}; };
@ -171,7 +171,7 @@ public:
// Don't want to repairCache, as all needed nodes have been added back in // Don't want to repairCache, as all needed nodes have been added back in
// a repair would prevent dead nodes from being detected // a repair would prevent dead nodes from being detected
} }
virtual ~WidthCommitVisitor() {} virtual ~WidthCommitVisitor() override {}
}; };
//###################################################################### //######################################################################

View File

@ -571,7 +571,7 @@ public:
// CONSTRUCTORS // CONSTRUCTORS
WidthSelVisitor() {} WidthSelVisitor() {}
AstNode* mainAcceptEdit(AstNode* nodep) { return iterateSubtreeReturnEdits(nodep); } AstNode* mainAcceptEdit(AstNode* nodep) { return iterateSubtreeReturnEdits(nodep); }
virtual ~WidthSelVisitor() {} virtual ~WidthSelVisitor() override {}
}; };
//###################################################################### //######################################################################