Apply 'make format'

This commit is contained in:
github action 2025-12-24 13:08:12 +00:00
parent e3f7d0fb1a
commit fdeccdc45e
5 changed files with 16 additions and 20 deletions

View File

@ -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<const AstNode*>(entryp->getNodep()) :
entryp->callNodep();
= entryp->getNodep() ? static_cast<const AstNode*>(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);
}

View File

@ -149,7 +149,8 @@ const std::vector<AstVar*>& 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<AstVar*> 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];
}

View File

@ -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<const AstNodeFTask*> 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<AstVar*> directWritesSet;
};

0
test_regress/t/t_multidriven_class.py Normal file → Executable file
View File

0
test_regress/t/t_multidriven_iface.py Normal file → Executable file
View File