mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Speed up TopoSort. The main sorting algorithm implementation in TopoSort::sort_worker is 11-12x faster. Overall, the complete sequence of building the graph and sorting is about 2.5-3x faster. The overall impact in e.g. the replace_const_cells optimization pass is a ~25% speedup. End-to-end impact on our synthesis flow is about 3%.
This commit is contained in:
parent
8fb807cd24
commit
e0042bdff7
5 changed files with 126 additions and 79 deletions
|
@ -312,7 +312,7 @@ struct FlattenPass : public Pass {
|
|||
for (auto cell : module->selected_cells()) {
|
||||
RTLIL::Module *tpl = design->module(cell->type);
|
||||
if (tpl != nullptr) {
|
||||
if (topo_modules.database.count(tpl) == 0)
|
||||
if (!topo_modules.has_edges(tpl))
|
||||
worklist.insert(tpl);
|
||||
topo_modules.edge(tpl, module);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue