diff options
| author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-26 17:02:49 +0000 |
|---|---|---|
| committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-26 17:02:49 +0000 |
| commit | cb8c2df72c9d0ec887dc862432efabfd6cf2bcf2 (patch) | |
| tree | 43fa5c6cd4e8b162c9cb6bef15323fe4d39b7682 /gcc | |
| parent | 5407b68e9759bde3056c01ddcda9c5934aca2e28 (diff) | |
| download | ppe42-gcc-cb8c2df72c9d0ec887dc862432efabfd6cf2bcf2.tar.gz ppe42-gcc-cb8c2df72c9d0ec887dc862432efabfd6cf2bcf2.zip | |
* tree-cfg.c (tree_split_edge): Speed up by using find_edge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91341 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 2 | ||||
| -rw-r--r-- | gcc/tree-cfg.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index afa679f6211..5f6d899f546 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,8 @@ * cse.c, tree-ssa-operands.c: Fix comment typos. + * tree-cfg.c (tree_split_edge): Speed up by using find_edge. + 2004-11-26 James A. Morrison <phython@gcc.gnu.org> PR target/18510 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 2d02f71d5b0..ee0bce2140b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3144,7 +3144,6 @@ tree_split_edge (edge edge_in) { basic_block new_bb, after_bb, dest, src; edge new_edge, e; - edge_iterator ei; /* Abnormal edges cannot be split. */ gcc_assert (!(edge_in->flags & EDGE_ABNORMAL)); @@ -3155,13 +3154,10 @@ tree_split_edge (edge edge_in) /* Place the new block in the block list. Try to keep the new block near its "logical" location. This is of most help to humans looking at debugging dumps. */ - FOR_EACH_EDGE (e, ei, dest->preds) - if (e->src->next_bb == dest) - break; - if (!e) - after_bb = dest->prev_bb; - else + if (dest->prev_bb && find_edge (dest->prev_bb, dest)) after_bb = edge_in->src; + else + after_bb = dest->prev_bb; new_bb = create_empty_bb (after_bb); new_bb->frequency = EDGE_FREQUENCY (edge_in); |

