This changes it from PRE on the inverted graph to RPO order which works better for loops and blocks with no path to exit.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-08-22 Richard Biener <rguent...@suse.de> * tree-ssa-forwprop.c (pass_forwprop::execute): Use RPO order. Index: gcc/tree-ssa-forwprop.c =================================================================== --- gcc/tree-ssa-forwprop.c (revision 239607) +++ gcc/tree-ssa-forwprop.c (working copy) @@ -2099,7 +2099,8 @@ pass_forwprop::execute (function *fun) lattice.create (num_ssa_names); lattice.quick_grow_cleared (num_ssa_names); int *postorder = XNEWVEC (int, n_basic_blocks_for_fn (fun)); - int postorder_num = inverted_post_order_compute (postorder); + int postorder_num = pre_and_rev_post_order_compute_fn (cfun, NULL, + postorder, false); auto_vec<gimple *, 4> to_fixup; to_purge = BITMAP_ALLOC (NULL); for (int i = 0; i < postorder_num; ++i)