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:
Geza Lore
2022-10-08 12:46:02 +01:00
parent 90447d54d1
commit 461f3c1004
3 changed files with 0 additions and 80 deletions
-3
View File
@@ -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)