diff options
author | Jeff Law <law@redhat.com> | 2005-03-07 20:39:19 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2005-03-07 20:39:19 -0700 |
commit | be477406042409e5431463f963e02b4365e94ef6 (patch) | |
tree | c58611cf62c9432b67999f9b9ddee77792efffb3 /gcc/tree-ssa-threadupdate.c | |
parent | 58261bc2462eacb994befe7f3e25295b4a5e6eb9 (diff) | |
download | gcc-be477406042409e5431463f963e02b4365e94ef6.zip gcc-be477406042409e5431463f963e02b4365e94ef6.tar.gz gcc-be477406042409e5431463f963e02b4365e94ef6.tar.bz2 |
tree-cfg.c (find_taken_edge_computed_goto): New function.
* tree-cfg.c (find_taken_edge_computed_goto): New function.
(find_taken_edge): Call find_taken_edge_computed_goto as
appropriate. Allow any gimple invariant rather than just
INTEGER_CST for VAL.
(cleanup_control_flow): Cleanup a computed goto which has turned
into a simple goto.
(tree_merge_blocks): If block B has any forced labels, move
them to the start of block A.
* tree-ssa-dom.c (thread_across_edge): Allow threading across
computed gotos as well.
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Handle
removal of unnecessary computed gotos too.
(lookup_redirection_data): Fix type of INSERT argument. Callers
updated.
From-SVN: r96084
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index d798713..e1e0d3e 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -169,6 +169,7 @@ remove_ctrl_stmt_and_useless_edges (basic_block bb, basic_block dest_bb) if (!bsi_end_p (bsi) && bsi_stmt (bsi) && (TREE_CODE (bsi_stmt (bsi)) == COND_EXPR + || TREE_CODE (bsi_stmt (bsi)) == GOTO_EXPR || TREE_CODE (bsi_stmt (bsi)) == SWITCH_EXPR)) bsi_remove (&bsi); @@ -228,7 +229,7 @@ redirection_data_eq (const void *p1, const void *p2) edges associated with E in the hash table. */ static struct redirection_data * -lookup_redirection_data (edge e, edge incoming_edge, bool insert) +lookup_redirection_data (edge e, edge incoming_edge, enum insert_option insert) { void **slot; struct redirection_data *elt; @@ -733,7 +734,7 @@ thread_block (basic_block bb) /* Insert the outgoing edge into the hash table if it is not already in the hash table. */ - lookup_redirection_data (e2, e, true); + lookup_redirection_data (e2, e, INSERT); } } @@ -744,7 +745,7 @@ thread_block (basic_block bb) if (all) { edge e = EDGE_PRED (bb, 0)->aux; - lookup_redirection_data (e, NULL, false)->do_not_duplicate = true; + lookup_redirection_data (e, NULL, NO_INSERT)->do_not_duplicate = true; } /* Now create duplicates of BB. |