Initially mark the end block as reachable and set the bad node to bottom (i.e. undefi...
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 3 May 2011 17:38:43 +0000 (19:38 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 4 May 2011 13:46:06 +0000 (15:46 +0200)
ir/opt/fp-vrp.c

index 14cf316..dd3d0cf 100644 (file)
@@ -772,6 +772,12 @@ void fixpoint_vrp(ir_graph* const irg)
                   blocks in Firm. Moreover build phi list. */
                irg_walk_anchors(irg, clear_links, build_phi_lists, NULL);
 
                   blocks in Firm. Moreover build phi list. */
                irg_walk_anchors(irg, clear_links, build_phi_lists, NULL);
 
+               { ir_tarval* const f = get_tarval_b_false();
+                       ir_tarval* const t = get_tarval_b_true();
+                       set_bitinfo(get_irg_bad(irg),       f, t); /* Undefined. */
+                       set_bitinfo(get_irg_end_block(irg), t, f); /* Reachable. */
+               }
+
                /* TODO Improve iteration order. Best is reverse postorder in data flow
                 * direction and respecting loop nesting for fastest convergence. */
                irg_walk_blkwise_dom_top_down(irg, NULL, first_round, q);
                /* TODO Improve iteration order. Best is reverse postorder in data flow
                 * direction and respecting loop nesting for fastest convergence. */
                irg_walk_blkwise_dom_top_down(irg, NULL, first_round, q);