diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-22 16:13:40 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-22 16:13:40 +0000 |
commit | 91d6391be8eb1375fb40bb0e6dfdb648a343e79c (patch) | |
tree | 8e31c857e90331506fa48127c03f8acc8615ee57 /gcc | |
parent | e311e7c3ae9d2c65d64c920c0551e9dbca701af6 (diff) | |
download | gcc-91d6391be8eb1375fb40bb0e6dfdb648a343e79c.tar.gz |
* tree-cfg.c (remove_forwarder_block_with_phi): Look at the
first label to see if it is a nonlocal label.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94067 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 17 |
2 files changed, 9 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d74b1f81ab1..73db887aff1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -6,6 +6,9 @@ config/sparc/freebsd.h, config/sparc/netbsd-elf.h, config/sparc/sol2.h: Update copyright. + * tree-cfg.c (remove_forwarder_block_with_phi): Look at the + first label to see if it is a nonlocal label. + 2005-01-22 David Edelsohn <edelsohn@gnu.org> Andrew Pinski <pinskia@physics.uc.edu> diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 93dfc343f82..b69ec0cd211 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4130,8 +4130,8 @@ remove_forwarder_block_with_phi (basic_block bb) { edge succ = EDGE_SUCC (bb, 0); basic_block dest = succ->dest; + tree label; basic_block dombb, domdest, dom; - block_stmt_iterator bsi; /* We check for infinite loops already in tree_forwarder_block_p. However it may happen that the infinite loop is created @@ -4141,16 +4141,11 @@ remove_forwarder_block_with_phi (basic_block bb) /* If the destination block consists of a nonlocal label, do not merge it. */ - for (bsi = bsi_start (dest); !bsi_end_p (bsi); bsi_next (&bsi)) - { - tree stmt = bsi_stmt (bsi); - - if (TREE_CODE (stmt) != LABEL_EXPR) - break; - - if (DECL_NONLOCAL (LABEL_EXPR_LABEL (stmt))) - return; - } + label = first_stmt (dest); + if (label + && TREE_CODE (label) == LABEL_EXPR + && DECL_NONLOCAL (LABEL_EXPR_LABEL (label))) + return; /* Redirect each incoming edge to BB to DEST. */ while (EDGE_COUNT (bb->preds) > 0) |