From 5070362f4bacc3d2d5fa6ae44283f3016e21a604 Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Tue, 10 Oct 2023 13:06:52 +0200 Subject: [PATCH] Clear the map at the end of V3Const Signed-off-by: Ryszard Rozak --- src/V3Const.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3Const.cpp b/src/V3Const.cpp index 6a37d5c505..7e37ce789b 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -3765,6 +3765,7 @@ class ConstVisitor final : public VNVisitor { // clang-format on } ~ConstVisitor() override { + V3Const::s_containsMemberAccess.clear(); if (m_doCpp) { if (m_globalPass) { V3Stats::addStat("Optimizations, Const bit op reduction", m_statBitOpReduction); @@ -3776,7 +3777,6 @@ class ConstVisitor final : public VNVisitor { AstNode* mainAcceptEdit(AstNode* nodep) { VIsCached::clearCacheTree(); // Avoid using any stale isPure - V3Const::s_containsMemberAccess.clear(); // Operate starting at a random place return iterateSubtreeReturnEdits(nodep); }