mirror of
https://github.com/verilator/verilator.git
synced 2025-04-05 12:12:39 +00:00
C++11: Use override where possible. No functional change.
This commit is contained in:
parent
ea4031cbd3
commit
042d3eed23
@ -63,11 +63,11 @@ protected:
|
||||
// Implementation of VerilatedTrace interface
|
||||
|
||||
// Implementations of protected virtual methods for VerilatedTrace
|
||||
void emitTimeChange(vluint64_t timeui) override;
|
||||
virtual void emitTimeChange(vluint64_t timeui) override;
|
||||
|
||||
// Hooks called from VerilatedTrace
|
||||
bool preFullDump() override { return isOpen(); }
|
||||
bool preChangeDump() override { return isOpen(); }
|
||||
virtual bool preFullDump() override { return isOpen(); }
|
||||
virtual bool preChangeDump() override { return isOpen(); }
|
||||
|
||||
// Implementations of duck-typed methods for VerilatedTrace. These are
|
||||
// called from only one place (namely full*) so always inline them.
|
||||
|
@ -113,11 +113,11 @@ protected:
|
||||
// Implementation of VerilatedTrace interface
|
||||
|
||||
// Implementations of protected virtual methods for VerilatedTrace
|
||||
void emitTimeChange(vluint64_t timeui) override;
|
||||
virtual void emitTimeChange(vluint64_t timeui) override;
|
||||
|
||||
// Hooks called from VerilatedTrace
|
||||
bool preFullDump() override { return isOpen(); }
|
||||
bool preChangeDump() override;
|
||||
virtual bool preFullDump() override { return isOpen(); }
|
||||
virtual bool preChangeDump() override;
|
||||
|
||||
// Implementations of duck-typed methods for VerilatedTrace. These are
|
||||
// called from only one place (namely full*) so always inline them.
|
||||
|
@ -114,11 +114,11 @@ public:
|
||||
m_value.format = cbDatap->value ? cbDatap->value->format : vpiSuppressVal;
|
||||
m_cbData.value = &m_value;
|
||||
}
|
||||
virtual ~VerilatedVpioCb() {}
|
||||
virtual ~VerilatedVpioCb() override {}
|
||||
static inline VerilatedVpioCb* castp(vpiHandle 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; }
|
||||
VerilatedPliCb cb_rtnp() const { return m_cbData.cb_rtn; }
|
||||
t_cb_data* cb_datap() { return &(m_cbData); }
|
||||
@ -131,11 +131,11 @@ class VerilatedVpioConst : public VerilatedVpio {
|
||||
public:
|
||||
explicit VerilatedVpioConst(vlsint32_t num)
|
||||
: m_num(num) {}
|
||||
virtual ~VerilatedVpioConst() {}
|
||||
virtual ~VerilatedVpioConst() override {}
|
||||
static inline VerilatedVpioConst* castp(vpiHandle 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; }
|
||||
};
|
||||
|
||||
@ -148,17 +148,17 @@ public:
|
||||
: m_varp(varp)
|
||||
, m_scopep(scopep) {}
|
||||
|
||||
virtual ~VerilatedVpioParam() {}
|
||||
virtual ~VerilatedVpioParam() override {}
|
||||
|
||||
static inline VerilatedVpioParam* castp(vpiHandle 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; }
|
||||
void* varDatap() const { return m_varp->datap(); }
|
||||
const VerilatedScope* scopep() const { return m_scopep; }
|
||||
virtual const char* name() const { return m_varp->name(); }
|
||||
virtual const char* fullname() const {
|
||||
virtual const char* name() const override { return m_varp->name(); }
|
||||
virtual const char* fullname() const override {
|
||||
static VL_THREAD_LOCAL std::string out;
|
||||
out = std::string(m_scopep->name()) + "." + name();
|
||||
return out.c_str();
|
||||
@ -173,16 +173,16 @@ public:
|
||||
explicit VerilatedVpioRange(const VerilatedRange* range)
|
||||
: m_range(range)
|
||||
, m_iteration(0) {}
|
||||
virtual ~VerilatedVpioRange() {}
|
||||
virtual ~VerilatedVpioRange() override {}
|
||||
static inline VerilatedVpioRange* castp(vpiHandle h) {
|
||||
return dynamic_cast<VerilatedVpioRange*>(reinterpret_cast<VerilatedVpio*>(h));
|
||||
}
|
||||
virtual vluint32_t type() const { return vpiRange; }
|
||||
virtual vluint32_t size() const { return m_range->elements(); }
|
||||
virtual const VerilatedRange* rangep() const { return m_range; }
|
||||
virtual vluint32_t type() const override { return vpiRange; }
|
||||
virtual vluint32_t size() const override { return m_range->elements(); }
|
||||
virtual const VerilatedRange* rangep() const override { return m_range; }
|
||||
int iteration() const { return m_iteration; }
|
||||
void iterationInc() { ++m_iteration; }
|
||||
virtual vpiHandle dovpi_scan() {
|
||||
virtual vpiHandle dovpi_scan() override {
|
||||
if (!iteration()) {
|
||||
VerilatedVpioRange* nextp = new VerilatedVpioRange(*this);
|
||||
nextp->iterationInc();
|
||||
@ -199,14 +199,14 @@ protected:
|
||||
public:
|
||||
explicit VerilatedVpioScope(const VerilatedScope* scopep)
|
||||
: m_scopep(scopep) {}
|
||||
virtual ~VerilatedVpioScope() {}
|
||||
virtual ~VerilatedVpioScope() override {}
|
||||
static inline VerilatedVpioScope* castp(vpiHandle 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; }
|
||||
virtual const char* name() const { return m_scopep->name(); }
|
||||
virtual const char* fullname() const { return m_scopep->name(); }
|
||||
virtual const char* name() const override { return m_scopep->name(); }
|
||||
virtual const char* fullname() const override { return m_scopep->name(); }
|
||||
};
|
||||
|
||||
class VerilatedVpioVar : public VerilatedVpio {
|
||||
@ -236,7 +236,7 @@ public:
|
||||
m_entSize = varp->entSize();
|
||||
m_varDatap = varp->datap();
|
||||
}
|
||||
virtual ~VerilatedVpioVar() {
|
||||
virtual ~VerilatedVpioVar() override {
|
||||
if (m_prevDatap) VL_DO_CLEAR(delete[] m_prevDatap, m_prevDatap = nullptr);
|
||||
}
|
||||
static inline VerilatedVpioVar* castp(vpiHandle h) {
|
||||
@ -248,13 +248,13 @@ public:
|
||||
vluint8_t mask_byte(int idx) { return m_mask.u8[idx & 3]; }
|
||||
vluint32_t entSize() const { return m_entSize; }
|
||||
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
|
||||
}
|
||||
virtual vluint32_t size() const { return get_range().elements(); }
|
||||
virtual const VerilatedRange* rangep() const { return &get_range(); }
|
||||
virtual const char* name() const { return m_varp->name(); }
|
||||
virtual const char* fullname() const {
|
||||
virtual vluint32_t size() const override { return get_range().elements(); }
|
||||
virtual const VerilatedRange* rangep() const override { return &get_range(); }
|
||||
virtual const char* name() const override { return m_varp->name(); }
|
||||
virtual const char* fullname() const override {
|
||||
static VL_THREAD_LOCAL std::string out;
|
||||
out = std::string(m_scopep->name()) + "." + name();
|
||||
return out.c_str();
|
||||
@ -277,14 +277,14 @@ public:
|
||||
m_index = index;
|
||||
m_varDatap = (static_cast<vluint8_t*>(varp->datap())) + entSize() * offset;
|
||||
}
|
||||
virtual ~VerilatedVpioMemoryWord() {}
|
||||
virtual ~VerilatedVpioMemoryWord() override {}
|
||||
static inline VerilatedVpioMemoryWord* castp(vpiHandle h) {
|
||||
return dynamic_cast<VerilatedVpioMemoryWord*>(reinterpret_cast<VerilatedVpio*>(h));
|
||||
}
|
||||
virtual vluint32_t type() const { return vpiMemoryWord; }
|
||||
virtual vluint32_t size() const { return varp()->packed().elements(); }
|
||||
virtual const VerilatedRange* rangep() const { return &(varp()->packed()); }
|
||||
virtual const char* fullname() const {
|
||||
virtual vluint32_t type() const override { return vpiMemoryWord; }
|
||||
virtual vluint32_t size() const override { return varp()->packed().elements(); }
|
||||
virtual const VerilatedRange* rangep() const override { return &(varp()->packed()); }
|
||||
virtual const char* fullname() const override {
|
||||
static VL_THREAD_LOCAL std::string out;
|
||||
char num[20];
|
||||
sprintf(num, "%d", m_index);
|
||||
@ -302,12 +302,12 @@ public:
|
||||
explicit VerilatedVpioVarIter(const VerilatedScope* scopep)
|
||||
: m_scopep(scopep)
|
||||
, m_started(false) {}
|
||||
virtual ~VerilatedVpioVarIter() {}
|
||||
virtual ~VerilatedVpioVarIter() override {}
|
||||
static inline VerilatedVpioVarIter* castp(vpiHandle h) {
|
||||
return dynamic_cast<VerilatedVpioVarIter*>(reinterpret_cast<VerilatedVpio*>(h));
|
||||
}
|
||||
virtual vluint32_t type() const { return vpiIterator; }
|
||||
virtual vpiHandle dovpi_scan() {
|
||||
virtual vluint32_t type() const override { return vpiIterator; }
|
||||
virtual vpiHandle dovpi_scan() override {
|
||||
if (VL_LIKELY(m_scopep->varsp())) {
|
||||
VerilatedVarNameMap* varsp = m_scopep->varsp();
|
||||
if (VL_UNLIKELY(!m_started)) {
|
||||
@ -339,15 +339,15 @@ public:
|
||||
, m_iteration(varp->unpacked().right())
|
||||
, m_direction(VL_LIKELY(varp->unpacked().left() > varp->unpacked().right()) ? 1 : -1)
|
||||
, m_done(false) {}
|
||||
virtual ~VerilatedVpioMemoryWordIter() {}
|
||||
virtual ~VerilatedVpioMemoryWordIter() override {}
|
||||
static inline VerilatedVpioMemoryWordIter* castp(vpiHandle 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() {
|
||||
if (!(m_done = (m_iteration == m_varp->unpacked().left()))) m_iteration += m_direction;
|
||||
}
|
||||
virtual vpiHandle dovpi_scan() {
|
||||
virtual vpiHandle dovpi_scan() override {
|
||||
vpiHandle result;
|
||||
if (m_done) return 0;
|
||||
result = vpi_handle_by_index(m_handle, m_iteration);
|
||||
@ -370,9 +370,9 @@ public:
|
||||
static inline VerilatedVpioModule* castp(vpiHandle h) {
|
||||
return dynamic_cast<VerilatedVpioModule*>(reinterpret_cast<VerilatedVpio*>(h));
|
||||
}
|
||||
virtual vluint32_t type() const { return vpiModule; }
|
||||
virtual const char* name() const { return m_name; }
|
||||
virtual const char* fullname() const { return m_fullname; }
|
||||
virtual vluint32_t type() const override { return vpiModule; }
|
||||
virtual const char* name() const override { return m_name; }
|
||||
virtual const char* fullname() const override { return m_fullname; }
|
||||
};
|
||||
|
||||
class VerilatedVpioModuleIter : public VerilatedVpio {
|
||||
@ -384,12 +384,12 @@ public:
|
||||
: m_vec(&vec) {
|
||||
m_it = m_vec->begin();
|
||||
}
|
||||
virtual ~VerilatedVpioModuleIter() {}
|
||||
virtual ~VerilatedVpioModuleIter() override {}
|
||||
static inline VerilatedVpioModuleIter* castp(vpiHandle h) {
|
||||
return dynamic_cast<VerilatedVpioModuleIter*>(reinterpret_cast<VerilatedVpio*>(h));
|
||||
}
|
||||
virtual vluint32_t type() const { return vpiIterator; }
|
||||
virtual vpiHandle dovpi_scan() {
|
||||
virtual vluint32_t type() const override { return vpiIterator; }
|
||||
virtual vpiHandle dovpi_scan() override {
|
||||
if (m_it == m_vec->end()) return 0;
|
||||
const VerilatedScope* modp = *m_it++;
|
||||
return (new VerilatedVpioModule(modp))->castVpiHandle();
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
m_iActivep = nullptr;
|
||||
m_cActivep = nullptr;
|
||||
}
|
||||
virtual ~ActiveNamer() {}
|
||||
virtual ~ActiveNamer() override {}
|
||||
void main(AstScope* nodep) { iterate(nodep); }
|
||||
};
|
||||
|
||||
@ -211,7 +211,7 @@ public:
|
||||
m_assignp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ActiveDlyVisitor() {}
|
||||
virtual ~ActiveDlyVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -417,7 +417,7 @@ public:
|
||||
, m_itemSequent(false) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ActiveVisitor() {}
|
||||
virtual ~ActiveVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -131,7 +131,7 @@ public:
|
||||
: m_topscopep(nullptr) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ActiveTopVisitor() {}
|
||||
virtual ~ActiveTopVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -392,7 +392,7 @@ public:
|
||||
// Process
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~AssertVisitor() {
|
||||
virtual ~AssertVisitor() override {
|
||||
V3Stats::addStat("Assertions, assert non-immediate statements", m_statAsNotImm);
|
||||
V3Stats::addStat("Assertions, assert immediate statements", m_statAsImm);
|
||||
V3Stats::addStat("Assertions, cover statements", m_statCover);
|
||||
|
@ -176,7 +176,7 @@ public:
|
||||
// Process
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~AssertPreVisitor() {}
|
||||
virtual ~AssertPreVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
236
src/V3Ast.h
236
src/V3Ast.h
@ -1888,7 +1888,7 @@ public:
|
||||
: AstNode(t, fl) {}
|
||||
ASTNODE_BASE_FUNCS(NodeMath)
|
||||
// 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
|
||||
// For documentation on emitC format see EmitCStmts::emitOpName
|
||||
virtual string emitC() = 0;
|
||||
@ -1932,9 +1932,9 @@ public:
|
||||
// Signed flavor of nodes with both flavors?
|
||||
virtual bool signedFlavor() const { return false; }
|
||||
virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors?
|
||||
virtual int instrCount() const { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeBiop : public AstNodeMath {
|
||||
@ -1964,9 +1964,9 @@ public:
|
||||
// Signed flavor of nodes with both flavors?
|
||||
virtual bool signedFlavor() const { return false; }
|
||||
virtual bool stringFlavor() const { return false; } // N flavor of nodes with both flavors?
|
||||
virtual int instrCount() const { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeTriop : public AstNodeMath {
|
||||
@ -1996,9 +1996,9 @@ public:
|
||||
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 sizeMattersThs() const = 0; // True if output result depends on ths size
|
||||
virtual int instrCount() const { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeQuadop : public AstNodeMath {
|
||||
@ -2033,9 +2033,9 @@ public:
|
||||
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 sizeMattersFhs() const = 0; // True if output result depends on ths size
|
||||
virtual int instrCount() const { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeBiCom : public AstNodeBiop {
|
||||
@ -2065,20 +2065,22 @@ public:
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeCond)
|
||||
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* expr1p() const { return op2p(); } // op2 = If true...
|
||||
AstNode* expr2p() const { return op3p(); } // op3 = If false...
|
||||
virtual string emitVerilog() { 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 bool cleanOut() const { return false; } // clean if e1 & e2 clean
|
||||
virtual bool cleanLhs() const { return true; }
|
||||
virtual bool cleanRhs() const { return false; }
|
||||
virtual bool cleanThs() const { return false; } // Propagates up
|
||||
virtual bool sizeMattersLhs() const { return false; }
|
||||
virtual bool sizeMattersRhs() const { return false; }
|
||||
virtual bool sizeMattersThs() const { return false; }
|
||||
virtual int instrCount() const { return instrCountBranch(); }
|
||||
virtual string emitVerilog() override { return "%k(%l %f? %r %k: %t)"; }
|
||||
virtual string emitC() override {
|
||||
return "VL_COND_%nq%lq%rq%tq(%nw,%lw,%rw,%tw, %P, %li, %ri, %ti)";
|
||||
}
|
||||
virtual bool cleanOut() const override { return false; } // clean if e1 & e2 clean
|
||||
virtual bool cleanLhs() const override { return true; }
|
||||
virtual bool cleanRhs() const override { return false; }
|
||||
virtual bool cleanThs() const override { return false; } // Propagates up
|
||||
virtual bool sizeMattersLhs() const override { return false; }
|
||||
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;
|
||||
};
|
||||
|
||||
@ -2097,9 +2099,9 @@ public:
|
||||
m_unnamed = (name == "");
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeBlock)
|
||||
virtual void dump(std::ostream& str) const;
|
||||
virtual string name() const { return m_name; } // * = Block name
|
||||
virtual void name(const string& name) { m_name = name; }
|
||||
virtual void dump(std::ostream& str) const override;
|
||||
virtual string name() const override { return m_name; } // * = Block name
|
||||
virtual void name(const string& name) override { m_name = name; }
|
||||
// op1 = Statements
|
||||
AstNode* stmtsp() const { return op1p(); } // op1 = List of statements
|
||||
void addStmtsp(AstNode* nodep) { addNOp1p(nodep); }
|
||||
@ -2126,8 +2128,8 @@ public:
|
||||
void thsp(AstNode* nodep) { return setOp3p(nodep); }
|
||||
void attrp(AstAttrOf* nodep) { return setOp4p((AstNode*)nodep); }
|
||||
// METHODS
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeProcedure : public AstNode {
|
||||
@ -2175,12 +2177,12 @@ public:
|
||||
AstNode* lhsp() const { return op2p(); } // op2 = Assign to
|
||||
void rhsp(AstNode* np) { setOp1p(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 int instrCount() const { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const { return true; }
|
||||
virtual string verilogKwd() const { return "="; }
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode*) const override { return true; }
|
||||
virtual string verilogKwd() const override { return "="; }
|
||||
virtual bool brokeLhsMustBeLvalue() const = 0;
|
||||
};
|
||||
|
||||
@ -2199,10 +2201,10 @@ public:
|
||||
AstNode* condp() const { return op2p(); } // op2 = condition to continue
|
||||
AstNode* incsp() const { return op3p(); } // op3 = increment statements
|
||||
AstNode* bodysp() const { return op4p(); } // op4 = body of loop
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual int instrCount() const { return instrCountBranch(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode* samep) const { return true; }
|
||||
virtual bool isGateOptimizable() const override { return false; }
|
||||
virtual int instrCount() const override { return instrCountBranch(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode* samep) const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeIf : public AstNodeStmt {
|
||||
@ -2222,11 +2224,11 @@ public:
|
||||
void condp(AstNode* newp) { setOp1p(newp); }
|
||||
void addIfsp(AstNode* newp) { addOp2p(newp); }
|
||||
void addElsesp(AstNode* newp) { addOp3p(newp); }
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isGateDedupable() const { return true; }
|
||||
virtual int instrCount() const { return instrCountBranch(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(); }
|
||||
virtual bool same(const AstNode* samep) const { return true; }
|
||||
virtual bool isGateOptimizable() const override { return false; }
|
||||
virtual bool isGateDedupable() const override { return true; }
|
||||
virtual int instrCount() const override { return instrCountBranch(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(); }
|
||||
virtual bool same(const AstNode* samep) const override { return true; }
|
||||
void branchPred(VBranchPred flag) { m_branchPred = flag; }
|
||||
VBranchPred branchPred() const { return m_branchPred; }
|
||||
};
|
||||
@ -2239,7 +2241,7 @@ public:
|
||||
addNOp2p(casesp);
|
||||
}
|
||||
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>
|
||||
AstCaseItem* itemsp() const {
|
||||
return VN_CAST(op2p(), CaseItem);
|
||||
@ -2281,12 +2283,12 @@ public:
|
||||
this->varp(varp);
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeVarRef)
|
||||
virtual bool hasDType() const { return true; }
|
||||
virtual const char* broken() const;
|
||||
virtual int instrCount() const { return widthInstrs(); }
|
||||
virtual void cloneRelink();
|
||||
virtual string name() const { return m_name; } // * = Var name
|
||||
virtual void name(const string& name) { m_name = name; }
|
||||
virtual bool hasDType() const override { return true; }
|
||||
virtual const char* broken() const override;
|
||||
virtual int instrCount() const override { return widthInstrs(); }
|
||||
virtual void cloneRelink() override;
|
||||
virtual string name() const override { return m_name; } // * = Var name
|
||||
virtual void name(const string& name) override { m_name = name; }
|
||||
bool lvalue() const { return m_lvalue; }
|
||||
void lvalue(bool lval) { m_lvalue = lval; } // Avoid using this; Set in constructor
|
||||
AstVar* varp() const { return m_varp; } // [After Link] Pointer to variable
|
||||
@ -2317,9 +2319,9 @@ public:
|
||||
m_text = textp; // Copy it
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeText)
|
||||
virtual void dump(std::ostream& str = std::cout) const;
|
||||
virtual V3Hash sameHash() const { return V3Hash(text()); }
|
||||
virtual bool same(const AstNode* samep) const {
|
||||
virtual void dump(std::ostream& str = std::cout) const override;
|
||||
virtual V3Hash sameHash() const override { return V3Hash(text()); }
|
||||
virtual bool same(const AstNode* samep) const override {
|
||||
const AstNodeText* asamep = static_cast<const AstNodeText*>(samep);
|
||||
return text() == asamep->text();
|
||||
}
|
||||
@ -2349,9 +2351,9 @@ public:
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeDType)
|
||||
// ACCESSORS
|
||||
virtual void dump(std::ostream& str) const;
|
||||
virtual void dump(std::ostream& str) const override;
|
||||
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
|
||||
// recurses over typedefs/const/enum to next non-typeref type
|
||||
virtual AstNodeDType* skipRefp() const = 0;
|
||||
@ -2363,7 +2365,7 @@ public:
|
||||
virtual int widthAlignBytes() const = 0;
|
||||
// (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
||||
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
|
||||
virtual AstNodeDType* virtRefDTypep() const { return nullptr; }
|
||||
// Iff has refDTypep(), set as generic node function
|
||||
@ -2437,10 +2439,10 @@ public:
|
||||
numeric(VSigning::fromBool(numericUnpack.isSigned()));
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeUOrStructDType)
|
||||
virtual const char* broken() const;
|
||||
virtual void dump(std::ostream& str) const;
|
||||
virtual const char* broken() const override;
|
||||
virtual void dump(std::ostream& str) const override;
|
||||
// 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(
|
||||
findLogicRangeDType(VNumRange(width() - 1, 0, false), width(), numeric()),
|
||||
BasicDType)
|
||||
@ -2448,19 +2450,19 @@ public:
|
||||
width(), numeric()),
|
||||
BasicDType));
|
||||
}
|
||||
virtual AstNodeDType* skipRefp() const { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; }
|
||||
virtual int widthAlignBytes()
|
||||
const; // (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
||||
virtual int
|
||||
widthTotalBytes() const; // (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
||||
virtual AstNodeDType* skipRefp() const override { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToConstp() const override { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
|
||||
// (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
||||
virtual int widthAlignBytes() const override;
|
||||
// (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
||||
virtual int widthTotalBytes() const override;
|
||||
// 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
|
||||
}
|
||||
virtual string name() const { return m_name; }
|
||||
void name(const string& flag) { m_name = flag; }
|
||||
virtual string name() const override { return m_name; }
|
||||
virtual void name(const string& flag) override { m_name = flag; }
|
||||
AstMemberDType* membersp() const {
|
||||
return VN_CAST(op1p(), MemberDType);
|
||||
} // op1 = AstMember list
|
||||
@ -2469,7 +2471,7 @@ public:
|
||||
// packed() but as don't support unpacked, presently all structs
|
||||
static bool packedUnsup() { return true; }
|
||||
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 repairMemberCache();
|
||||
AstMemberDType* findMember(const string& name) const {
|
||||
@ -2494,48 +2496,50 @@ public:
|
||||
m_refDTypep = nullptr;
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeArrayDType)
|
||||
virtual void dump(std::ostream& str) const;
|
||||
virtual void dumpSmall(std::ostream& str) const;
|
||||
virtual const char* broken() const {
|
||||
virtual void dump(std::ostream& str) const override;
|
||||
virtual void dumpSmall(std::ostream& str) const override;
|
||||
virtual const char* broken() const override {
|
||||
BROKEN_RTN(!((m_refDTypep && !childDTypep() && m_refDTypep->brokeExists())
|
||||
|| (!m_refDTypep && childDTypep())));
|
||||
return nullptr;
|
||||
}
|
||||
virtual void cloneRelink() {
|
||||
virtual void cloneRelink() override {
|
||||
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);
|
||||
return (msb() == asamep->msb() && subDTypep() == asamep->subDTypep()
|
||||
&& rangenp()->sameTree(asamep->rangenp()));
|
||||
} // 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);
|
||||
return (asamep && type() == samep->type() && msb() == asamep->msb()
|
||||
&& rangenp()->sameTree(asamep->rangenp())
|
||||
&& subDTypep()->skipRefp()->similarDType(asamep->subDTypep()->skipRefp()));
|
||||
}
|
||||
virtual V3Hash sameHash() const {
|
||||
virtual V3Hash sameHash() const override {
|
||||
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); }
|
||||
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; }
|
||||
virtual AstNodeDType* virtRefDTypep() const { return m_refDTypep; }
|
||||
virtual void virtRefDTypep(AstNodeDType* nodep) { refDTypep(nodep); }
|
||||
virtual AstNodeDType* virtRefDTypep() const override { return m_refDTypep; }
|
||||
virtual void virtRefDTypep(AstNodeDType* nodep) override { refDTypep(nodep); }
|
||||
AstRange* rangep() const { return VN_CAST(op2p(), Range); } // op2 = Array(s) of variable
|
||||
void rangep(AstRange* nodep);
|
||||
// METHODS
|
||||
virtual AstBasicDType* basicp() const {
|
||||
virtual AstBasicDType* basicp() const override {
|
||||
return subDTypep()->basicp();
|
||||
} // (Slow) recurse down to find basic data type
|
||||
virtual AstNodeDType* skipRefp() const { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToConstp() const { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToEnump() const { return (AstNodeDType*)this; }
|
||||
virtual int widthAlignBytes() const { return subDTypep()->widthAlignBytes(); }
|
||||
virtual int widthTotalBytes() const {
|
||||
virtual AstNodeDType* skipRefp() const override { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToConstp() const override { return (AstNodeDType*)this; }
|
||||
virtual AstNodeDType* skipRefToEnump() const override { return (AstNodeDType*)this; }
|
||||
virtual int widthAlignBytes() const override { return subDTypep()->widthAlignBytes(); }
|
||||
virtual int widthTotalBytes() const override {
|
||||
return elementsConst() * subDTypep()->widthTotalBytes();
|
||||
}
|
||||
int msb() const;
|
||||
@ -2557,7 +2561,7 @@ public:
|
||||
AstNode* bitp() const { return op2p(); } // op2 = Msb selection expression
|
||||
void bitp(AstNode* nodep) { setOp2p(nodep); }
|
||||
int bitConst() const;
|
||||
virtual bool hasDType() const { return true; }
|
||||
virtual bool hasDType() const override { return true; }
|
||||
};
|
||||
|
||||
class AstNodeStream : public AstNodeBiop {
|
||||
@ -2597,20 +2601,20 @@ public:
|
||||
if (oldp->argsp()) addNOp2p(oldp->argsp()->unlinkFrBackWithNext());
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeCCall)
|
||||
virtual void dump(std::ostream& str = std::cout) const;
|
||||
virtual void cloneRelink();
|
||||
virtual const char* broken() const;
|
||||
virtual int instrCount() const { return instrCountCall(); }
|
||||
virtual V3Hash sameHash() const { return V3Hash(funcp()); }
|
||||
virtual bool same(const AstNode* samep) const {
|
||||
virtual void dump(std::ostream& str = std::cout) const override;
|
||||
virtual void cloneRelink() override;
|
||||
virtual const char* broken() const override;
|
||||
virtual int instrCount() const override { return instrCountCall(); }
|
||||
virtual V3Hash sameHash() const override { return V3Hash(funcp()); }
|
||||
virtual bool same(const AstNode* samep) const override {
|
||||
const AstNodeCCall* asamep = static_cast<const AstNodeCCall*>(samep);
|
||||
return (funcp() == asamep->funcp() && argTypes() == asamep->argTypes());
|
||||
}
|
||||
AstNode* exprsp() const { return op2p(); } // op2 = expressions to print
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
virtual bool isPure() const;
|
||||
virtual bool isOutputter() const { return !isPure(); }
|
||||
virtual bool isGateOptimizable() const override { return false; }
|
||||
virtual bool isPredictOptimizable() const override { return false; }
|
||||
virtual bool isPure() const override;
|
||||
virtual bool isOutputter() const override { return !isPure(); }
|
||||
AstCFunc* funcp() const { return m_funcp; }
|
||||
string hiername() const { return m_hiername; }
|
||||
void hiername(const string& hn) { m_hiername = hn; }
|
||||
@ -2665,12 +2669,14 @@ public:
|
||||
cname(name); // Might be overridden by dpi import/export
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeFTask)
|
||||
virtual void dump(std::ostream& str = std::cout) const;
|
||||
virtual string name() const { return m_name; } // * = Var name
|
||||
virtual bool maybePointedTo() const { return true; }
|
||||
virtual bool isGateOptimizable() const { return !((m_dpiExport || m_dpiImport) && !m_pure); }
|
||||
virtual void dump(std::ostream& str = std::cout) const override;
|
||||
virtual string name() const override { return m_name; } // * = Var name
|
||||
virtual bool maybePointedTo() const override { return true; }
|
||||
virtual bool isGateOptimizable() const override {
|
||||
return !((m_dpiExport || m_dpiImport) && !m_pure);
|
||||
}
|
||||
// {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; }
|
||||
void cname(const string& cname) { m_cname = cname; }
|
||||
// op1 = Output variable (functions only, nullptr for tasks)
|
||||
@ -2747,23 +2753,25 @@ public:
|
||||
addNOp3p(pinsp);
|
||||
}
|
||||
ASTNODE_BASE_FUNCS(NodeFTaskRef)
|
||||
virtual const char* broken() const {
|
||||
virtual const char* broken() const override {
|
||||
BROKEN_RTN(m_taskp && !m_taskp->brokeExists());
|
||||
return nullptr;
|
||||
}
|
||||
virtual void cloneRelink() {
|
||||
virtual void cloneRelink() override {
|
||||
if (m_taskp && m_taskp->clonep()) { m_taskp = m_taskp->clonep(); }
|
||||
}
|
||||
virtual void dump(std::ostream& str = std::cout) const;
|
||||
virtual string name() const { return m_name; } // * = Var name
|
||||
virtual bool isGateOptimizable() const { return m_taskp && m_taskp->isGateOptimizable(); }
|
||||
virtual void dump(std::ostream& str = std::cout) const override;
|
||||
virtual string name() const override { return m_name; } // * = Var name
|
||||
virtual bool isGateOptimizable() const override {
|
||||
return m_taskp && m_taskp->isGateOptimizable();
|
||||
}
|
||||
string dotted() const { return m_dotted; } // * = Scope name or ""
|
||||
string prettyDotted() const { return prettyName(dotted()); }
|
||||
string inlinedDots() const { return m_inlinedDots; }
|
||||
void inlinedDots(const string& flag) { m_inlinedDots = flag; }
|
||||
AstNodeFTask* taskp() const { return m_taskp; } // [After Link] Pointer to variable
|
||||
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; }
|
||||
AstNodeModule* packagep() const { return m_packagep; }
|
||||
void packagep(AstNodeModule* nodep) { m_packagep = nodep; }
|
||||
@ -2819,9 +2827,9 @@ public:
|
||||
, m_varNum(0)
|
||||
, m_typeNum(0) {}
|
||||
ASTNODE_BASE_FUNCS(NodeModule)
|
||||
virtual void dump(std::ostream& str) const;
|
||||
virtual bool maybePointedTo() const { return true; }
|
||||
virtual string name() const { return m_name; }
|
||||
virtual void dump(std::ostream& str) const override;
|
||||
virtual bool maybePointedTo() const override { return true; }
|
||||
virtual string name() const override { return m_name; }
|
||||
AstNode* stmtsp() const { return op2p(); } // op2 = List of statements
|
||||
AstActive* activesp() const { return VN_CAST(op3p(), Active); } // op3 = List of i/sblocks
|
||||
// METHODS
|
||||
@ -2829,8 +2837,8 @@ public:
|
||||
void addStmtp(AstNode* nodep) { addNOp2p(nodep); }
|
||||
void addActivep(AstNode* nodep) { addOp3p(nodep); }
|
||||
// ACCESSORS
|
||||
virtual void name(const string& name) { m_name = name; }
|
||||
virtual string origName() const { return m_origName; }
|
||||
virtual void name(const string& name) override { m_name = name; }
|
||||
virtual string origName() const override { return m_origName; }
|
||||
string hierName() const { return m_hierName; }
|
||||
void hierName(const string& hierName) { m_hierName = hierName; }
|
||||
bool inLibrary() const { return m_inLibrary; }
|
||||
|
4576
src/V3AstNodes.h
4576
src/V3AstNodes.h
File diff suppressed because it is too large
Load Diff
@ -257,7 +257,7 @@ public:
|
||||
m_ifDepth = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~BeginVisitor() {}
|
||||
virtual ~BeginVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -298,7 +298,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
BeginRelinkVisitor(AstNetlist* nodep, BeginState*) { iterate(nodep); }
|
||||
virtual ~BeginRelinkVisitor() {}
|
||||
virtual ~BeginRelinkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
iterateChildren(nodep);
|
||||
calc_tasks();
|
||||
}
|
||||
virtual ~BranchVisitor() {}
|
||||
virtual ~BranchVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -191,7 +191,7 @@ public:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
BrokenTable() {}
|
||||
virtual ~BrokenTable() {}
|
||||
virtual ~BrokenTable() override {}
|
||||
};
|
||||
|
||||
BrokenTable::NodeMap BrokenTable::s_nodes;
|
||||
@ -231,7 +231,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit BrokenMarkVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~BrokenMarkVisitor() {}
|
||||
virtual ~BrokenMarkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -286,7 +286,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit BrokenCheckVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~BrokenCheckVisitor() {}
|
||||
virtual ~BrokenCheckVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
, m_impOnly(false) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CUseDTypeVisitor() {}
|
||||
virtual ~CUseDTypeVisitor() override {}
|
||||
VL_UNCOPYABLE(CUseDTypeVisitor);
|
||||
};
|
||||
|
||||
@ -212,7 +212,7 @@ public:
|
||||
: m_state(nodep) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CUseVisitor() {}
|
||||
virtual ~CUseVisitor() override {}
|
||||
VL_UNCOPYABLE(CUseVisitor);
|
||||
};
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
m_caseExprp = nullptr;
|
||||
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;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CaseVisitor() {
|
||||
virtual ~CaseVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Cases parallelized", m_statCaseFast);
|
||||
V3Stats::addStat("Optimizations, Cases complex", m_statCaseSlow);
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CastVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~CastVisitor() {}
|
||||
virtual ~CastVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -68,9 +68,9 @@ public:
|
||||
, m_srcDomainSet(false)
|
||||
, m_dstDomainSet(false)
|
||||
, m_asyncPath(false) {}
|
||||
virtual ~CdcEitherVertex() {}
|
||||
virtual ~CdcEitherVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
AstScope* scopep() const { return m_scopep; }
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
AstSenTree* srcDomainp() const { return m_srcDomainp; }
|
||||
@ -96,11 +96,11 @@ public:
|
||||
, m_varScp(varScp)
|
||||
, m_cntAsyncRst(0)
|
||||
, m_fromFlop(false) {}
|
||||
virtual ~CdcVarVertex() {}
|
||||
virtual ~CdcVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
virtual string name() const { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
|
||||
virtual string dotColor() const {
|
||||
virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
|
||||
virtual string dotColor() const override {
|
||||
return fromFlop() ? "green" : cntAsyncRst() ? "red" : "blue";
|
||||
}
|
||||
int cntAsyncRst() const { return m_cntAsyncRst; }
|
||||
@ -121,10 +121,12 @@ public:
|
||||
srcDomainp(sensenodep);
|
||||
dstDomainp(sensenodep);
|
||||
}
|
||||
virtual ~CdcLogicVertex() {}
|
||||
virtual ~CdcLogicVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToHex(nodep()) + "@" + scopep()->prettyName()); }
|
||||
virtual string dotColor() const { return hazard() ? "black" : "yellow"; }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(nodep()) + "@" + scopep()->prettyName());
|
||||
}
|
||||
virtual string dotColor() const override { return hazard() ? "black" : "yellow"; }
|
||||
bool hazard() const { return m_hazard; }
|
||||
void setHazard(AstNode* nodep) {
|
||||
m_hazard = true;
|
||||
@ -172,7 +174,7 @@ public:
|
||||
m_prefix = prefix;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CdcDumpVisitor() {}
|
||||
virtual ~CdcDumpVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -200,7 +202,7 @@ public:
|
||||
m_maxFilenameLen = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CdcWidthVisitor() {}
|
||||
virtual ~CdcWidthVisitor() override {}
|
||||
// ACCESSORS
|
||||
int maxWidth() {
|
||||
size_t width = 1;
|
||||
@ -767,7 +769,7 @@ public:
|
||||
*m_ofp << endl;
|
||||
}
|
||||
}
|
||||
virtual ~CdcVisitor() {
|
||||
virtual ~CdcVisitor() override {
|
||||
if (m_ofp) VL_DO_CLEAR(delete m_ofp, m_ofp = nullptr);
|
||||
}
|
||||
};
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
m_newLvEqnp->deleteTree();
|
||||
m_newRvEqnp->deleteTree();
|
||||
}
|
||||
virtual ~ChangedInsertVisitor() {}
|
||||
virtual ~ChangedInsertVisitor() override {}
|
||||
VL_UNCOPYABLE(ChangedInsertVisitor);
|
||||
};
|
||||
|
||||
@ -288,7 +288,7 @@ public:
|
||||
m_statep = statep;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ChangedVisitor() {}
|
||||
virtual ~ChangedVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -120,7 +120,7 @@ public:
|
||||
: m_classScopep(nullptr) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ClassVisitor() {
|
||||
virtual ~ClassVisitor() override {
|
||||
for (MoveVector::iterator it = m_moves.begin(); it != m_moves.end(); ++it) {
|
||||
it->second->addVarp(it->first->unlinkFrBack());
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ public:
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CleanVisitor() {}
|
||||
virtual ~CleanVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -418,7 +418,7 @@ public:
|
||||
// easily without iterating through the tree.
|
||||
nodep->evalp(m_evalFuncp);
|
||||
}
|
||||
virtual ~ClockVisitor() {}
|
||||
virtual ~ClockVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -54,7 +54,7 @@ protected:
|
||||
// STATE
|
||||
|
||||
// METHODS
|
||||
virtual ~CombBaseVisitor() {}
|
||||
virtual ~CombBaseVisitor() override {}
|
||||
VL_DEBUG_FUNC; // Declare debug()
|
||||
};
|
||||
|
||||
@ -130,7 +130,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
CombCallVisitor() {}
|
||||
virtual ~CombCallVisitor() {}
|
||||
virtual ~CombCallVisitor() override {}
|
||||
void main(AstNetlist* nodep) { iterate(nodep); }
|
||||
};
|
||||
|
||||
@ -151,7 +151,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CombMarkVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~CombMarkVisitor() {}
|
||||
virtual ~CombMarkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -466,7 +466,7 @@ public:
|
||||
m_walkLast2p = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~CombineVisitor() { //
|
||||
virtual ~CombineVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Combined CFuncs", m_statCombs);
|
||||
}
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
AstNode::user4ClearTree(); // Check marked InUse before we're called
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ConstVarMarkVisitor() {}
|
||||
virtual ~ConstVarMarkVisitor() override {}
|
||||
};
|
||||
|
||||
class ConstVarFindVisitor : public AstNVisitor {
|
||||
@ -74,7 +74,7 @@ public:
|
||||
m_found = false;
|
||||
iterateAndNextNull(nodep);
|
||||
}
|
||||
virtual ~ConstVarFindVisitor() {}
|
||||
virtual ~ConstVarFindVisitor() override {}
|
||||
// METHODS
|
||||
bool found() const { return m_found; }
|
||||
};
|
||||
@ -2579,7 +2579,7 @@ public:
|
||||
}
|
||||
// clang-format on
|
||||
}
|
||||
virtual ~ConstVisitor() {}
|
||||
virtual ~ConstVisitor() override {}
|
||||
AstNode* mainAcceptEdit(AstNode* nodep) {
|
||||
// Operate starting at a random place
|
||||
return iterateSubtreeReturnEdits(nodep);
|
||||
|
@ -551,7 +551,7 @@ public:
|
||||
m_inToggleOff = false;
|
||||
iterateChildren(rootp);
|
||||
}
|
||||
virtual ~CoverageVisitor() {}
|
||||
virtual ~CoverageVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -114,7 +114,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit CoverageJoinVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~CoverageJoinVisitor() {
|
||||
virtual ~CoverageJoinVisitor() override {
|
||||
V3Stats::addStat("Coverage, Toggle points joined", m_statToggleJoins);
|
||||
}
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit DeadModVisitor(AstNodeModule* nodep) { iterate(nodep); }
|
||||
virtual ~DeadModVisitor() {}
|
||||
virtual ~DeadModVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -465,7 +465,7 @@ public:
|
||||
// We may have removed some datatypes, cleanup
|
||||
nodep->typeTablep()->repairCache();
|
||||
}
|
||||
virtual ~DeadVisitor() {}
|
||||
virtual ~DeadVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -486,7 +486,7 @@ public:
|
||||
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~DelayedVisitor() {
|
||||
virtual ~DelayedVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Delayed shared-sets", m_statSharedSet);
|
||||
}
|
||||
};
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~DepthVisitor() {}
|
||||
virtual ~DepthVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~DepthBlockVisitor() {}
|
||||
virtual ~DepthBlockVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -301,7 +301,7 @@ public:
|
||||
, m_needThis(false) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~DescopeVisitor() {}
|
||||
virtual ~DescopeVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -1238,7 +1238,7 @@ public:
|
||||
m_trackText = trackText;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitCStmts() {}
|
||||
virtual ~EmitCStmts() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -1257,12 +1257,12 @@ public:
|
||||
, m_serial(++m_serialNext) {}
|
||||
virtual ~EmitVarTspSorter() {}
|
||||
// METHODS
|
||||
bool operator<(const TspStateBase& other) const {
|
||||
virtual bool operator<(const TspStateBase& other) const override {
|
||||
return operator<(dynamic_cast<const EmitVarTspSorter&>(other));
|
||||
}
|
||||
bool operator<(const EmitVarTspSorter& other) const { return m_serial < other.m_serial; }
|
||||
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));
|
||||
}
|
||||
virtual int cost(const EmitVarTspSorter* otherp) const {
|
||||
@ -1776,7 +1776,7 @@ public:
|
||||
m_slow = false;
|
||||
m_fast = false;
|
||||
}
|
||||
virtual ~EmitCImp() {}
|
||||
virtual ~EmitCImp() override {}
|
||||
void mainImp(AstNodeModule* modp, bool slow);
|
||||
void mainInt(AstNodeModule* modp);
|
||||
void mainDoFunc(AstCFunc* nodep) { iterate(nodep); }
|
||||
@ -3107,7 +3107,7 @@ void EmitCImp::emitInt(AstNodeModule* modp) {
|
||||
+ "C* tfp, int levels, int options = 0);\n");
|
||||
if (optSystemC()) {
|
||||
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");
|
||||
}
|
||||
}
|
||||
@ -3769,7 +3769,7 @@ public:
|
||||
m_slow = slow;
|
||||
m_enumNum = 0;
|
||||
}
|
||||
virtual ~EmitCTrace() {}
|
||||
virtual ~EmitCTrace() override {}
|
||||
void main() {
|
||||
// Put out the file
|
||||
newOutCFile(0);
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
m_ofp = nullptr;
|
||||
m_trackText = false;
|
||||
}
|
||||
virtual ~EmitCBaseVisitor() {}
|
||||
virtual ~EmitCBaseVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -132,7 +132,7 @@ public:
|
||||
m_count = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitCBaseCounterVisitor() {}
|
||||
virtual ~EmitCBaseCounterVisitor() override {}
|
||||
int count() const { return m_count; }
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@ class EmitCMain : EmitCBaseVisitor {
|
||||
|
||||
// VISITORS
|
||||
// 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:
|
||||
// CONSTRUCTORS
|
||||
|
@ -665,7 +665,7 @@ public:
|
||||
m_suppressVarSemi = false;
|
||||
m_sensesp = domainp;
|
||||
}
|
||||
virtual ~EmitVBaseVisitor() {}
|
||||
virtual ~EmitVBaseVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -676,11 +676,11 @@ class EmitVFileVisitor : public EmitVBaseVisitor {
|
||||
V3OutFile* m_ofp;
|
||||
// METHODS
|
||||
V3OutFile* ofp() const { return m_ofp; }
|
||||
virtual void puts(const string& str) { ofp()->puts(str); }
|
||||
virtual void putbs(const string& str) { ofp()->putbs(str); }
|
||||
virtual void putfs(AstNode*, const string& str) { putbs(str); }
|
||||
virtual void putqs(AstNode*, const string& str) { putbs(str); }
|
||||
virtual void putsNoTracking(const string& str) { ofp()->putsNoTracking(str); }
|
||||
virtual void puts(const string& str) override { ofp()->puts(str); }
|
||||
virtual void putbs(const string& str) override { ofp()->putbs(str); }
|
||||
virtual void putfs(AstNode*, const string& str) override { putbs(str); }
|
||||
virtual void putqs(AstNode*, const string& str) override { putbs(str); }
|
||||
virtual void putsNoTracking(const string& str) override { ofp()->putsNoTracking(str); }
|
||||
|
||||
public:
|
||||
EmitVFileVisitor(AstNode* nodep, V3OutFile* ofp, bool trackText = false,
|
||||
@ -690,7 +690,7 @@ public:
|
||||
m_suppressVarSemi = suppressVarSemi;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitVFileVisitor() {}
|
||||
virtual ~EmitVFileVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -700,18 +700,18 @@ class EmitVStreamVisitor : public EmitVBaseVisitor {
|
||||
// MEMBERS
|
||||
std::ostream& m_os;
|
||||
// METHODS
|
||||
virtual void putsNoTracking(const string& str) { m_os << str; }
|
||||
virtual void puts(const string& str) { putsNoTracking(str); }
|
||||
virtual void putbs(const string& str) { puts(str); }
|
||||
virtual void putfs(AstNode*, const string& str) { putbs(str); }
|
||||
virtual void putqs(AstNode*, const string& str) { putbs(str); }
|
||||
virtual void putsNoTracking(const string& str) override { m_os << str; }
|
||||
virtual void puts(const string& str) override { putsNoTracking(str); }
|
||||
virtual void putbs(const string& str) override { puts(str); }
|
||||
virtual void putfs(AstNode*, const string& str) override { putbs(str); }
|
||||
virtual void putqs(AstNode*, const string& str) override { putbs(str); }
|
||||
|
||||
public:
|
||||
EmitVStreamVisitor(AstNode* nodep, std::ostream& os)
|
||||
: m_os(os) {
|
||||
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
|
||||
FileLine* m_prefixFl;
|
||||
// METHODS
|
||||
virtual void putcOutput(char chr) {
|
||||
virtual void putcOutput(char chr) override {
|
||||
if (chr == '\n') {
|
||||
m_column = 0;
|
||||
m_os << chr;
|
||||
@ -755,7 +755,7 @@ public:
|
||||
= v3Global.rootp()
|
||||
->fileline(); // NETLIST's fileline instead of nullptr to avoid nullptr checks
|
||||
}
|
||||
virtual ~EmitVPrefixedFormatter() {
|
||||
virtual ~EmitVPrefixedFormatter() override {
|
||||
if (m_column) puts("\n");
|
||||
}
|
||||
};
|
||||
@ -765,13 +765,13 @@ class EmitVPrefixedVisitor : public EmitVBaseVisitor {
|
||||
EmitVPrefixedFormatter m_formatter; // Special verilog formatter (Way down the
|
||||
// inheritance is another unused V3OutFormatter)
|
||||
// METHODS
|
||||
virtual void putsNoTracking(const string& str) { m_formatter.putsNoTracking(str); }
|
||||
virtual void puts(const string& str) { m_formatter.puts(str); }
|
||||
virtual void putsNoTracking(const string& str) override { m_formatter.putsNoTracking(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
|
||||
// and insert returns at the proper locations
|
||||
virtual void putbs(const string& str) { m_formatter.puts(str); }
|
||||
virtual void putfs(AstNode* nodep, const string& str) { putfsqs(nodep, str, false); }
|
||||
virtual void putqs(AstNode* nodep, const string& str) { putfsqs(nodep, str, true); }
|
||||
virtual void putbs(const string& str) override { m_formatter.puts(str); }
|
||||
virtual void putfs(AstNode* nodep, const string& str) override { putfsqs(nodep, str, false); }
|
||||
virtual void putqs(AstNode* nodep, const string& str) override { putfsqs(nodep, str, true); }
|
||||
void putfsqs(AstNode* nodep, const string& str, bool quiet) {
|
||||
if (m_formatter.prefixFl() != nodep->fileline()) {
|
||||
m_formatter.prefixFl(nodep->fileline());
|
||||
@ -789,7 +789,7 @@ public:
|
||||
if (user3mark) { AstUser3InUse::check(); }
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitVPrefixedVisitor() {}
|
||||
virtual ~EmitVPrefixedVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -250,7 +250,7 @@ public:
|
||||
m_id = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~EmitXmlFileVisitor() {}
|
||||
virtual ~EmitXmlFileVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -301,7 +301,7 @@ public:
|
||||
}
|
||||
m_os << "</module_files>\n";
|
||||
}
|
||||
virtual ~ModuleFilesXmlVisitor() {}
|
||||
virtual ~ModuleFilesXmlVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -368,7 +368,7 @@ public:
|
||||
// Operate on whole netlist
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~HierCellsXmlVisitor() {}
|
||||
virtual ~HierCellsXmlVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -882,7 +882,7 @@ public:
|
||||
m_stmtp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ExpandVisitor() {}
|
||||
virtual ~ExpandVisitor() override {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
18
src/V3File.h
18
src/V3File.h
@ -182,12 +182,12 @@ class V3OutFile : public V3OutFormatter {
|
||||
|
||||
public:
|
||||
V3OutFile(const string& filename, V3OutFormatter::Language lang);
|
||||
virtual ~V3OutFile();
|
||||
virtual ~V3OutFile() override;
|
||||
void putsForceIncs();
|
||||
|
||||
private:
|
||||
// CALLBACKS
|
||||
virtual void putcOutput(char chr) { fputc(chr, m_fp); }
|
||||
virtual void putcOutput(char chr) override { fputc(chr, m_fp); }
|
||||
};
|
||||
|
||||
class V3OutCFile : public V3OutFile {
|
||||
@ -199,7 +199,7 @@ public:
|
||||
, m_guard(false) {
|
||||
resetPrivate();
|
||||
}
|
||||
virtual ~V3OutCFile() {}
|
||||
virtual ~V3OutCFile() override {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- C++ -*-\n"); }
|
||||
virtual void putsIntTopInclude() { putsForceIncs(); }
|
||||
virtual void putsGuard();
|
||||
@ -223,9 +223,9 @@ class V3OutScFile : public V3OutCFile {
|
||||
public:
|
||||
explicit V3OutScFile(const string& filename)
|
||||
: V3OutCFile(filename) {}
|
||||
virtual ~V3OutScFile() {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- SystemC -*-\n"); }
|
||||
virtual void putsIntTopInclude() {
|
||||
virtual ~V3OutScFile() override {}
|
||||
virtual void putsHeader() override { puts("// Verilated -*- SystemC -*-\n"); }
|
||||
virtual void putsIntTopInclude() override {
|
||||
putsForceIncs();
|
||||
puts("#include \"systemc.h\"\n");
|
||||
puts("#include \"verilated_sc.h\"\n");
|
||||
@ -236,7 +236,7 @@ class V3OutVFile : public V3OutFile {
|
||||
public:
|
||||
explicit V3OutVFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_VERILOG) {}
|
||||
virtual ~V3OutVFile() {}
|
||||
virtual ~V3OutVFile() override {}
|
||||
virtual void putsHeader() { puts("// Verilated -*- Verilog -*-\n"); }
|
||||
};
|
||||
|
||||
@ -246,7 +246,7 @@ public:
|
||||
: V3OutFile(filename, V3OutFormatter::LA_XML) {
|
||||
blockIndent(2);
|
||||
}
|
||||
virtual ~V3OutXmlFile() {}
|
||||
virtual ~V3OutXmlFile() override {}
|
||||
virtual void putsHeader() { puts("<?xml version=\"1.0\" ?>\n"); }
|
||||
};
|
||||
|
||||
@ -254,7 +254,7 @@ class V3OutMkFile : public V3OutFile {
|
||||
public:
|
||||
explicit V3OutMkFile(const string& filename)
|
||||
: V3OutFile(filename, V3OutFormatter::LA_MK) {}
|
||||
virtual ~V3OutMkFile() {}
|
||||
virtual ~V3OutMkFile() override {}
|
||||
virtual void putsHeader() { puts("# Verilated -*- Makefile -*-\n"); }
|
||||
// No automatic indentation yet.
|
||||
void puts(const char* strg) { putsNoTracking(strg); }
|
||||
|
@ -78,9 +78,9 @@ public:
|
||||
, m_reducible(true)
|
||||
, m_dedupable(true)
|
||||
, m_consumed(false) {}
|
||||
virtual ~GateEitherVertex() {}
|
||||
virtual ~GateEitherVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string dotStyle() const { return m_consumed ? "" : "dotted"; }
|
||||
virtual string dotStyle() const override { return m_consumed ? "" : "dotted"; }
|
||||
AstScope* scopep() const { return m_scopep; }
|
||||
bool reducible() const { return m_reducible; }
|
||||
bool dedupable() const { return m_dedupable; }
|
||||
@ -140,11 +140,11 @@ public:
|
||||
, m_isClock(false)
|
||||
, m_rstSyncNodep(nullptr)
|
||||
, m_rstAsyncNodep(nullptr) {}
|
||||
virtual ~GateVarVertex() {}
|
||||
virtual ~GateVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
virtual string name() const { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "blue"; }
|
||||
virtual string name() const override { return (cvtToHex(m_varScp) + " " + varScp()->name()); }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
bool isTop() const { return m_isTop; }
|
||||
void setIsTop() { m_isTop = true; }
|
||||
bool isClock() const { return m_isClock; }
|
||||
@ -165,7 +165,9 @@ public:
|
||||
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 {
|
||||
@ -179,15 +181,19 @@ public:
|
||||
, m_nodep(nodep)
|
||||
, m_activep(activep)
|
||||
, m_slow(slow) {}
|
||||
virtual ~GateLogicVertex() {}
|
||||
virtual ~GateLogicVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return (cvtToHex(m_nodep) + "@" + scopep()->prettyName()); }
|
||||
virtual string dotColor() const { return "purple"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(m_nodep) + "@" + scopep()->prettyName());
|
||||
}
|
||||
virtual string dotColor() const override { return "purple"; }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
AstActive* activep() const { return m_activep; }
|
||||
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: ");
|
||||
}
|
||||
virtual ~GateOkVisitor() {}
|
||||
virtual ~GateOkVisitor() override {}
|
||||
// PUBLIC METHODS
|
||||
bool isSimple() const { return m_isSimple; }
|
||||
AstNode* substTree() const { return m_substTreep; }
|
||||
@ -538,7 +544,7 @@ public:
|
||||
m_inSlow = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~GateVisitor() {
|
||||
virtual ~GateVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Gate sigs deleted", m_statSigs);
|
||||
V3Stats::addStat("Optimizations, Gate inputs replaced", m_statRefs);
|
||||
V3Stats::addStat("Optimizations, Gate sigs deduped", m_statDedupLogic);
|
||||
@ -878,7 +884,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
virtual ~GateElimVisitor() {}
|
||||
virtual ~GateElimVisitor() override {}
|
||||
GateElimVisitor(AstNode* nodep, AstVarScope* varscp, AstNode* replaceTreep,
|
||||
GateDedupeVarVisitor* varVisp) {
|
||||
UINFO(9, " elimvisitor " << nodep << endl);
|
||||
@ -1143,7 +1149,7 @@ private:
|
||||
GateDedupeVarVisitor m_varVisitor; // Looks for a dupe of the logic
|
||||
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
|
||||
if (m_depth > GATE_DEDUP_MAX_DEPTH)
|
||||
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
|
||||
// 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);
|
||||
|
||||
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;) {
|
||||
V3GraphEdge* oldedgep = edgep;
|
||||
edgep = edgep->inNextp(); // for recursive since the edge could be deleted
|
||||
@ -1363,7 +1369,7 @@ private:
|
||||
}
|
||||
return VNUser(0);
|
||||
}
|
||||
virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) { //
|
||||
virtual VNUser visit(GateLogicVertex* lvertexp, VNUser vu) override { //
|
||||
return VNUser(0);
|
||||
}
|
||||
|
||||
@ -1433,7 +1439,7 @@ public:
|
||||
m_found_offset = 0;
|
||||
m_found = false;
|
||||
}
|
||||
virtual ~GateConcatVisitor() {}
|
||||
virtual ~GateConcatVisitor() override {}
|
||||
// PUBLIC METHODS
|
||||
bool concatOffset(AstConcat* concatp, AstVarScope* vscp, int& offsetr) {
|
||||
m_vscp = vscp;
|
||||
@ -1474,7 +1480,7 @@ private:
|
||||
int m_total_seen_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
|
||||
AstVarScope* vsp = vvertexp->varScp();
|
||||
if (vsp->user2SetOnce()) return VNUser(0);
|
||||
@ -1491,7 +1497,7 @@ private:
|
||||
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());
|
||||
int clk_offset = currState->m_offset;
|
||||
if (const AstAssignW* assignp = VN_CAST(lvertexp->nodep(), AssignW)) {
|
||||
@ -1564,7 +1570,7 @@ public:
|
||||
m_total_seen_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 decomposed vectors",
|
||||
m_total_decomposed_clk_vectors);
|
||||
@ -1621,7 +1627,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit GateDeassignVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~GateDeassignVisitor() {}
|
||||
virtual ~GateDeassignVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
m_activep = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~GenClkRenameVisitor() {}
|
||||
virtual ~GenClkRenameVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -223,7 +223,7 @@ public:
|
||||
, m_topModp(nullptr) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~GenClkReadVisitor() {}
|
||||
virtual ~GenClkReadVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -45,13 +45,13 @@ public:
|
||||
, m_storedRank(0)
|
||||
, m_onWorkList(false)
|
||||
, m_deleted(false) {}
|
||||
virtual ~GraphAcycVertex() {}
|
||||
virtual ~GraphAcycVertex() override {}
|
||||
V3GraphVertex* origVertexp() const { return m_origVertexp; }
|
||||
void setDelete() { m_deleted = true; }
|
||||
bool isDelete() const { return m_deleted; }
|
||||
virtual string name() const { return m_origVertexp->name(); }
|
||||
virtual string dotColor() const { return m_origVertexp->dotColor(); }
|
||||
virtual FileLine* fileline() const { return m_origVertexp->fileline(); }
|
||||
virtual string name() const override { return m_origVertexp->name(); }
|
||||
virtual string dotColor() const override { return m_origVertexp->dotColor(); }
|
||||
virtual FileLine* fileline() const override { return m_origVertexp->fileline(); }
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
@ -70,9 +70,11 @@ public:
|
||||
GraphAcycEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
|
||||
bool cutable = false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
virtual ~GraphAcycEdge() {}
|
||||
virtual ~GraphAcycEdge() override {}
|
||||
// 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());
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -62,7 +62,7 @@ class DfaGraph : public V3Graph {
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
DfaGraph() {}
|
||||
virtual ~DfaGraph() {}
|
||||
virtual ~DfaGraph() override {}
|
||||
// METHODS
|
||||
/// Find start node
|
||||
DfaVertex* findStart();
|
||||
@ -93,10 +93,12 @@ public:
|
||||
virtual DfaVertex* clone(DfaGraph* graphp) {
|
||||
return new DfaVertex(graphp, start(), accepting());
|
||||
}
|
||||
virtual ~DfaVertex() {}
|
||||
virtual ~DfaVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string dotShape() const { return (accepting() ? "doublecircle" : ""); }
|
||||
virtual string dotColor() const { return start() ? "blue" : (color() ? "red" : "black"); }
|
||||
virtual string dotShape() const override { return (accepting() ? "doublecircle" : ""); }
|
||||
virtual string dotColor() const override {
|
||||
return start() ? "blue" : (color() ? "red" : "black");
|
||||
}
|
||||
bool start() const { return m_start; }
|
||||
void start(bool flag) { m_start = flag; }
|
||||
bool accepting() const { return m_accepting; }
|
||||
@ -126,16 +128,18 @@ public:
|
||||
: V3GraphEdge(graphp, fromp, top, copyfrom->weight())
|
||||
, m_input(copyfrom->input())
|
||||
, m_complement(copyfrom->complement()) {}
|
||||
virtual ~DfaEdge() {}
|
||||
virtual ~DfaEdge() override {}
|
||||
// METHODS
|
||||
virtual string dotColor() const { return (na() ? "yellow" : epsilon() ? "green" : "black"); }
|
||||
virtual string dotLabel() const {
|
||||
virtual string dotColor() const override {
|
||||
return (na() ? "yellow" : epsilon() ? "green" : "black");
|
||||
}
|
||||
virtual string dotLabel() const override {
|
||||
return (na() ? ""
|
||||
: epsilon() ? "e"
|
||||
: complement() ? ("not " + 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 na() const { return input().toInt() == NA().toInt(); }
|
||||
bool complement() const { return m_complement; }
|
||||
|
@ -57,18 +57,18 @@ public:
|
||||
V3GraphTestVertex(V3Graph* graphp, const string& name)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_name(name) {}
|
||||
virtual ~V3GraphTestVertex() {}
|
||||
virtual ~V3GraphTestVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return m_name; }
|
||||
virtual string name() const override { return m_name; }
|
||||
};
|
||||
|
||||
class V3GraphTestVarVertex : public V3GraphTestVertex {
|
||||
public:
|
||||
V3GraphTestVarVertex(V3Graph* graphp, const string& name)
|
||||
: V3GraphTestVertex(graphp, name) {}
|
||||
virtual ~V3GraphTestVarVertex() {}
|
||||
virtual ~V3GraphTestVarVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string dotColor() const { return "blue"; }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -77,8 +77,8 @@ public:
|
||||
|
||||
class V3GraphTestStrong : public V3GraphTest {
|
||||
public:
|
||||
virtual string name() { return "strong"; }
|
||||
virtual void runTest() {
|
||||
virtual string name() override { return "strong"; }
|
||||
virtual void runTest() override {
|
||||
V3Graph* gp = &m_graph;
|
||||
// Verify we break edges at a good point
|
||||
// A simple alg would make 3 breaks, below only requires b->i to break
|
||||
@ -115,8 +115,8 @@ public:
|
||||
|
||||
class V3GraphTestAcyc : public V3GraphTest {
|
||||
public:
|
||||
virtual string name() { return "acyc"; }
|
||||
virtual void runTest() {
|
||||
virtual string name() override { return "acyc"; }
|
||||
virtual void runTest() override {
|
||||
V3Graph* gp = &m_graph;
|
||||
// Verify we break edges at a good point
|
||||
// A simple alg would make 3 breaks, below only requires b->i to break
|
||||
@ -143,8 +143,8 @@ public:
|
||||
|
||||
class V3GraphTestVars : public V3GraphTest {
|
||||
public:
|
||||
virtual string name() { return "vars"; }
|
||||
virtual void runTest() {
|
||||
virtual string name() override { return "vars"; }
|
||||
virtual void runTest() override {
|
||||
V3Graph* gp = &m_graph;
|
||||
|
||||
V3GraphTestVertex* clk = new V3GraphTestVarVertex(gp, "$clk");
|
||||
@ -267,16 +267,16 @@ public:
|
||||
DfaTestVertex(DfaGraph* graphp, const string& name)
|
||||
: DfaVertex(graphp)
|
||||
, m_name(name) {}
|
||||
virtual ~DfaTestVertex() {}
|
||||
virtual ~DfaTestVertex() override {}
|
||||
// ACCESSORS
|
||||
virtual string name() const { return m_name; }
|
||||
virtual string name() const override { return m_name; }
|
||||
};
|
||||
|
||||
class V3GraphTestDfa : public V3GraphTest {
|
||||
|
||||
public:
|
||||
virtual string name() { return "dfa"; }
|
||||
virtual void runTest() {
|
||||
virtual string name() override { return "dfa"; }
|
||||
virtual void runTest() override {
|
||||
DfaGraph* gp = &m_graph;
|
||||
|
||||
// NFA Pattern for ( (LR) | (L*R)) Z
|
||||
@ -330,8 +330,8 @@ class V3GraphTestImport : public V3GraphTest {
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual string name() { return "import"; }
|
||||
virtual void runTest() {
|
||||
virtual string name() override { return "import"; }
|
||||
virtual void runTest() override {
|
||||
DfaGraph* gp = &m_graph;
|
||||
if (V3GraphTest::debug()) DfaGraph::debug(9);
|
||||
dotImport();
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
nodeHashIterate(const_cast<AstNode*>(nodep));
|
||||
}
|
||||
V3Hash finalHash() const { return m_lowerHash; }
|
||||
virtual ~HashedVisitor() {}
|
||||
virtual ~HashedVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -223,7 +223,7 @@ public:
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InlineMarkVisitor() {
|
||||
virtual ~InlineMarkVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Inline unsupported", m_statUnsup);
|
||||
// Done with these, are not outputs
|
||||
AstNode::user2ClearTree();
|
||||
@ -257,7 +257,7 @@ public:
|
||||
explicit InlineCollectVisitor(AstNodeModule* nodep) { // passed OLD module, not new one
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InlineCollectVisitor() {}
|
||||
virtual ~InlineCollectVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -475,7 +475,7 @@ public:
|
||||
m_cellp = cellp;
|
||||
iterate(cloneModp);
|
||||
}
|
||||
virtual ~InlineRelinkVisitor() {}
|
||||
virtual ~InlineRelinkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -618,7 +618,7 @@ public:
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InlineVisitor() { //
|
||||
virtual ~InlineVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Inlined cells", m_statCells);
|
||||
}
|
||||
};
|
||||
@ -709,7 +709,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit InlineIntfRefVisitor(AstNode* nodep) { iterate(nodep); }
|
||||
virtual ~InlineIntfRefVisitor() {}
|
||||
virtual ~InlineIntfRefVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InstVisitor() {}
|
||||
virtual ~InstVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -190,7 +190,7 @@ public:
|
||||
m_modVarNameMap.clear();
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InstDeModVarVisitor() {}
|
||||
virtual ~InstDeModVarVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -472,7 +472,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~InstDeVisitor() {}
|
||||
virtual ~InstDeVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
, m_osp(osp) {
|
||||
if (nodep) iterate(nodep);
|
||||
}
|
||||
virtual ~InstrCountVisitor() {}
|
||||
virtual ~InstrCountVisitor() override {}
|
||||
|
||||
// METHODS
|
||||
uint32_t instrCount() const { return m_instrCount; }
|
||||
@ -280,7 +280,7 @@ public:
|
||||
UASSERT_OBJ(osp, nodep, "Don't call if not dumping");
|
||||
if (nodep) iterate(nodep);
|
||||
}
|
||||
virtual ~InstrCountDumpVisitor() {}
|
||||
virtual ~InstrCountDumpVisitor() override {}
|
||||
|
||||
private:
|
||||
// METHODS
|
||||
|
@ -453,7 +453,7 @@ public:
|
||||
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);
|
||||
}
|
||||
VL_UNCOPYABLE(LifeVisitor);
|
||||
@ -490,7 +490,7 @@ public:
|
||||
m_statep = statep;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LifeTopVisitor() {}
|
||||
virtual ~LifeTopVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -94,7 +94,7 @@ public:
|
||||
: m_tracingCall(false) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LifePostElimVisitor() {}
|
||||
virtual ~LifePostElimVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -354,7 +354,7 @@ public:
|
||||
, m_mtasksGraphp(nullptr) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LifePostDlyVisitor() {
|
||||
virtual ~LifePostDlyVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Lifetime postassign deletions", m_statAssnDel);
|
||||
}
|
||||
};
|
||||
|
@ -44,8 +44,8 @@
|
||||
class LinkCellsGraph : public V3Graph {
|
||||
public:
|
||||
LinkCellsGraph() {}
|
||||
virtual ~LinkCellsGraph() {}
|
||||
virtual void loopsMessageCb(V3GraphVertex* vertexp);
|
||||
virtual ~LinkCellsGraph() override {}
|
||||
virtual void loopsMessageCb(V3GraphVertex* vertexp) override;
|
||||
};
|
||||
|
||||
class LinkCellsVertex : public V3GraphVertex {
|
||||
@ -55,12 +55,12 @@ public:
|
||||
LinkCellsVertex(V3Graph* graphp, AstNodeModule* modp)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_modp(modp) {}
|
||||
virtual ~LinkCellsVertex() {}
|
||||
virtual ~LinkCellsVertex() override {}
|
||||
AstNodeModule* modp() const { return m_modp; }
|
||||
virtual string name() const { return modp()->name(); }
|
||||
virtual FileLine* fileline() const { return modp()->fileline(); }
|
||||
virtual string name() const override { return modp()->name(); }
|
||||
virtual FileLine* fileline() const override { return modp()->fileline(); }
|
||||
// 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;
|
||||
}
|
||||
};
|
||||
@ -69,8 +69,8 @@ class LibraryVertex : public V3GraphVertex {
|
||||
public:
|
||||
explicit LibraryVertex(V3Graph* graphp)
|
||||
: V3GraphVertex(graphp) {}
|
||||
virtual ~LibraryVertex() {}
|
||||
virtual string name() const { return "*LIBRARY*"; }
|
||||
virtual ~LibraryVertex() override {}
|
||||
virtual string name() const override { return "*LIBRARY*"; }
|
||||
};
|
||||
|
||||
void LinkCellsGraph::loopsMessageCb(V3GraphVertex* vertexp) {
|
||||
@ -521,7 +521,7 @@ public:
|
||||
}
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkCellsVisitor() {}
|
||||
virtual ~LinkCellsVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -78,19 +78,19 @@
|
||||
|
||||
class LinkNodeMatcherFTask : public VNodeMatcher {
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
public:
|
||||
virtual bool nodeMatch(const AstNode* nodep) const {
|
||||
virtual bool nodeMatch(const AstNode* nodep) const override {
|
||||
const AstVar* varp = VN_CAST_CONST(nodep, Var);
|
||||
if (!varp) return false;
|
||||
return varp->isIO();
|
||||
@ -98,7 +98,7 @@ public:
|
||||
};
|
||||
class LinkNodeMatcherVarParam : public VNodeMatcher {
|
||||
public:
|
||||
virtual bool nodeMatch(const AstNode* nodep) const {
|
||||
virtual bool nodeMatch(const AstNode* nodep) const override {
|
||||
const AstVar* varp = VN_CAST_CONST(nodep, Var);
|
||||
if (!varp) return false;
|
||||
return varp->isParam();
|
||||
@ -106,7 +106,7 @@ public:
|
||||
};
|
||||
class LinkNodeMatcherVarOrScope : public VNodeMatcher {
|
||||
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);
|
||||
}
|
||||
};
|
||||
@ -1267,7 +1267,7 @@ public:
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkDotFindVisitor() {}
|
||||
virtual ~LinkDotFindVisitor() override {}
|
||||
};
|
||||
|
||||
//======================================================================
|
||||
@ -1434,7 +1434,7 @@ public:
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkDotParamVisitor() {}
|
||||
virtual ~LinkDotParamVisitor() override {}
|
||||
};
|
||||
|
||||
//======================================================================
|
||||
@ -1590,7 +1590,7 @@ public:
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkDotScopeVisitor() {}
|
||||
virtual ~LinkDotScopeVisitor() override {}
|
||||
};
|
||||
|
||||
//======================================================================
|
||||
@ -1675,7 +1675,7 @@ public:
|
||||
m_statep = statep;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkDotIfaceVisitor() {}
|
||||
virtual ~LinkDotIfaceVisitor() override {}
|
||||
};
|
||||
|
||||
void LinkDotState::computeIfaceModSyms() {
|
||||
@ -2825,7 +2825,7 @@ public:
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkDotResolveVisitor() {}
|
||||
virtual ~LinkDotResolveVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -241,7 +241,7 @@ public:
|
||||
m_unsupportedHere = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkIncVisitor() {}
|
||||
virtual ~LinkIncVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -294,7 +294,7 @@ public:
|
||||
m_modRepeatNum = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkJumpVisitor() {}
|
||||
virtual ~LinkJumpVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -303,7 +303,7 @@ public:
|
||||
m_ftaskp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LinkLValueVisitor() {}
|
||||
virtual ~LinkLValueVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -604,7 +604,7 @@ public:
|
||||
m_valueModp = nullptr;
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkParseVisitor() {}
|
||||
virtual ~LinkParseVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -530,7 +530,7 @@ public:
|
||||
m_senitemCvtNum = 0;
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkResolveVisitor() {}
|
||||
virtual ~LinkResolveVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -574,7 +574,7 @@ public:
|
||||
//
|
||||
iterate(rootp);
|
||||
}
|
||||
virtual ~LinkBotupVisitor() {}
|
||||
virtual ~LinkBotupVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
explicit LocalizeDehierVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~LocalizeDehierVisitor() {}
|
||||
virtual ~LocalizeDehierVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -225,7 +225,7 @@ public:
|
||||
m_cfuncp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~LocalizeVisitor() {
|
||||
virtual ~LocalizeVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Vars localized", m_statLocVars);
|
||||
}
|
||||
};
|
||||
|
@ -329,7 +329,7 @@ public:
|
||||
m_markVars.clear();
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~MergeCondVisitor() {
|
||||
virtual ~MergeCondVisitor() override {
|
||||
V3Stats::addStat("Optimizations, MergeCond merges", m_statMerges);
|
||||
V3Stats::addStat("Optimizations, MergeCond merged items", m_statMergedItems);
|
||||
V3Stats::addStat("Optimizations, MergeCond longest merge", m_statLongestList);
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
m_modp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~NameVisitor() {}
|
||||
virtual ~NameVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -371,7 +371,7 @@ public:
|
||||
iterate(nodep);
|
||||
} while (m_newClkMarked);
|
||||
}
|
||||
virtual ~OrderClkMarkVisitor() {}
|
||||
virtual ~OrderClkMarkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -405,7 +405,7 @@ public:
|
||||
m_clkAss = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~OrderClkAssVisitor() {}
|
||||
virtual ~OrderClkAssVisitor() override {}
|
||||
// METHODS
|
||||
bool isClkAss() { return m_clkAss; }
|
||||
};
|
||||
@ -1240,7 +1240,7 @@ public:
|
||||
m_pomNewStmts = 0;
|
||||
if (debug()) m_graph.debug(5); // 3 is default if global debug; we want acyc debugging
|
||||
}
|
||||
virtual ~OrderVisitor() {
|
||||
virtual ~OrderVisitor() override {
|
||||
// Stats
|
||||
for (int type = 0; type < OrderVEdgeType::_ENUM_END; type++) {
|
||||
double count = double(m_statCut[type]);
|
||||
|
@ -113,9 +113,9 @@ inline bool operator==(OrderVEdgeType::en lhs, const OrderVEdgeType& rhs) {
|
||||
class OrderGraph : public V3Graph {
|
||||
public:
|
||||
OrderGraph() {}
|
||||
virtual ~OrderGraph() {}
|
||||
virtual ~OrderGraph() override {}
|
||||
// Methods
|
||||
virtual void loopsVertexCb(V3GraphVertex* vertexp);
|
||||
virtual void loopsVertexCb(V3GraphVertex* vertexp) override;
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -138,12 +138,12 @@ public:
|
||||
, m_scopep(scopep)
|
||||
, m_domainp(domainp)
|
||||
, m_isFromInput(false) {}
|
||||
virtual ~OrderEitherVertex() {}
|
||||
virtual OrderEitherVertex* clone(V3Graph* graphp) const = 0;
|
||||
virtual ~OrderEitherVertex() override {}
|
||||
virtual OrderEitherVertex* clone(V3Graph* graphp) const override = 0;
|
||||
// Methods
|
||||
virtual OrderVEdgeType type() const = 0;
|
||||
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
|
||||
void domainp(AstSenTree* domainp) { m_domainp = domainp; }
|
||||
AstScope* scopep() const { return m_scopep; }
|
||||
@ -161,15 +161,15 @@ public:
|
||||
: OrderEitherVertex(graphp, nullptr, domainp) {
|
||||
isFromInput(true); // By definition
|
||||
}
|
||||
virtual ~OrderInputsVertex() {}
|
||||
virtual OrderInputsVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderInputsVertex() override {}
|
||||
virtual OrderInputsVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderInputsVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_INPUTS; }
|
||||
virtual string name() const { return "*INPUTS*"; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
virtual string dotName() const { return ""; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_INPUTS; }
|
||||
virtual string name() const override { return "*INPUTS*"; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
virtual string dotName() const override { return ""; }
|
||||
virtual bool domainMatters() override { return false; }
|
||||
};
|
||||
|
||||
class OrderLogicVertex : public OrderEitherVertex {
|
||||
@ -184,18 +184,18 @@ public:
|
||||
OrderLogicVertex(V3Graph* graphp, AstScope* scopep, AstSenTree* domainp, AstNode* nodep)
|
||||
: OrderEitherVertex(graphp, scopep, domainp)
|
||||
, m_nodep(nodep) {}
|
||||
virtual ~OrderLogicVertex() {}
|
||||
virtual OrderLogicVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderLogicVertex() override {}
|
||||
virtual OrderLogicVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderLogicVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_LOGIC; }
|
||||
virtual bool domainMatters() { return true; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_LOGIC; }
|
||||
virtual bool domainMatters() override { return true; }
|
||||
// ACCESSORS
|
||||
virtual string name() const {
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(m_nodep) + "\\n " + cvtToStr(nodep()->typeName()));
|
||||
}
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
virtual string dotColor() const override { return "yellow"; }
|
||||
};
|
||||
|
||||
class OrderVarVertex : public OrderEitherVertex {
|
||||
@ -215,10 +215,10 @@ public:
|
||||
, m_varScp(varScp)
|
||||
, m_isClock(false)
|
||||
, m_isDelayed(false) {}
|
||||
virtual ~OrderVarVertex() {}
|
||||
virtual OrderVarVertex* clone(V3Graph* graphp) const = 0;
|
||||
virtual OrderVEdgeType type() const = 0;
|
||||
virtual FileLine* fileline() const { return varScp()->fileline(); }
|
||||
virtual ~OrderVarVertex() override {}
|
||||
virtual OrderVarVertex* clone(V3Graph* graphp) const override = 0;
|
||||
virtual OrderVEdgeType type() const override = 0;
|
||||
virtual FileLine* fileline() const override { return varScp()->fileline(); }
|
||||
// ACCESSORS
|
||||
AstVarScope* varScp() const { return m_varScp; }
|
||||
void isClock(bool flag) { m_isClock = flag; }
|
||||
@ -234,14 +234,16 @@ class OrderVarStdVertex : public OrderVarVertex {
|
||||
public:
|
||||
OrderVarStdVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarStdVertex() {}
|
||||
virtual OrderVarStdVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderVarStdVertex() override {}
|
||||
virtual OrderVarStdVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarStdVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSTD; }
|
||||
virtual string name() const { return (cvtToHex(varScp()) + "\\n " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "skyblue"; }
|
||||
virtual bool domainMatters() { return true; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARSTD; }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(varScp()) + "\\n " + varScp()->name());
|
||||
}
|
||||
virtual string dotColor() const override { return "skyblue"; }
|
||||
virtual bool domainMatters() override { return true; }
|
||||
};
|
||||
class OrderVarPreVertex : public OrderVarVertex {
|
||||
OrderVarPreVertex(V3Graph* graphp, const OrderVarPreVertex& old)
|
||||
@ -250,14 +252,16 @@ class OrderVarPreVertex : public OrderVarVertex {
|
||||
public:
|
||||
OrderVarPreVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarPreVertex() {}
|
||||
virtual OrderVarPreVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderVarPreVertex() override {}
|
||||
virtual OrderVarPreVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPreVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPRE; }
|
||||
virtual string name() const { return (cvtToHex(varScp()) + " PRE\\n " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "lightblue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPRE; }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(varScp()) + " PRE\\n " + varScp()->name());
|
||||
}
|
||||
virtual string dotColor() const override { return "lightblue"; }
|
||||
virtual bool domainMatters() override { return false; }
|
||||
};
|
||||
class OrderVarPostVertex : public OrderVarVertex {
|
||||
OrderVarPostVertex(V3Graph* graphp, const OrderVarPostVertex& old)
|
||||
@ -266,14 +270,16 @@ class OrderVarPostVertex : public OrderVarVertex {
|
||||
public:
|
||||
OrderVarPostVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual OrderVarPostVertex* clone(V3Graph* graphp) const {
|
||||
virtual OrderVarPostVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPostVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPOST; }
|
||||
virtual ~OrderVarPostVertex() {}
|
||||
virtual string name() const { return (cvtToHex(varScp()) + " POST\\n " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "CadetBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPOST; }
|
||||
virtual ~OrderVarPostVertex() override {}
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(varScp()) + " POST\\n " + varScp()->name());
|
||||
}
|
||||
virtual string dotColor() const override { return "CadetBlue"; }
|
||||
virtual bool domainMatters() override { return false; }
|
||||
};
|
||||
class OrderVarPordVertex : public OrderVarVertex {
|
||||
OrderVarPordVertex(V3Graph* graphp, const OrderVarPordVertex& old)
|
||||
@ -282,14 +288,16 @@ class OrderVarPordVertex : public OrderVarVertex {
|
||||
public:
|
||||
OrderVarPordVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarPordVertex() {}
|
||||
virtual OrderVarPordVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderVarPordVertex() override {}
|
||||
virtual OrderVarPordVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarPordVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARPORD; }
|
||||
virtual string name() const { return (cvtToHex(varScp()) + " PORD\\n " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "NavyBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARPORD; }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(varScp()) + " PORD\\n " + varScp()->name());
|
||||
}
|
||||
virtual string dotColor() const override { return "NavyBlue"; }
|
||||
virtual bool domainMatters() override { return false; }
|
||||
};
|
||||
class OrderVarSettleVertex : public OrderVarVertex {
|
||||
OrderVarSettleVertex(V3Graph* graphp, const OrderVarSettleVertex& old)
|
||||
@ -298,14 +306,16 @@ class OrderVarSettleVertex : public OrderVarVertex {
|
||||
public:
|
||||
OrderVarSettleVertex(V3Graph* graphp, AstScope* scopep, AstVarScope* varScp)
|
||||
: OrderVarVertex(graphp, scopep, varScp) {}
|
||||
virtual ~OrderVarSettleVertex() {}
|
||||
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderVarSettleVertex() override {}
|
||||
virtual OrderVarSettleVertex* clone(V3Graph* graphp) const override {
|
||||
return new OrderVarSettleVertex(graphp, *this);
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_VARSETTLE; }
|
||||
virtual string name() const { return (cvtToHex(varScp()) + " STL\\n " + varScp()->name()); }
|
||||
virtual string dotColor() const { return "PowderBlue"; }
|
||||
virtual bool domainMatters() { return false; }
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::VERTEX_VARSETTLE; }
|
||||
virtual string name() const override {
|
||||
return (cvtToHex(varScp()) + " STL\\n " + varScp()->name());
|
||||
}
|
||||
virtual string dotColor() const override { return "PowderBlue"; }
|
||||
virtual bool domainMatters() override { return false; }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -332,28 +342,28 @@ public:
|
||||
, m_logicp(logicp)
|
||||
, m_state(POM_WAIT)
|
||||
, m_domScopep(nullptr) {}
|
||||
virtual ~OrderMoveVertex() {}
|
||||
virtual OrderMoveVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~OrderMoveVertex() override {}
|
||||
virtual OrderMoveVertex* clone(V3Graph* graphp) const override {
|
||||
v3fatalSrc("Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
// METHODS
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; }
|
||||
virtual string dotColor() const {
|
||||
virtual string dotColor() const override {
|
||||
if (logicp()) {
|
||||
return logicp()->dotColor();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
virtual FileLine* fileline() const {
|
||||
virtual FileLine* fileline() const override {
|
||||
if (logicp()) {
|
||||
return logicp()->fileline();
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
virtual string name() const {
|
||||
virtual string name() const override {
|
||||
string nm;
|
||||
if (VL_UNCOVERABLE(!logicp())) { // Avoid crash when debugging
|
||||
nm = "nul"; // LCOV_EXCL_LINE
|
||||
@ -402,20 +412,20 @@ public:
|
||||
, m_domainp(domainp) {
|
||||
UASSERT(!(logicp && varp), "MTaskMoveVertex: logicp and varp may not both be set!\n");
|
||||
}
|
||||
virtual ~MTaskMoveVertex() {}
|
||||
virtual MTaskMoveVertex* clone(V3Graph* graphp) const {
|
||||
virtual ~MTaskMoveVertex() override {}
|
||||
virtual MTaskMoveVertex* clone(V3Graph* graphp) const override {
|
||||
v3fatalSrc("Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::VERTEX_MOVE; }
|
||||
virtual string dotColor() const {
|
||||
virtual string dotColor() const override {
|
||||
if (logicp()) {
|
||||
return logicp()->dotColor();
|
||||
} else {
|
||||
return "yellow";
|
||||
}
|
||||
}
|
||||
virtual string name() const {
|
||||
virtual string name() const override {
|
||||
string nm;
|
||||
if (logicp()) {
|
||||
nm = logicp()->name();
|
||||
@ -447,9 +457,10 @@ public:
|
||||
OrderEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top, int weight,
|
||||
bool cutable = false)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable) {}
|
||||
virtual ~OrderEdge() {}
|
||||
virtual ~OrderEdge() override {}
|
||||
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);
|
||||
}
|
||||
// When ordering combo blocks with stronglyConnected, follow edges not
|
||||
@ -473,14 +484,14 @@ class OrderComboCutEdge : public OrderEdge {
|
||||
public:
|
||||
OrderComboCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_COMBOCUT; }
|
||||
virtual ~OrderComboCutEdge() {}
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_COMBOCUT; }
|
||||
virtual ~OrderComboCutEdge() override {}
|
||||
virtual OrderComboCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
V3GraphVertex* top) const {
|
||||
V3GraphVertex* top) const override {
|
||||
return new OrderComboCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual string dotColor() const { return "yellowGreen"; }
|
||||
virtual bool followComboConnected() const { return true; }
|
||||
virtual string dotColor() const override { return "yellowGreen"; }
|
||||
virtual bool followComboConnected() const override { return true; }
|
||||
};
|
||||
|
||||
class OrderPostCutEdge : public OrderEdge {
|
||||
@ -494,14 +505,14 @@ class OrderPostCutEdge : public OrderEdge {
|
||||
public:
|
||||
OrderPostCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: OrderEdge(graphp, fromp, top, WEIGHT_COMBO, CUTABLE) {}
|
||||
virtual OrderVEdgeType type() const { return OrderVEdgeType::EDGE_POSTCUT; }
|
||||
virtual ~OrderPostCutEdge() {}
|
||||
virtual OrderVEdgeType type() const override { return OrderVEdgeType::EDGE_POSTCUT; }
|
||||
virtual ~OrderPostCutEdge() override {}
|
||||
virtual OrderPostCutEdge* clone(V3Graph* graphp, V3GraphVertex* fromp,
|
||||
V3GraphVertex* top) const {
|
||||
V3GraphVertex* top) const override {
|
||||
return new OrderPostCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual string dotColor() const { return "PaleGreen"; }
|
||||
virtual bool followComboConnected() const { return false; }
|
||||
virtual string dotColor() const override { return "PaleGreen"; }
|
||||
virtual bool followComboConnected() const override { return false; }
|
||||
};
|
||||
|
||||
class OrderPreCutEdge : public OrderEdge {
|
||||
@ -515,14 +526,14 @@ class OrderPreCutEdge : public OrderEdge {
|
||||
public:
|
||||
OrderPreCutEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: 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,
|
||||
V3GraphVertex* top) const {
|
||||
V3GraphVertex* top) const override {
|
||||
return new OrderPreCutEdge(graphp, fromp, top, *this);
|
||||
}
|
||||
virtual ~OrderPreCutEdge() {}
|
||||
virtual string dotColor() const { return "khaki"; }
|
||||
virtual bool followComboConnected() const { return false; }
|
||||
virtual ~OrderPreCutEdge() override {}
|
||||
virtual string dotColor() const override { return "khaki"; }
|
||||
virtual bool followComboConnected() const override { return false; }
|
||||
};
|
||||
|
||||
#endif // Guard
|
||||
|
@ -796,7 +796,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ParamVisitor() {}
|
||||
virtual ~ParamVisitor() override {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -495,7 +495,7 @@ public:
|
||||
m_vertices.splice(m_vertices.end(), otherp->m_vertices);
|
||||
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 s_generation = 0;
|
||||
++s_generation;
|
||||
@ -505,10 +505,10 @@ public:
|
||||
// Use this instead of pointer-compares to compare LogicMTasks. Avoids
|
||||
// nondeterministic output. Also name mtasks based on this number in
|
||||
// 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; }
|
||||
// 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
|
||||
uint32_t stepCost() const { return stepCost(m_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
|
||||
// read on whether graph partitioning looks reasonable or bad.
|
||||
std::ostringstream out;
|
||||
@ -792,7 +792,7 @@ public:
|
||||
fromp->addRelative(GraphWay::FORWARD, top);
|
||||
top->addRelative(GraphWay::REVERSE, fromp);
|
||||
}
|
||||
virtual ~MTaskEdge() {
|
||||
virtual ~MTaskEdge() override {
|
||||
fromMTaskp()->removeRelative(GraphWay::FORWARD, toMTaskp());
|
||||
toMTaskp()->removeRelative(GraphWay::REVERSE, fromMTaskp());
|
||||
}
|
||||
@ -802,7 +802,7 @@ public:
|
||||
}
|
||||
LogicMTask* fromMTaskp() const { return dynamic_cast<LogicMTask*>(fromp()); }
|
||||
LogicMTask* toMTaskp() const { return dynamic_cast<LogicMTask*>(top()); }
|
||||
virtual bool mergeWouldCreateCycle() const {
|
||||
virtual bool mergeWouldCreateCycle() const override {
|
||||
return LogicMTask::pathExistsFrom(fromMTaskp(), toMTaskp(), this);
|
||||
}
|
||||
static MTaskEdge* cast(V3GraphEdge* edgep) {
|
||||
@ -1702,7 +1702,7 @@ public:
|
||||
iterate(nodep);
|
||||
}
|
||||
bool hasDpiHazard() const { return m_hasDpiHazard; }
|
||||
virtual ~DpiImportCallVisitor() {}
|
||||
virtual ~DpiImportCallVisitor() override {}
|
||||
|
||||
private:
|
||||
VL_UNCOPYABLE(DpiImportCallVisitor);
|
||||
|
@ -32,7 +32,7 @@ class AbstractMTask : public V3GraphVertex {
|
||||
public:
|
||||
AbstractMTask(V3Graph* graphp)
|
||||
: V3GraphVertex(graphp) {}
|
||||
virtual ~AbstractMTask() {}
|
||||
virtual ~AbstractMTask() override {}
|
||||
virtual uint32_t id() const = 0;
|
||||
virtual uint32_t cost() const = 0;
|
||||
};
|
||||
@ -44,12 +44,12 @@ public:
|
||||
// CONSTRUCTORS
|
||||
AbstractLogicMTask(V3Graph* graphp)
|
||||
: AbstractMTask(graphp) {}
|
||||
virtual ~AbstractLogicMTask() {}
|
||||
virtual ~AbstractLogicMTask() override {}
|
||||
// METHODS
|
||||
// Set of logic vertices in this mtask. Order is not significant.
|
||||
virtual const VxList* vertexListp() const = 0;
|
||||
virtual uint32_t id() const = 0; // Unique id of this mtask.
|
||||
virtual uint32_t cost() const = 0;
|
||||
virtual uint32_t id() const override = 0; // Unique id of this mtask.
|
||||
virtual uint32_t cost() const override = 0;
|
||||
};
|
||||
|
||||
class ExecMTask : public AbstractMTask {
|
||||
@ -78,10 +78,10 @@ public:
|
||||
, m_packNextp(nullptr)
|
||||
, m_threadRoot(false) {}
|
||||
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; }
|
||||
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 thread(uint32_t thread) { m_thread = 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
|
||||
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 {
|
||||
str << name() << "." << cvtToHex(this);
|
||||
if (priority() || cost()) str << " [pr=" << priority() << " c=" << cvtToStr(cost()) << "]";
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
m_noopt = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~PremitAssignVisitor() {}
|
||||
virtual ~PremitAssignVisitor() override {}
|
||||
bool noOpt() const { return m_noopt; }
|
||||
};
|
||||
|
||||
@ -408,7 +408,7 @@ public:
|
||||
m_assignLhs = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~PremitVisitor() {}
|
||||
virtual ~PremitVisitor() override {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -251,7 +251,7 @@ public:
|
||||
m_mgIndexHi = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ReloopVisitor() {
|
||||
virtual ~ReloopVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Reloops", m_statReloops);
|
||||
V3Stats::addStat("Optimizations, Reloop iterations", m_statReItems);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ public:
|
||||
//
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ScopeVisitor() {}
|
||||
virtual ~ScopeVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -406,7 +406,7 @@ public:
|
||||
m_scopep = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~ScopeCleanupVisitor() {}
|
||||
virtual ~ScopeCleanupVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -1131,7 +1131,7 @@ public:
|
||||
setMode(false /*scoped*/, false /*checking*/, true /*params*/);
|
||||
mainGuts(nodep);
|
||||
}
|
||||
virtual ~SimulateVisitor() {
|
||||
virtual ~SimulateVisitor() override {
|
||||
for (ConstPile::iterator it = m_constAllps.begin(); it != m_constAllps.end(); ++it) {
|
||||
for (ConstDeque::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
|
||||
delete (*it2);
|
||||
|
@ -229,7 +229,7 @@ public:
|
||||
m_assignError = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SliceVisitor() {}
|
||||
virtual ~SliceVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -102,12 +102,14 @@ protected:
|
||||
SplitNodeVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
virtual ~SplitNodeVertex() {}
|
||||
virtual ~SplitNodeVertex() override {}
|
||||
// ACCESSORS
|
||||
// Do not make accessor for nodep(), It may change due to
|
||||
// reordering a lower block, but we don't repair it
|
||||
virtual string name() const { return cvtToHex(m_nodep) + ' ' + m_nodep->prettyTypeName(); }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override {
|
||||
return cvtToHex(m_nodep) + ' ' + m_nodep->prettyTypeName();
|
||||
}
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
|
||||
public:
|
||||
virtual AstNode* nodep() const { return m_nodep; }
|
||||
@ -117,34 +119,34 @@ class SplitPliVertex : public SplitNodeVertex {
|
||||
public:
|
||||
explicit SplitPliVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
virtual ~SplitPliVertex() {}
|
||||
virtual string name() const { return "*PLI*"; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
virtual ~SplitPliVertex() override {}
|
||||
virtual string name() const override { return "*PLI*"; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
};
|
||||
|
||||
class SplitLogicVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitLogicVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
virtual ~SplitLogicVertex() {}
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
virtual ~SplitLogicVertex() override {}
|
||||
virtual string dotColor() const override { return "yellow"; }
|
||||
};
|
||||
|
||||
class SplitVarStdVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitVarStdVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
virtual ~SplitVarStdVertex() {}
|
||||
virtual string dotColor() const { return "skyblue"; }
|
||||
virtual ~SplitVarStdVertex() override {}
|
||||
virtual string dotColor() const override { return "skyblue"; }
|
||||
};
|
||||
|
||||
class SplitVarPostVertex : public SplitNodeVertex {
|
||||
public:
|
||||
SplitVarPostVertex(V3Graph* graphp, AstNode* nodep)
|
||||
: SplitNodeVertex(graphp, nodep) {}
|
||||
virtual ~SplitVarPostVertex() {}
|
||||
virtual string name() const { return string("POST ") + SplitNodeVertex::name(); }
|
||||
virtual string dotColor() const { return "CadetBlue"; }
|
||||
virtual ~SplitVarPostVertex() override {}
|
||||
virtual string name() const override { return string("POST ") + SplitNodeVertex::name(); }
|
||||
virtual string dotColor() const override { return "CadetBlue"; }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -159,7 +161,7 @@ protected:
|
||||
bool cutable = CUTABLE)
|
||||
: V3GraphEdge(graphp, fromp, top, weight, cutable)
|
||||
, m_ignoreInStep(0) {}
|
||||
virtual ~SplitEdge() {}
|
||||
virtual ~SplitEdge() override {}
|
||||
|
||||
public:
|
||||
// Iterator for graph functions
|
||||
@ -178,7 +180,7 @@ public:
|
||||
if (!oedgep) v3fatalSrc("Following edge of non-SplitEdge type");
|
||||
return (!oedgep->ignoreThisStep());
|
||||
}
|
||||
virtual string dotStyle() const {
|
||||
virtual string dotStyle() const override {
|
||||
return ignoreThisStep() ? "dotted" : V3GraphEdge::dotStyle();
|
||||
}
|
||||
};
|
||||
@ -188,36 +190,36 @@ class SplitPostEdge : public SplitEdge {
|
||||
public:
|
||||
SplitPostEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
virtual ~SplitPostEdge() {}
|
||||
virtual bool followScoreboard() const { return false; }
|
||||
virtual string dotColor() const { return "khaki"; }
|
||||
virtual ~SplitPostEdge() override {}
|
||||
virtual bool followScoreboard() const override { return false; }
|
||||
virtual string dotColor() const override { return "khaki"; }
|
||||
};
|
||||
|
||||
class SplitLVEdge : public SplitEdge {
|
||||
public:
|
||||
SplitLVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
virtual ~SplitLVEdge() {}
|
||||
virtual bool followScoreboard() const { return true; }
|
||||
virtual string dotColor() const { return "yellowGreen"; }
|
||||
virtual ~SplitLVEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "yellowGreen"; }
|
||||
};
|
||||
|
||||
class SplitRVEdge : public SplitEdge {
|
||||
public:
|
||||
SplitRVEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
virtual ~SplitRVEdge() {}
|
||||
virtual bool followScoreboard() const { return true; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
virtual ~SplitRVEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
};
|
||||
|
||||
struct SplitScorebdEdge : public SplitEdge {
|
||||
public:
|
||||
SplitScorebdEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL) {}
|
||||
virtual ~SplitScorebdEdge() {}
|
||||
virtual bool followScoreboard() const { return true; }
|
||||
virtual string dotColor() const { return "blue"; }
|
||||
virtual ~SplitScorebdEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
};
|
||||
|
||||
struct SplitStrictEdge : public SplitEdge {
|
||||
@ -226,9 +228,9 @@ struct SplitStrictEdge : public SplitEdge {
|
||||
public:
|
||||
SplitStrictEdge(V3Graph* graphp, V3GraphVertex* fromp, V3GraphVertex* top)
|
||||
: SplitEdge(graphp, fromp, top, WEIGHT_NORMAL, NOT_CUTABLE) {}
|
||||
virtual ~SplitStrictEdge() {}
|
||||
virtual bool followScoreboard() const { return true; }
|
||||
virtual string dotColor() const { return "blue"; }
|
||||
virtual ~SplitStrictEdge() override {}
|
||||
virtual bool followScoreboard() const override { return true; }
|
||||
virtual string dotColor() const override { return "blue"; }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -261,7 +263,7 @@ protected:
|
||||
// CONSTRUCTORS
|
||||
public:
|
||||
SplitReorderBaseVisitor() { scoreboardClear(); }
|
||||
virtual ~SplitReorderBaseVisitor() {
|
||||
virtual ~SplitReorderBaseVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Split always", m_statSplits);
|
||||
}
|
||||
|
||||
@ -444,7 +446,7 @@ class ReorderVisitor : public SplitReorderBaseVisitor {
|
||||
// CONSTRUCTORS
|
||||
public:
|
||||
explicit ReorderVisitor(AstNetlist* nodep) { iterate(nodep); }
|
||||
virtual ~ReorderVisitor() {}
|
||||
virtual ~ReorderVisitor() override {}
|
||||
|
||||
// METHODS
|
||||
protected:
|
||||
@ -641,7 +643,7 @@ public:
|
||||
// Visit through *nodep and map each AstNodeIf within to the set of
|
||||
// colors it will participate in. Also find the whole set of colors.
|
||||
explicit IfColorVisitor(AstAlways* nodep) { iterate(nodep); }
|
||||
virtual ~IfColorVisitor() {}
|
||||
virtual ~IfColorVisitor() override {}
|
||||
|
||||
// METHODS
|
||||
const ColorSet& colors() const { return m_colors; }
|
||||
@ -706,7 +708,7 @@ public:
|
||||
UINFO(6, " splitting always " << nodep << endl);
|
||||
}
|
||||
|
||||
virtual ~EmitSplitVisitor() {}
|
||||
virtual ~EmitSplitVisitor() override {}
|
||||
|
||||
// METHODS
|
||||
void go() {
|
||||
@ -812,7 +814,7 @@ public:
|
||||
VL_DO_DANGLING(np->deleteTree(), np);
|
||||
}
|
||||
}
|
||||
virtual ~RemovePlaceholdersVisitor() {}
|
||||
virtual ~RemovePlaceholdersVisitor() override {}
|
||||
virtual void visit(AstSplitPlaceholder* nodep) override { m_removeSet.insert(nodep); }
|
||||
virtual void visit(AstNode* nodep) override { iterateChildren(nodep); }
|
||||
|
||||
@ -853,7 +855,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~SplitVisitor() {}
|
||||
virtual ~SplitVisitor() override {}
|
||||
|
||||
// METHODS
|
||||
protected:
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
m_splitVscp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SplitAsFindVisitor() {}
|
||||
virtual ~SplitAsFindVisitor() override {}
|
||||
// METHODS
|
||||
AstVarScope* splitVscp() const { return m_splitVscp; }
|
||||
};
|
||||
@ -123,7 +123,7 @@ public:
|
||||
m_matches = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SplitAsCleanVisitor() {}
|
||||
virtual ~SplitAsCleanVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -193,7 +193,7 @@ public:
|
||||
AstNode::user1ClearTree(); // user1p() used on entire tree
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SplitAsVisitor() {
|
||||
virtual ~SplitAsVisitor() override {
|
||||
V3Stats::addStat("Optimizations, isolate_assignments blocks", m_statSplits);
|
||||
}
|
||||
};
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
// Process
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~StatsVisitor() {
|
||||
virtual ~StatsVisitor() override {
|
||||
// Done. Publish statistics
|
||||
V3Stats::addStat(m_stage, "Instruction count, TOTAL", m_statInstr);
|
||||
V3Stats::addStat(m_stage, "Instruction count, fast critical", m_statInstrFast);
|
||||
|
@ -216,7 +216,7 @@ public:
|
||||
m_origStep = origStep;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SubstUseVisitor() {}
|
||||
virtual ~SubstUseVisitor() override {}
|
||||
// METHODS
|
||||
bool ok() const { return m_ok; }
|
||||
};
|
||||
@ -375,7 +375,7 @@ public:
|
||||
m_assignStep = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~SubstVisitor() {
|
||||
virtual ~SubstVisitor() override {
|
||||
V3Stats::addStat("Optimizations, Substituted temps", m_statSubsts);
|
||||
for (std::vector<SubstVarEntry*>::iterator it = m_entryps.begin(); it != m_entryps.end();
|
||||
++it) {
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
TspVertexTmpl(V3Graph* graphp, const T_Key& k)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_key(k) {}
|
||||
virtual ~TspVertexTmpl() {}
|
||||
virtual ~TspVertexTmpl() override {}
|
||||
const T_Key& key() const { return m_key; }
|
||||
|
||||
private:
|
||||
@ -80,7 +80,7 @@ public:
|
||||
// CONSTRUCTORS
|
||||
TspGraphTmpl()
|
||||
: V3Graph() {}
|
||||
virtual ~TspGraphTmpl() {}
|
||||
virtual ~TspGraphTmpl() override {}
|
||||
|
||||
// METHODS
|
||||
void addVertex(const T_Key& key) {
|
||||
@ -507,7 +507,7 @@ public:
|
||||
, m_ypos(ypos)
|
||||
, m_serial(++m_serialNext) {}
|
||||
~TspTestState() {}
|
||||
virtual int cost(const TspStateBase* otherp) const {
|
||||
virtual int cost(const TspStateBase* otherp) const override {
|
||||
return cost(dynamic_cast<const TspTestState*>(otherp));
|
||||
}
|
||||
static unsigned diff(unsigned a, unsigned b) {
|
||||
@ -527,7 +527,7 @@ public:
|
||||
unsigned xpos() const { return m_xpos; }
|
||||
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));
|
||||
}
|
||||
bool operator<(const TspTestState& other) const { return m_serial < other.m_serial; }
|
||||
|
@ -54,11 +54,11 @@ class TableSimulateVisitor : public SimulateVisitor {
|
||||
|
||||
public:
|
||||
///< Call other-this function on all new var references
|
||||
virtual void varRefCb(AstVarRef* nodep);
|
||||
virtual void varRefCb(AstVarRef* nodep) override;
|
||||
|
||||
// CONSTRUCTORS
|
||||
explicit TableSimulateVisitor(TableVisitor* cbthis) { m_cbthis = cbthis; }
|
||||
virtual ~TableSimulateVisitor() {}
|
||||
virtual ~TableSimulateVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -461,7 +461,7 @@ public:
|
||||
m_totalBytes = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TableVisitor() { //
|
||||
virtual ~TableVisitor() override { //
|
||||
V3Stats::addStat("Optimizations, Tables created", m_statTablesCre);
|
||||
}
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
: V3GraphVertex(graphp)
|
||||
, m_impurep(nullptr)
|
||||
, m_noInline(false) {}
|
||||
virtual ~TaskBaseVertex() {}
|
||||
virtual ~TaskBaseVertex() override {}
|
||||
bool pure() const { return m_impurep == nullptr; }
|
||||
AstNode* impureNode() const { return m_impurep; }
|
||||
void impure(AstNode* nodep) { m_impurep = nodep; }
|
||||
@ -66,11 +66,11 @@ public:
|
||||
, m_nodep(nodep) {
|
||||
m_cFuncp = nullptr;
|
||||
}
|
||||
virtual ~TaskFTaskVertex() {}
|
||||
virtual ~TaskFTaskVertex() override {}
|
||||
AstNodeFTask* nodep() const { return m_nodep; }
|
||||
virtual string name() const { return nodep()->name(); }
|
||||
virtual string dotColor() const { return pure() ? "black" : "red"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override { return nodep()->name(); }
|
||||
virtual string dotColor() const override { return pure() ? "black" : "red"; }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
AstCFunc* cFuncp() const { return m_cFuncp; }
|
||||
void cFuncp(AstCFunc* nodep) { m_cFuncp = nodep; }
|
||||
};
|
||||
@ -80,17 +80,17 @@ class TaskCodeVertex : public TaskBaseVertex {
|
||||
public:
|
||||
explicit TaskCodeVertex(V3Graph* graphp)
|
||||
: TaskBaseVertex(graphp) {}
|
||||
virtual ~TaskCodeVertex() {}
|
||||
virtual string name() const { return "*CODE*"; }
|
||||
virtual string dotColor() const { return "green"; }
|
||||
virtual ~TaskCodeVertex() override {}
|
||||
virtual string name() const override { return "*CODE*"; }
|
||||
virtual string dotColor() const override { return "green"; }
|
||||
};
|
||||
|
||||
class TaskEdge : public V3GraphEdge {
|
||||
public:
|
||||
TaskEdge(V3Graph* graphp, TaskBaseVertex* fromp, TaskBaseVertex* top)
|
||||
: V3GraphEdge(graphp, fromp, top, 1, false) {}
|
||||
virtual ~TaskEdge() {}
|
||||
virtual string dotLabel() const { return "w" + cvtToStr(weight()); }
|
||||
virtual ~TaskEdge() override {}
|
||||
virtual string dotLabel() const override { return "w" + cvtToStr(weight()); }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -273,7 +273,7 @@ public:
|
||||
m_callGraph.removeRedundantEdgesSum(&TaskEdge::followAlwaysTrue);
|
||||
m_callGraph.dumpDotFilePrefixed("task_call");
|
||||
}
|
||||
virtual ~TaskStateVisitor() {}
|
||||
virtual ~TaskStateVisitor() override {}
|
||||
VL_UNCOPYABLE(TaskStateVisitor);
|
||||
};
|
||||
|
||||
@ -309,7 +309,7 @@ public:
|
||||
explicit TaskRelinkVisitor(AstBegin* nodep) { // Passed temporary tree
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TaskRelinkVisitor() {}
|
||||
virtual ~TaskRelinkVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -1367,7 +1367,7 @@ public:
|
||||
AstNode::user1ClearTree();
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TaskVisitor() {}
|
||||
virtual ~TaskVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -71,20 +71,20 @@ public:
|
||||
m_activityCode = code;
|
||||
m_slow = false;
|
||||
}
|
||||
virtual ~TraceActivityVertex() {}
|
||||
virtual ~TraceActivityVertex() override {}
|
||||
// ACCESSORS
|
||||
AstNode* insertp() const {
|
||||
if (!m_insertp) v3fatalSrc("Null insertp; probably called on a special always/slow.");
|
||||
return m_insertp;
|
||||
}
|
||||
virtual string name() const {
|
||||
virtual string name() const override {
|
||||
if (activityAlways()) {
|
||||
return "*ALWAYS*";
|
||||
} else {
|
||||
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; }
|
||||
bool activityAlways() const { return activityCode() == ACTIVITY_ALWAYS; }
|
||||
bool activitySlow() const { return activityCode() == ACTIVITY_SLOW; }
|
||||
@ -102,12 +102,12 @@ public:
|
||||
TraceCFuncVertex(V3Graph* graphp, AstCFunc* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
virtual ~TraceCFuncVertex() {}
|
||||
virtual ~TraceCFuncVertex() override {}
|
||||
// ACCESSORS
|
||||
AstCFunc* nodep() const { return m_nodep; }
|
||||
virtual string name() const { return nodep()->name(); }
|
||||
virtual string dotColor() const { return "yellow"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override { return nodep()->name(); }
|
||||
virtual string dotColor() const override { return "yellow"; }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
};
|
||||
|
||||
class TraceTraceVertex : public V3GraphVertex {
|
||||
@ -120,12 +120,12 @@ public:
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep)
|
||||
, m_duplicatep(nullptr) {}
|
||||
virtual ~TraceTraceVertex() {}
|
||||
virtual ~TraceTraceVertex() override {}
|
||||
// ACCESSORS
|
||||
AstTraceDecl* nodep() const { return m_nodep; }
|
||||
virtual string name() const { return nodep()->name(); }
|
||||
virtual string dotColor() const { return "red"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override { return nodep()->name(); }
|
||||
virtual string dotColor() const override { return "red"; }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
TraceTraceVertex* duplicatep() const { return m_duplicatep; }
|
||||
void duplicatep(TraceTraceVertex* dupp) {
|
||||
UASSERT_OBJ(!duplicatep(), nodep(), "Assigning duplicatep() to already duplicated node");
|
||||
@ -140,12 +140,12 @@ public:
|
||||
TraceVarVertex(V3Graph* graphp, AstVarScope* nodep)
|
||||
: V3GraphVertex(graphp)
|
||||
, m_nodep(nodep) {}
|
||||
virtual ~TraceVarVertex() {}
|
||||
virtual ~TraceVarVertex() override {}
|
||||
// ACCESSORS
|
||||
AstVarScope* nodep() const { return m_nodep; }
|
||||
virtual string name() const { return nodep()->name(); }
|
||||
virtual string dotColor() const { return "skyblue"; }
|
||||
virtual FileLine* fileline() const { return nodep()->fileline(); }
|
||||
virtual string name() const override { return nodep()->name(); }
|
||||
virtual string dotColor() const override { return "skyblue"; }
|
||||
virtual FileLine* fileline() const override { return nodep()->fileline(); }
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -885,7 +885,7 @@ public:
|
||||
m_code = 0;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TraceVisitor() {
|
||||
virtual ~TraceVisitor() override {
|
||||
V3Stats::addStat("Tracing, Unique changing signals", m_statChgSigs);
|
||||
V3Stats::addStat("Tracing, Unique traced signals", m_statUniqSigs);
|
||||
V3Stats::addStat("Tracing, Unique trace codes", m_statUniqCodes);
|
||||
|
@ -349,7 +349,7 @@ public:
|
||||
m_interface = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TraceDeclVisitor() {
|
||||
virtual ~TraceDeclVisitor() override {
|
||||
V3Stats::addStat("Tracing, Traced signals", m_statSigs);
|
||||
V3Stats::addStat("Tracing, Ignored signals", m_statIgnSigs);
|
||||
}
|
||||
|
@ -90,19 +90,19 @@ public:
|
||||
, m_isTristate(false)
|
||||
, m_feedsTri(false)
|
||||
, m_processed(false) {}
|
||||
virtual ~TristateVertex() {}
|
||||
virtual ~TristateVertex() override {}
|
||||
// ACCESSORS
|
||||
AstNode* nodep() const { return m_nodep; }
|
||||
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")
|
||||
+ (nodep()->prettyTypeName() + " " + cvtToHex(nodep())));
|
||||
}
|
||||
virtual string dotColor() const {
|
||||
virtual string dotColor() const override {
|
||||
return (varp() ? (isTristate() ? "darkblue" : feedsTri() ? "blue" : "lightblue")
|
||||
: (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; }
|
||||
bool isTristate() const { return m_isTristate; }
|
||||
void feedsTri(bool flag) { m_feedsTri = flag; }
|
||||
@ -309,7 +309,7 @@ public:
|
||||
, m_lvalue(lvalue) {
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TristatePinVisitor() {}
|
||||
virtual ~TristatePinVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -1357,7 +1357,7 @@ public:
|
||||
m_tgraph.clear();
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~TristateVisitor() {
|
||||
virtual ~TristateVisitor() override {
|
||||
V3Stats::addStat("Tristate, Tristate resolved nets", m_statTriSigs);
|
||||
}
|
||||
};
|
||||
|
@ -447,7 +447,7 @@ public:
|
||||
m_alwaysCombp = nullptr;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~UndrivenVisitor() {
|
||||
virtual ~UndrivenVisitor() override {
|
||||
for (std::vector<UndrivenVarEntry*>::iterator it = m_entryps[1].begin();
|
||||
it != m_entryps[1].end(); ++it) {
|
||||
(*it)->reportViolations();
|
||||
|
@ -435,7 +435,7 @@ public:
|
||||
m_constXCvt = false;
|
||||
iterate(nodep);
|
||||
}
|
||||
virtual ~UnknownVisitor() { //
|
||||
virtual ~UnknownVisitor() override { //
|
||||
V3Stats::addStat("Unknowns, variables created", m_statUnkVars);
|
||||
}
|
||||
};
|
||||
|
@ -471,7 +471,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
UnrollVisitor() { init(false, ""); }
|
||||
virtual ~UnrollVisitor() {
|
||||
virtual ~UnrollVisitor() override {
|
||||
V3Stats::addStatSum("Optimizations, Unrolled Loops", m_statLoops);
|
||||
V3Stats::addStatSum("Optimizations, Unrolled Iterations", m_statIters);
|
||||
}
|
||||
|
@ -5419,7 +5419,7 @@ public:
|
||||
AstNode* mainAcceptEdit(AstNode* nodep) {
|
||||
return userIterateSubtreeReturnEdits(nodep, WidthVP(SELF, BOTH).p());
|
||||
}
|
||||
virtual ~WidthVisitor() {}
|
||||
virtual ~WidthVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -56,7 +56,7 @@ private:
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
WidthRemoveVisitor() {}
|
||||
virtual ~WidthRemoveVisitor() {}
|
||||
virtual ~WidthRemoveVisitor() override {}
|
||||
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
|
||||
// a repair would prevent dead nodes from being detected
|
||||
}
|
||||
virtual ~WidthCommitVisitor() {}
|
||||
virtual ~WidthCommitVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
@ -571,7 +571,7 @@ public:
|
||||
// CONSTRUCTORS
|
||||
WidthSelVisitor() {}
|
||||
AstNode* mainAcceptEdit(AstNode* nodep) { return iterateSubtreeReturnEdits(nodep); }
|
||||
virtual ~WidthSelVisitor() {}
|
||||
virtual ~WidthSelVisitor() override {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user