diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-22 11:11:21 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-22 11:11:21 +0000 |
commit | 26fb1781ca25d5670ea3132d93b0b243fd7319f7 (patch) | |
tree | c1fc98111346b8e70b39c4624897463b590685e6 /gcc/cfgcleanup.c | |
parent | 09a41b316a8039846dca2e5875015b37c2f7ada9 (diff) | |
download | gcc-26fb1781ca25d5670ea3132d93b0b243fd7319f7.tar.gz |
* cfgcleanup.c (outgoing_edges_math): Fix condition; relax
frequencies match; avoid match on different loop depths.
(try_crossjump_to_bb): Kill tests that no longer brings time
savings.
* cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth
updating code.
(split_edge): Likewise.
* flow.c (update_life_info_in_dirty_blocks): Fix uninitialized
variable.
* Makefile.in (cfgrtl): Add insn-config.h depenendency.
* cfgrtl.c: Include insn-config.h
(split_block) Dirtify block in presence of conditional execution
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index 078b669f3c0..bc637e4ee48 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1116,9 +1116,20 @@ outgoing_edges_match (mode, bb1, bb2) if (!bb2->succ || !bb2->succ->succ_next - || bb1->succ->succ_next->succ_next + || bb2->succ->succ_next->succ_next || !any_condjump_p (bb2->end) - || !onlyjump_p (bb1->end)) + || !onlyjump_p (bb2->end)) + return false; + + /* Do not crossjump across loop boundaries. This is a temporary + workaround for the common scenario in which crossjumping results + in killing the duplicated loop condition, making bb-reorder rotate + the loop incorectly, leaving an extra unconditional jump inside + the loop. + + This check should go away once bb-reorder knows how to duplicate + code in this case or rotate the loops to avoid this scenario. */ + if (bb1->loop_depth != bb2->loop_depth) return false; b1 = BRANCH_EDGE (bb1); @@ -1194,9 +1205,10 @@ outgoing_edges_match (mode, bb1, bb2) /* Do not use f2 probability as f2 may be forwarded. */ prob2 = REG_BR_PROB_BASE - b2->probability; - /* Fail if the difference in probabilities is - greater than 5%. */ - if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 20) + /* Fail if the difference in probabilities is greater than 50%. + This rules out two well-predicted branches with opposite + outcomes. */ + if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 5) { if (rtl_dump_file) fprintf (rtl_dump_file, |