- kill keep-alive edges to dead blocks before doing apply_result(),
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 22 Oct 2008 15:59:41 +0000 (15:59 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 22 Oct 2008 15:59:41 +0000 (15:59 +0000)
  this reduces the graph and fixes the problem of dead cf to dead blocks
  (which assert else)

[r23114]

ir/opt/combo.c

index 6887545..e1dd014 100644 (file)
@@ -3430,8 +3430,11 @@ void combo(ir_graph *irg) {
 
        /* apply the result */
        irg_block_walk_graph(irg, NULL, apply_cf, &env);
-       irg_walk_graph(irg, NULL, apply_result, &env);
+       /* Kill keep-alives of dead blocks: this speeds up apply_result()
+        * and fixes assertion because dead cf to dead blocks is NOT removed by
+        * apply_cf(). */
        apply_end(get_irg_end(irg), &env);
+       irg_walk_graph(irg, NULL, apply_result, &env);
 
        if (env.modified) {
                /* control flow might changed */