tree-dfa.c (free_df_for_stmt): No longer static.

* tree-dfa.c (free_df_for_stmt): No longer static.
	(free_df): Update comments.
	* tree-flow.h (free_df_for_stmt): Prototype.
	* tree-ssa-dse.c (dse_optimize_stmt): Call free_df_for_stmt.  Also
	call release_defs.

From-SVN: r87531
This commit is contained in:
Jeff Law 2004-09-14 22:12:18 -06:00 committed by Jeff Law
parent bb5ecf2959
commit a5c965c17e
4 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2004-09-14 Jeff Law <law@redhat.com>
* tree-dfa.c (free_df_for_stmt): No longer static.
(free_df): Update comments.
* tree-flow.h (free_df_for_stmt): Prototype.
* tree-ssa-dse.c (dse_optimize_stmt): Call free_df_for_stmt. Also
call release_defs.
2004-09-14 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/17252

View File

@ -188,9 +188,9 @@ compute_immediate_uses (int flags, bool (*calc_for)(tree))
}
/* Invalidates dataflow information for a statement STMT. */
/* Invalidates dataflow information for a statement STMT. */
static void
void
free_df_for_stmt (tree stmt)
{
dataflow_t *df;
@ -221,7 +221,13 @@ free_df_for_stmt (tree stmt)
}
/* Invalidate dataflow information for the whole function. */
/* Invalidate dataflow information for the whole function.
Note this only invalidates dataflow information on statements and
PHI nodes which are reachable.
A deleted statement may still have attached dataflow information
on it. */
void
free_df (void)

View File

@ -530,6 +530,7 @@ extern void dump_immediate_uses_for (FILE *, tree);
extern void debug_immediate_uses_for (tree);
extern void compute_immediate_uses (int, bool (*)(tree));
extern void free_df (void);
extern void free_df_for_stmt (tree);
extern tree get_virtual_var (tree);
extern void add_referenced_tmp_var (tree var);
extern void mark_new_vars_to_rename (tree, bitmap);

View File

@ -326,6 +326,14 @@ dse_optimize_stmt (struct dom_walk_data *walk_data,
This allows us to cascade dead stores. */
redirect_immediate_uses (stmt, skipped_phi ? skipped_phi : use);
/* Be sure to remove any dataflow information attached to
this statement. */
free_df_for_stmt (stmt);
/* And release any SSA_NAMEs set in this statement back to the
SSA_NAME manager. */
release_defs (stmt);
/* Finally remove the dead store. */
bsi_remove (&bsi);
}