Internals: Create if statements for triggers during scheduling (#6280) (#6581)

The AstIf nodes conditional on events being triggered used to be created
in V3Clock. Now it is in V3Sched*, in order to avoid having to pass
AstActive in CFunc or MTask bodies. No functional change intended, some
improved optimization due to simplifying timing triggers that were
previously missed, also fixes what seems like a bug in the original
timing commit code.
This commit is contained in:
Geza Lore
2025-10-27 10:41:30 +00:00
committed by GitHub
parent 6ec5c85bea
commit 60c532908e
10 changed files with 100 additions and 133 deletions
+3 -3
View File
@@ -2395,8 +2395,8 @@ struct MTaskVxIdLessThan final {
}
};
AstExecGraph* V3Order::createParallel(OrderGraph& orderGraph, const std::string& tag,
const TrigToSenMap& trigToSen, bool slow) {
AstNodeStmt* V3Order::createParallel(OrderGraph& orderGraph, const std::string& tag,
const TrigToSenMap& trigToSen, bool slow) {
UINFO(2, " Constructing parallel code for '" + tag + "'");
// For nondeterminism debug:
@@ -2481,7 +2481,7 @@ AstExecGraph* V3Order::createParallel(OrderGraph& orderGraph, const std::string&
// Construct the actual MTaskBody
AstMTaskBody* const bodyp = new AstMTaskBody{rootFlp};
execGraphp->addMTaskBodiesp(bodyp);
for (AstActive* const activep : emitter.getAndClearActiveps()) bodyp->addStmtsp(activep);
bodyp->addStmtsp(emitter.getStmts());
UASSERT_OBJ(bodyp->stmtsp(), bodyp, "Should not try to create empty MTask");
// Create the ExecMTask