diff options
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index ae259e3a8ca..ebb0aa3fbfa 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -450,6 +450,17 @@ tree_ssa_dominator_optimize (void) free_all_edge_infos (); + { + block_stmt_iterator bsi; + basic_block bb; + FOR_EACH_BB (bb) + { + for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) + { + update_stmt_if_modified (bsi_stmt (bsi)); + } + } + } /* Thread jumps, creating duplicate blocks as needed. */ cfg_altered |= thread_through_all_blocks (); @@ -2097,7 +2108,7 @@ simplify_cond_and_lookup_avail_expr (tree stmt, /* If this is not a real stmt, ann will be NULL and we avoid processing the operands. */ if (ann) - modify_stmt (stmt); + mark_stmt_modified (stmt); /* Lookup the condition and return its known value if it exists. */ @@ -2349,7 +2360,7 @@ simplify_switch_and_lookup_avail_expr (tree stmt, int insert) if (!fail) { SWITCH_COND (stmt) = def; - modify_stmt (stmt); + mark_stmt_modified (stmt); return lookup_avail_expr (stmt, insert); } @@ -2709,7 +2720,7 @@ eliminate_redundant_computations (struct dom_walk_data *walk_data, retval = true; propagate_tree_value (expr_p, cached_lhs); - modify_stmt (stmt); + mark_stmt_modified (stmt); } return retval; } @@ -2946,7 +2957,7 @@ cprop_operand (tree stmt, use_operand_p op_p) /* And note that we modified this statement. This is now safe, even if we changed virtual operands since we will rescan the statement and rewrite its operands again. */ - modify_stmt (stmt); + mark_stmt_modified (stmt); } return may_have_exposed_new_symbols; } @@ -3008,7 +3019,7 @@ optimize_stmt (struct dom_walk_data *walk_data, basic_block bb, stmt = bsi_stmt (si); - get_stmt_operands (stmt); + update_stmt_if_modified (stmt); ann = stmt_ann (stmt); opt_stats.num_stmts++; may_have_exposed_new_symbols = false; @@ -3178,7 +3189,7 @@ update_rhs_and_lookup_avail_expr (tree stmt, tree new_rhs, bool insert) /* And make sure we record the fact that we modified this statement. */ - modify_stmt (stmt); + mark_stmt_modified (stmt); return cached_lhs; } |