+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
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);
/* 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);