Fix signals read via virtual iface optimized out (#4645)

Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
Krzysztof Bieganski
2023-10-30 21:26:46 -04:00
committed by GitHub
parent c1c8b30a35
commit f789d28277
3 changed files with 68 additions and 0 deletions
+5
View File
@@ -372,6 +372,11 @@ private:
UINFO(6, "New vertex " << varscp << endl);
vertexp = new GateVarVertex{&m_graph, m_scopep, varscp};
varscp->user1p(vertexp);
if (varscp->varp()->isUsedVirtIface()) {
// Can be used in a class method, which cannot be tracked statically
vertexp->clearReducibleAndDedupable("VirtIface");
vertexp->setConsumed("VirtIface");
}
if (varscp->varp()->isSigPublic()) {
// Public signals shouldn't be changed, pli code might be messing with them
vertexp->clearReducibleAndDedupable("SigPublic");