Fix cell scoping performance (#6059).
This commit is contained in:
parent
0d1f036f17
commit
aa28a8d1e1
1
Changes
1
Changes
|
|
@ -17,6 +17,7 @@ Verilator 5.041 devel
|
|||
* Improve automatic selection of logic for DFG synthesis (#6370). [Geza Lore]
|
||||
* Improve `covergroup with function sample` handling (#6387). [Jakub Wasilewski]
|
||||
* Optimize dead functions without references (#6380). [Artur Bieniek, Antmicro Ltd.]
|
||||
* Fix cell scoping performance (#6059). [Jerry Tianchen]
|
||||
* Fix while loop hang on timing-delayed assignment (#6343) (#6354). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix driver analysis of partially assigned variables (#6364) (#6378). [Geza Lore]
|
||||
* Fix V3Hash MacOS ambiguity (#6350). [Lan Zongwei]
|
||||
|
|
|
|||
|
|
@ -428,6 +428,7 @@ Terpstra
|
|||
Thiede
|
||||
Thierry
|
||||
Thyer
|
||||
Tianchen
|
||||
Tianrui
|
||||
Tichelaar
|
||||
Timi
|
||||
|
|
|
|||
|
|
@ -115,9 +115,14 @@ class ScopeVisitor final : public VNVisitor {
|
|||
nodep, scopename, m_aboveScopep, m_aboveCellp};
|
||||
if (VN_IS(nodep, Package)) m_packageScopes.emplace(nodep, m_scopep);
|
||||
|
||||
// Now for each child cell, iterate the module this cell points to
|
||||
// Get list of cells before we edit, to avoid excess visits (issue #6059)
|
||||
std::deque<AstCell*> cells;
|
||||
for (AstNode* cellnextp = nodep->stmtsp(); cellnextp; cellnextp = cellnextp->nextp()) {
|
||||
if (AstCell* const cellp = VN_CAST(cellnextp, Cell)) {
|
||||
if (AstCell* const cellp = VN_CAST(cellnextp, Cell)) cells.push_back(cellp);
|
||||
}
|
||||
|
||||
// Now for each child cell, iterate the module this cell points to
|
||||
for (AstCell* const cellp : cells) {
|
||||
VL_RESTORER(m_scopep); // Protects m_scopep set in called module
|
||||
// which is "above" in this code, but later in code execution order
|
||||
VL_RESTORER(m_aboveCellp);
|
||||
|
|
@ -134,7 +139,6 @@ class ScopeVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create scope for the current usage of this module
|
||||
UINFO(4, " back AT " << scopename << " " << nodep);
|
||||
|
|
|
|||
Loading…
Reference in New Issue