From 19875d2e85bb6e840515fd0404633da93baf96a1 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 23 Jul 2021 19:24:25 -0400 Subject: [PATCH] Increase split count of ChangeDet (#3072). --- src/V3Changed.cpp | 5 ++++- src/V3EmitCBase.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/V3Changed.cpp b/src/V3Changed.cpp index dc3343f87..589a681ac 100644 --- a/src/V3Changed.cpp +++ b/src/V3Changed.cpp @@ -151,8 +151,11 @@ private: AstAssign* const initp = new AstAssign{m_vscp->fileline(), m_newLvEqnp->cloneTree(true), m_varEqnp->cloneTree(true)}; m_statep->m_chgFuncp->addFinalsp(initp); + + // Later code will expand words which adds to GCC compile time, + // so add penalty based on word width also EmitCBaseCounterVisitor visitor{initp}; - m_statep->m_numStmts += visitor.count(); + m_statep->m_numStmts += visitor.count() + m_varEqnp->widthWords(); } virtual void visit(AstBasicDType*) override { // diff --git a/src/V3EmitCBase.h b/src/V3EmitCBase.h index 0b34a525e..dcebb4484 100644 --- a/src/V3EmitCBase.h +++ b/src/V3EmitCBase.h @@ -122,7 +122,7 @@ private: int m_count = 0; // Number of statements // VISITORS virtual void visit(AstNode* nodep) override { - m_count++; + ++m_count; iterateChildren(nodep); }