Open curiousdannii opened 3 years ago
I removed the code that did this as it was unsafe - it didn't account for descendent nodes that had merged branches. As this is only a cosmetic optimisation (reducing nested code) I won't try to implement it for now.
Currently nodes that are not part of a loop scc are not pulled out (ie, made a next edge) unless they are not dominated by the loop header. This means that a series of loops becomes deeply nested. As most loops have only one exit node, we can put it out as long as there isn't already a next edge. We could simply pull the first non-scc node out, or try to weigh the options somehow.