tree-ssa-dom.c (tree_ssa_dominator_optimize): Clear SSA_NAME_VALUE at the end of the main DOM loop rather than just before...

* tree-ssa-dom.c (tree_ssa_dominator_optimize): Clear SSA_NAME_VALUE
        at the end of the main DOM loop rather than just before DOM exits.

From-SVN: r93811
This commit is contained in:
Jeff Law 2005-01-17 21:36:40 -07:00 committed by Jeff Law
parent e03a46f571
commit 0bd6548378
2 changed files with 25 additions and 20 deletions

View File

@ -1,3 +1,8 @@
2005-01-17 Jeff Law <law@redhat.com>
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Clear SSA_NAME_VALUE
at the end of the main DOM loop rather than just before DOM exits.
2005-01-17 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/19121

View File

@ -455,8 +455,26 @@ tree_ssa_dominator_optimize (void)
htab_empty (avail_exprs);
htab_empty (vrp_data);
for (i = 0; i < num_referenced_vars; i++)
var_ann (referenced_var (i))->current_def = NULL;
/* Finally, remove everything except invariants in SSA_NAME_VALUE.
This must be done before we iterate as we might have a
reference to an SSA_NAME which was removed by the call to
rewrite_ssa_into_ssa.
Long term we will be able to let everything in SSA_NAME_VALUE
persist. However, for now, we know this is the safe thing to do. */
for (i = 0; i < num_ssa_names; i++)
{
tree name = ssa_name (i);
tree value;
if (!name)
continue;
value = SSA_NAME_VALUE (name);
if (value && !is_gimple_min_invariant (value))
SSA_NAME_VALUE (name) = NULL;
}
}
while (cfg_altered);
@ -478,24 +496,6 @@ tree_ssa_dominator_optimize (void)
/* Free nonzero_vars. */
BITMAP_XFREE (nonzero_vars);
BITMAP_XFREE (need_eh_cleanup);
/* Finally, remove everything except invariants in SSA_NAME_VALUE.
Long term we will be able to let everything in SSA_NAME_VALUE
persist. However, for now, we know this is the safe thing to
do. */
for (i = 0; i < num_ssa_names; i++)
{
tree name = ssa_name (i);
tree value;
if (!name)
continue;
value = SSA_NAME_VALUE (name);
if (value && !is_gimple_min_invariant (value))
SSA_NAME_VALUE (name) = NULL;
}
VEC_free (tree_on_heap, block_defs_stack);
VEC_free (tree_on_heap, avail_exprs_stack);