diff --git a/src/V3Hasher.cpp b/src/V3Hasher.cpp index 2ecfaaa69..9169d06bd 100644 --- a/src/V3Hasher.cpp +++ b/src/V3Hasher.cpp @@ -174,6 +174,9 @@ private: iterateConstNull(nodep->refDTypep()); }); } + void visit(AstStreamDType* nodep) override { + m_hash += hashNodeAndIterate(nodep, false, HASH_CHILDREN, [=]() {}); + } void visit(AstVoidDType* nodep) override { m_hash += hashNodeAndIterate(nodep, false, HASH_CHILDREN, [=]() {}); } @@ -269,6 +272,9 @@ private: iterateConstNull(nodep->sensesp()); }); } + void visit(AstCLocalScope* nodep) override { + m_hash += hashNodeAndIterate(nodep, HASH_DTYPE, HASH_CHILDREN, [=]() {}); + } void visit(AstCoverInc* nodep) override { m_hash += hashNodeAndIterate(nodep, false, HASH_CHILDREN, [=]() { // iterateConstNull(nodep->declp()); diff --git a/src/V3Simulate.h b/src/V3Simulate.h index e73f111f7..a3f1be13a 100644 --- a/src/V3Simulate.h +++ b/src/V3Simulate.h @@ -355,6 +355,13 @@ private: if (nodep->isOutputter()) m_isOutputter = true; } + void knownBadNodeType(AstNode* nodep) { + // Call for node types we know we can't handle + checkNodeInfo(nodep); + if (optimizable()) { + clearOptimizable(nodep, std::string{"Known unhandled node type "} + nodep->typeName()); + } + } void badNodeType(AstNode* nodep) { // Call for default node types, or other node types we don't know how to handle checkNodeInfo(nodep); @@ -1163,6 +1170,20 @@ private: } } + // ==== + // Known Bad + void visit(AstCMethodHard* nodep) override { + // Some CMethods such as size() on queues could be supported, but + // instead we should change those methods to new Ast types so we can + // properly dispatch them + if (jumpingOver(nodep)) return; + knownBadNodeType(nodep); + } + void visit(AstMemberSel* nodep) override { + if (jumpingOver(nodep)) return; + knownBadNodeType(nodep); + } + // ==== // default // These types are definitely not reducible // AstCoverInc, AstFinish,