From fdeccdc45e43513caecd9c983dd5dfc68dd1fc00 Mon Sep 17 00:00:00 2001 From: github action Date: Wed, 24 Dec 2025 13:08:12 +0000 Subject: [PATCH] Apply 'make format' --- src/V3Undriven.cpp | 15 ++++++--------- src/V3UndrivenCapture.cpp | 17 ++++++++--------- src/V3UndrivenCapture.h | 4 ++-- test_regress/t/t_multidriven_class.py | 0 test_regress/t/t_multidriven_iface.py | 0 5 files changed, 16 insertions(+), 20 deletions(-) mode change 100644 => 100755 test_regress/t/t_multidriven_class.py mode change 100644 => 100755 test_regress/t/t_multidriven_iface.py diff --git a/src/V3Undriven.cpp b/src/V3Undriven.cpp index 0dfd6c353..e3e986e8b 100644 --- a/src/V3Undriven.cpp +++ b/src/V3Undriven.cpp @@ -436,8 +436,8 @@ class UndrivenVisitor final : public VNVisitorConst { // If writeSummary is enabled, task/function definitions are treated as non-executed. // Their effects are applied at call sites via writeSummary(), so don't let definition // traversal create phantom "other writes" for MULTIDRIVEN. - if (m_taskp && !m_alwaysp && !m_inContAssign && !m_inInitialStatic - && !m_inBBox && !m_taskp->dpiExport()) { + if (m_taskp && !m_alwaysp && !m_inContAssign && !m_inInitialStatic && !m_inBBox + && !m_taskp->dpiExport()) { AstVar* const retVarp = VN_CAST(m_taskp->fvarp(), Var); if (!retVarp || nodep->varp() != retVarp) return; } @@ -454,13 +454,11 @@ class UndrivenVisitor final : public VNVisitorConst { if (entryp->isDrivenWhole() && !m_inBBox && !VN_IS(nodep, VarXRef) && !VN_IS(nodep->dtypep()->skipRefp(), UnpackArrayDType) && nodep->fileline() != entryp->getNodeFileLinep() && !entryp->isUnderGen() - && (entryp->getNodep() || - entryp->callNodep())) { + && (entryp->getNodep() || entryp->callNodep())) { const AstNode* const otherWritep - = entryp->getNodep() ? - static_cast(entryp->getNodep()) : - entryp->callNodep(); + = entryp->getNodep() ? static_cast(entryp->getNodep()) + : entryp->callNodep(); if (m_alwaysCombp && (!entryp->isDrivenAlwaysCombWhole() @@ -613,8 +611,7 @@ class UndrivenVisitor final : public VNVisitorConst { public: // CONSTRUCTORS explicit UndrivenVisitor(AstNetlist* nodep, V3UndrivenCapture* capturep) - : m_capturep{capturep} - { + : m_capturep{capturep} { iterateConst(nodep); } diff --git a/src/V3UndrivenCapture.cpp b/src/V3UndrivenCapture.cpp index 991175121..4aa1ff06a 100644 --- a/src/V3UndrivenCapture.cpp +++ b/src/V3UndrivenCapture.cpp @@ -149,7 +149,8 @@ const std::vector& V3UndrivenCapture::computeWriteSummary(const AstNode info.writeSummary.clear(); - // Prevent duplicates across all sources that can contribute to a write summary (direct writes and call chains) + // Prevent duplicates across all sources that can contribute to a write summary (direct writes + // and call chains) std::unordered_set seen; // Simple lambda for filtering duplicates @@ -185,18 +186,16 @@ void V3UndrivenCapture::noteDirectWrite(const AstNodeFTask* taskp, AstVar* varp) if (retVarp && varp == retVarp) return; // Filter out duplicates. - if (info.directWritesSet.insert(varp).second) { - info.directWrites.push_back(varp); - } + if (info.directWritesSet.insert(varp).second) { info.directWrites.push_back(varp); } } void V3UndrivenCapture::noteCallEdge(const AstNodeFTask* callerp, const AstNodeFTask* calleep) { FTaskInfo& callerInfo = m_info[callerp]; - // Prevents duplicate entries from being appended, if calleep already exists then insert will return false, and then is not inserted into the callees vector. - if (callerInfo.calleesSet.insert(calleep).second) { - callerInfo.callees.push_back(calleep); - } - // Ensure callee entry exists, if already exists then this is a no-op. unordered_map<> so cheap. + // Prevents duplicate entries from being appended, if calleep already exists then insert will + // return false, and then is not inserted into the callees vector. + if (callerInfo.calleesSet.insert(calleep).second) { callerInfo.callees.push_back(calleep); } + // Ensure callee entry exists, if already exists then this is a no-op. unordered_map<> so + // cheap. (void)m_info[calleep]; } diff --git a/src/V3UndrivenCapture.h b/src/V3UndrivenCapture.h index 573ab4f70..526e6843c 100644 --- a/src/V3UndrivenCapture.h +++ b/src/V3UndrivenCapture.h @@ -59,8 +59,8 @@ public: // This is used to test whether weve already recorded a callee. Used to 'filter' on insert // versus sorting at the end. std::unordered_set calleesSet; - // This is used to test whether weve already recorded a direct write. Used to 'filter' on insert - // versus sorting at the end. + // This is used to test whether weve already recorded a direct write. Used to 'filter' on + // insert versus sorting at the end. std::unordered_set directWritesSet; }; diff --git a/test_regress/t/t_multidriven_class.py b/test_regress/t/t_multidriven_class.py old mode 100644 new mode 100755 diff --git a/test_regress/t/t_multidriven_iface.py b/test_regress/t/t_multidriven_iface.py old mode 100644 new mode 100755