mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 05:43:37 +02:00
DFG: Remove topological sort
Cyclic components are now extracted separately, so there is no functional reason to have to do a topological sort (previously we used it to detect cyclic graphs). Removing it to gain some speed.
This commit is contained in:
@@ -290,9 +290,6 @@ void V3DfgOptimizer::optimize(AstNetlist* netlistp, const string& label) {
|
||||
// For each acyclic component
|
||||
for (auto& component : acyclicComponents) {
|
||||
if (dumpDfg() >= 7) component->dumpDotFilePrefixed(ctx.prefix() + "source");
|
||||
// Reverse topologically sort the component
|
||||
const bool acyclic = component->sortTopologically(/* reverse: */ true);
|
||||
UASSERT_OBJ(acyclic, nodep, "Supposedly acyclic graph is cyclic");
|
||||
// Optimize the component
|
||||
V3DfgPasses::optimize(*component, ctx);
|
||||
// Add back under the main DFG (we will convert everything back in one go)
|
||||
|
||||
Reference in New Issue
Block a user