Fix `co_await VlNow{}` being added too many times (#3596)
(or not at all) Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
This commit is contained in:
parent
da7ad35577
commit
8b19d02e3b
|
|
@ -264,7 +264,7 @@ void transformForks(AstNetlist* const netlistp) {
|
||||||
// We can just pass it to the new function
|
// We can just pass it to the new function
|
||||||
} else if (m_forkp->joinType().join()) {
|
} else if (m_forkp->joinType().join()) {
|
||||||
// If it's fork..join, we can refer to variables from the parent process
|
// If it's fork..join, we can refer to variables from the parent process
|
||||||
if (m_funcp->user1SetOnce()) { // Only do this once per function
|
if (!m_funcp->user1SetOnce()) { // Only do this once per function
|
||||||
// Move all locals to the heap before the fork
|
// Move all locals to the heap before the fork
|
||||||
auto* const awaitp = new AstCAwait{
|
auto* const awaitp = new AstCAwait{
|
||||||
m_forkp->fileline(), new AstCStmt{m_forkp->fileline(), "VlNow{}"}};
|
m_forkp->fileline(), new AstCStmt{m_forkp->fileline(), "VlNow{}"}};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue