diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-08 03:39:19 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-08 03:39:19 +0000 |
commit | 6d7413d8f7da0b76870150c1c9b79274bec9cfe4 (patch) | |
tree | c58611cf62c9432b67999f9b9ddee77792efffb3 /gcc/tree-ssa-threadupdate.c | |
parent | 6ec283975962973a954c7cd06b0d9f2edc3c1160 (diff) | |
download | gcc-6d7413d8f7da0b76870150c1c9b79274bec9cfe4.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96084 138bc75d-0d04-0410-961f-82ee72b054a4
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 d798713a439..e1e0d3ea889 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. |