aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dse.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2005-09-12 13:56:07 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2005-09-12 06:56:07 -0700
commit8d09949866446020d0a3ca63eea8d42fcbf2c93e (patch)
tree585567d020443a753efdc661b623dee6eeff37c3 /gcc/tree-ssa-dse.c
parentf439f9a536087071b4593eb0dda40eb5cc592c1c (diff)
downloadgcc-8d09949866446020d0a3ca63eea8d42fcbf2c93e.zip
gcc-8d09949866446020d0a3ca63eea8d42fcbf2c93e.tar.gz
gcc-8d09949866446020d0a3ca63eea8d42fcbf2c93e.tar.bz2
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.
2005-09-12 Andrew Pinski <pinskia@physics.uc.edu> * 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. From-SVN: r104172
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r--gcc/tree-ssa-dse.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 4277a3a..7087018 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 */
};