diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-29 17:56:19 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-29 17:56:19 +0000 |
commit | 9ea57afb4db1bbb1db69f232164f61059f1eab18 (patch) | |
tree | 13792550dcad7fea8744ca68de3f87d9b9e8af6c /gcc/cfgrtl.c | |
parent | e0ebfc19aff2d83bda5cc2894bf6e415293192c9 (diff) | |
download | gcc-9ea57afb4db1bbb1db69f232164f61059f1eab18.tar.gz |
* cfgrtl.c (cfg_layout_redirect_edge_and_branch): Speed up by
simplifying edge manipulation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91474 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 3ba3265e683..818c5b826e8 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2587,25 +2587,8 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest) of conditional jump, remove it. */ if (EDGE_COUNT (src->succs) == 2) { - bool found = false; - unsigned ix = 0; - edge tmp, s; - edge_iterator ei; - - FOR_EACH_EDGE (tmp, ei, src->succs) - if (e == tmp) - { - found = true; - ix = ei.index; - break; - } - - gcc_assert (found); - - if (EDGE_COUNT (src->succs) > (ix + 1)) - s = EDGE_SUCC (src, ix + 1); - else - s = EDGE_SUCC (src, 0); + /* Find the edge that is different from E. */ + edge s = EDGE_SUCC (src, EDGE_SUCC (src, 0) == e); if (s->dest == dest && any_condjump_p (BB_END (src)) |