diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-25 09:02:05 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-25 09:02:05 +0000 |
commit | 3d1eacdb7e7d943c99ac9f18181eab26d3e03cd1 (patch) | |
tree | d9aa3a1c938bc4df3cbd34eb918dde4d83d84237 /gcc/tree-ssa-propagate.c | |
parent | a15d1cafc1d164f1995f143feb46ea2ee4e85017 (diff) | |
download | gcc-3d1eacdb7e7d943c99ac9f18181eab26d3e03cd1.tar.gz |
* tree-eh.c (tree_remove_unreachable_handlers): Handle shared labels.
(tree_empty_eh_handler_p): Allow non-EH predecestors; allow region
to be reached by different label than left.
(update_eh_edges): Update comment; remove edge_to_remove if possible
and return true if suceeded.
(cleanup_empty_eh): Accept sharing map; handle shared regions.
(cleanup_eh): Compute sharing map.
* except.c (remove_eh_handler_and_replace): Add argument if we should
update regions.
(remove_unreachable_regions): Update for label sharing.
(label_to_region_map): Likewise.
(get_next_region_sharing_label): New function.
(remove_eh_handler_and_replace): Add update_catch_try parameter; update
prev_try pointers.
(remove_eh_handler): Update.
(remove_eh_region_and_replace_by_outer_of): New function.
* except.h (struct eh_region): Add next_region_sharing_label.
(remove_eh_region_and_replace_by_outer_of,
get_next_region_sharing_label): Declare.
* tree-cfgcleanup.c (tree_forwarder_block_p): Simplify.
* tree-cfg.c (split_critical_edges): Split also edges where we can't
insert code even if they are not critical.
* tree-cfg.c (gimple_can_merge_blocks_p): EH edges are unmergable.
(gimple_can_remove_branch_p): EH edges won't remove branch by
redirection.
* tree-inline.c (update_ssa_across_abnormal_edges): Do handle
updating of non-abnormal EH edges.
* tree-cfg.c (gimple_can_merge_blocks_p): EH edges are unmergable.
(gimple_can_remove_branch_p): EH edges are unremovable by redirection.
(split_critical_edges): Split also edges where emitting code on them
will lead to splitting later.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146763 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 76aec2ab0f6..89bbe08adbd 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -449,10 +449,14 @@ simulate_block (basic_block block) simulate_stmt (stmt); } - /* We can not predict when abnormal edges will be executed, so + /* We can not predict when abnormal and EH edges will be executed, so once a block is considered executable, we consider any outgoing abnormal edges as executable. + TODO: This is not exactly true. Simplifying statement might + prove it non-throwing and also computed goto can be handled + when destination is known. + At the same time, if this block has only one successor that is reached by non-abnormal edges, then add that successor to the worklist. */ @@ -460,7 +464,7 @@ simulate_block (basic_block block) normal_edge = NULL; FOR_EACH_EDGE (e, ei, block->succs) { - if (e->flags & EDGE_ABNORMAL) + if (e->flags & (EDGE_ABNORMAL | EDGE_EH)) add_control_edge (e); else { |