mirror of
https://github.com/verilator/verilator.git
synced 2026-10-02 16:13:34 +02:00
Optimize sched-initial/static/final: call splitCheck once per sub-function (#8549)
Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
+10
-1
@@ -309,7 +309,8 @@ void orderSequentially(AstCFunc* funcp, const LogicByScope& lbs) {
|
||||
}
|
||||
subFuncp->addStmtsp(bodyp);
|
||||
if (procp->needProcess()) subFuncp->setNeedProcess();
|
||||
util::splitCheck(subFuncp);
|
||||
// A coroutine holds a single process, so it is complete here
|
||||
if (procp->isSuspendable()) util::splitCheck(subFuncp);
|
||||
}
|
||||
} else {
|
||||
logicp->unlinkFrBack();
|
||||
@@ -319,6 +320,14 @@ void orderSequentially(AstCFunc* funcp, const LogicByScope& lbs) {
|
||||
if (activep->backp()) activep->unlinkFrBack();
|
||||
VL_DO_DANGLING(activep->deleteTree(), activep);
|
||||
}
|
||||
// Split sub-functions once complete
|
||||
for (const auto& pair : lbs) {
|
||||
AstScope* const scopep = pair.first;
|
||||
if (AstCFunc* const subFuncp = VN_AS(scopep->user1p(), CFunc)) {
|
||||
util::splitCheck(subFuncp);
|
||||
scopep->user1p(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
Reference in New Issue
Block a user