Internals: Add VNVisitorConst class.

This commit is contained in:
Wilson Snyder
2023-03-17 19:59:09 -04:00
parent 371b8310d9
commit d6c5d40f9b
14 changed files with 83 additions and 62 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ VL_DEFINE_DEBUG_FUNCTIONS;
//######################################################################
// Stats class functions
class StatsVisitor final : public VNVisitor {
class StatsVisitor final : public VNVisitorConst {
private:
// NODE STATE/TYPES
@@ -175,7 +175,7 @@ private:
if (m_fast && !nodep->funcp()->entryPoint()) {
// Enter the function and trace it
m_tracingCall = true;
iterate(nodep->funcp());
iterateConst(nodep->funcp());
}
}
void visit(AstCFunc* nodep) override {
@@ -218,7 +218,7 @@ public:
// Initialize arrays
m_statTypeCount.resize(VNType::_ENUM_END);
// Process
iterate(nodep);
iterateConst(nodep);
}
~StatsVisitor() override {
// Done. Publish statistics