mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 18:13:50 +02:00
Optimize conditional merging across some impure statements (#7159)
- Allow reordering pure statements with DPI import calls iff no public variables (including those read via a DPI export) are involved. This ensures the DPI import can't observe the reordering - Allow reordering of pure statements with AstDisplay and AstStop. This requires an assumption that AstDisplay and AstStop will not read or write model state other than via a VarRef explicitly present int the Ast. Overall this allows eliminating a lot of conditionals around assertions, which were previously not possible.
This commit is contained in:
+2
-1
@@ -765,7 +765,8 @@ class TaskVisitor final : public VNVisitor {
|
||||
// __Vscopep
|
||||
ccallp->addArgsp(snp);
|
||||
// __Vfilenamep
|
||||
ccallp->addArgsp(new AstCExpr{flp, "\"" + flp->filenameEsc() + "\"", 64});
|
||||
ccallp->addArgsp(
|
||||
new AstCExpr{flp, AstCExpr::Pure{}, "\"" + flp->filenameEsc() + "\"", 64});
|
||||
// __Vlineno
|
||||
ccallp->addArgsp(new AstConst(flp, flp->lineno()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user