mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Improve V3LifePost to not require AstAssignPre/AssignPost (#6306)
Rewrote V3LifePost to not depend on having AstAssignPre and AstAssignPost types, but work with generic AstNodeAssign. There is an extra flag in AstVarScope to denote it's part of an NBA and should be considered. Step towards #6280.
This commit is contained in:
@@ -585,6 +585,9 @@ class DelayedVisitor final : public VNVisitor {
|
||||
const std::string name = "__Vdly__" + vscp->varp()->shortName();
|
||||
AstVarScope* const shadowVscp = createTemp(flp, scopep, name, vscp->dtypep());
|
||||
vscpInfo.shadowVariableKit().vscp = shadowVscp;
|
||||
// Mark both for V3LifePsot
|
||||
vscp->optimizeLifePost(true);
|
||||
shadowVscp->optimizeLifePost(true);
|
||||
// Create the AstActive for the Pre/Post logic
|
||||
AstActive* const activep = new AstActive{flp, "nba-shadow-variable", vscpInfo.senTreep()};
|
||||
activep->senTreeStorep(vscpInfo.senTreep());
|
||||
|
||||
Reference in New Issue
Block a user