if-decompiler icon indicating copy to clipboard operation
if-decompiler copied to clipboard

Optimisation: if a loop has no next edge pull one non-scc node out

Open curiousdannii opened this issue 3 years ago • 1 comments

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.

curiousdannii avatar Apr 14 '21 06:04 curiousdannii