diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d2a74292df..e8dd7972870 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-09-12 Andrew Pinski + + * tree-ssa-dse.c (dse_optimize_stmt): Fix up all of V_MAY_DEF and + V_MUST_DEF instead of just the first_use_p. + Don't mark the virtual variables for renaming on the statement which + is being removed. + (pass_dse): Remove TODO_update_ssa. + 2005-09-12 J"orn Rennecke PR middle-end/23290 diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 4277a3aa7c6..7087018063c 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -257,14 +257,9 @@ dse_optimize_stmt (struct dom_walk_data *walk_data, && operand_equal_p (TREE_OPERAND (stmt, 0), TREE_OPERAND (use_stmt, 0), 0)) { - tree def; - ssa_op_iter iter; - /* Make sure we propagate the ABNORMAL bit setting. */ if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (USE_FROM_PTR (first_use_p))) SSA_NAME_OCCURS_IN_ABNORMAL_PHI (usevar) = 1; - /* Then we need to fix the operand of the consuming stmt. */ - SET_USE (first_use_p, usevar); if (dump_file && (dump_flags & TDF_DETAILS)) { @@ -272,16 +267,15 @@ dse_optimize_stmt (struct dom_walk_data *walk_data, print_generic_expr (dump_file, bsi_stmt (bsi), dump_flags); fprintf (dump_file, "'\n"); } - + /* Then we need to fix the operand of the consuming stmt. */ + FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND (var1, var2, stmt, op_iter) + { + single_imm_use (DEF_FROM_PTR (var1), &use_p, &temp); + SET_USE (use_p, USE_FROM_PTR (var2)); + } /* Remove the dead store. */ bsi_remove (&bsi); - /* The virtual defs for the dead statement will need to be - updated. Since these names are going to disappear, - FUD chains for uses downstream need to be updated. */ - FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_VIRTUAL_DEFS) - mark_sym_for_renaming (SSA_NAME_VAR (def)); - /* And release any SSA_NAMEs set in this statement back to the SSA_NAME manager. */ release_defs (stmt); @@ -408,7 +402,6 @@ struct tree_opt_pass pass_dse = { 0, /* todo_flags_start */ TODO_dump_func | TODO_ggc_collect - | TODO_update_ssa | TODO_verify_ssa, /* todo_flags_finish */ 0 /* letter */ };