mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 15:40:55 +08:00
cfgrtl.c (cfg_layout_redirect_edge_and_branch): Speed up by simplifying edge manipulation.
* cfgrtl.c (cfg_layout_redirect_edge_and_branch): Speed up by simplifying edge manipulation. From-SVN: r91474
This commit is contained in:
parent
62112e35c6
commit
03101c6f2b
@ -6,6 +6,9 @@
|
||||
* tree-ssa-loop-manip.c: Likewise.
|
||||
* tree-ssa.c: Likewise.
|
||||
|
||||
* cfgrtl.c (cfg_layout_redirect_edge_and_branch): Speed up by
|
||||
simplifying edge manipulation.
|
||||
|
||||
2004-11-29 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* varasm.c (default_elf_select_section_1): Only pass DECL_P decl
|
||||
|
21
gcc/cfgrtl.c
21
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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user