Commit 72922229 by Jeff Law Committed by Jeff Law

re PR tree-optimization/26796 (ACATS ICE c34002a c52005 spurious storage_error)

        PR tree-optimization/26796
        * tree-ssa-dom.c (propagate_rhs_into_lhs): Queue blocks which
        need EH edge cleanups rather than purging them immediately.
        (eliminate_degenerate_phis): Handle queued EH cleanups.

From-SVN: r112453
parent c245c134
2006-03-28 Jeff Law <law@redhat.com>
PR tree-optimization/26796
* tree-ssa-dom.c (propagate_rhs_into_lhs): Queue blocks which
need EH edge cleanups rather than purging them immediately.
(eliminate_degenerate_phis): Handle queued EH cleanups.
2006-03-28 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-alias.c (create_sft): Initially inherit TREE_ADDRESSABLE
......
......@@ -2181,10 +2181,13 @@ propagate_rhs_into_lhs (tree stmt, tree lhs, tree rhs, bitmap interesting_names)
recompute_tree_invariant_for_addr_expr (TREE_OPERAND (use_stmt, 1));
/* If we cleaned up EH information from the statement,
remove EH edges. I'm not sure if this happens in
practice with this code, but better safe than sorry. */
mark its containing block as needing EH cleanups. */
if (maybe_clean_or_replace_eh_stmt (use_stmt, use_stmt))
tree_purge_dead_eh_edges (bb_for_stmt (use_stmt));
{
bitmap_set_bit (need_eh_cleanup, bb_for_stmt (use_stmt)->index);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Flagged to clear EH edges.\n");
}
/* Propagation may expose new degenerate PHIs or
trivial copy/constant propagation opportunities. */
......@@ -2392,6 +2395,10 @@ eliminate_degenerate_phis (void)
{
bitmap interesting_names;
/* Bitmap of blocks which need EH information updated. We can not
update it on-the-fly as doing so invalidates the dominator tree. */
need_eh_cleanup = BITMAP_ALLOC (NULL);
/* INTERESTING_NAMES is effectively our worklist, indexed by
SSA_NAME_VERSION.
......@@ -2436,6 +2443,14 @@ eliminate_degenerate_phis (void)
}
}
/* Propagation of const and copies may make some EH edges dead. Purge
such edges from the CFG as needed. */
if (!bitmap_empty_p (need_eh_cleanup))
{
cfg_altered |= tree_purge_all_dead_eh_edges (need_eh_cleanup);
BITMAP_FREE (need_eh_cleanup);
}
BITMAP_FREE (interesting_names);
if (cfg_altered)
free_dominance_info (CDI_DOMINATORS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment