Optimize modport resolution with many interface instances (#8496) (#8497)

This commit is contained in:
Deanyone Su
2026-09-25 14:38:18 -04:00
committed by GitHub
parent 3a76b29cb3
commit 8b663f9c84
4 changed files with 66 additions and 0 deletions
+6
View File
@@ -3130,6 +3130,10 @@ class LinkDotIfaceVisitor final : public VNVisitor {
nodep->v3error("Modport item is not a clocking block: " << nodep->prettyNameQ());
}
}
void visit(AstScope* nodep) override { // IfaceVisitor::
if (nodep->user3SetOnce()) return;
iterateChildren(nodep);
}
void visit(AstNode* nodep) override { iterateChildren(nodep); } // IfaceVisitor::
public:
@@ -3144,6 +3148,8 @@ public:
};
void LinkDotState::computeIfaceModSyms() {
// AstScope::user3() // bool. Already iterated by a LinkDotIfaceVisitor
const VNUser3InUse user3InUse;
for (const auto& itr : m_ifaceModSyms) {
AstIface* const nodep = itr.first;
VSymEnt* const symp = itr.second;