aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfglayout.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2006-01-02 22:47:50 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2006-01-02 22:47:50 +0000
commitc8c3cb28fa6b56640e6ec8ce6feaf30e7c848cb5 (patch)
tree9ae9d94e53504579c5780cb80ef18bf1729a5658 /gcc/cfglayout.c
parent99f1e970919e08ce15113e28618ec93ddc0cddc4 (diff)
downloadgcc-c8c3cb28fa6b56640e6ec8ce6feaf30e7c848cb5.zip
gcc-c8c3cb28fa6b56640e6ec8ce6feaf30e7c848cb5.tar.gz
gcc-c8c3cb28fa6b56640e6ec8ce6feaf30e7c848cb5.tar.bz2
cfglayout.c (fixup_reorder_chain): Remove kludge for the case of conditional jump jumping to the next instruction.
* cfglayout.c (fixup_reorder_chain): Remove kludge for the case of conditional jump jumping to the next instruction. * cfgrtl.c (force_nonfallthru_and_redirect): Accept all cases of conditional jump jumping to the next instruction. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r109247
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r--gcc/cfglayout.c40
1 files changed, 6 insertions, 34 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index d2580b4..5880819a 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -680,41 +680,13 @@ fixup_reorder_chain (void)
continue;
/* The degenerated case of conditional jump jumping to the next
- instruction can happen on target having jumps with side
- effects.
-
- Create temporarily the duplicated edge representing branch.
- It will get unidentified by force_nonfallthru_and_redirect
- that would otherwise get confused by fallthru edge not pointing
- to the next basic block. */
+ instruction can happen for jumps with side effects. We need
+ to construct a forwarder block and this will be done just
+ fine by force_nonfallthru below. */
if (!e_taken)
- {
- rtx note;
- edge e_fake;
- bool redirected;
-
- e_fake = unchecked_make_edge (bb, e_fall->dest, 0);
-
- redirected = redirect_jump (BB_END (bb),
- block_label (bb), 0);
- gcc_assert (redirected);
-
- note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX);
- if (note)
- {
- int prob = INTVAL (XEXP (note, 0));
-
- e_fake->probability = prob;
- e_fake->count = e_fall->count * prob / REG_BR_PROB_BASE;
- e_fall->probability -= e_fall->probability;
- e_fall->count -= e_fake->count;
- if (e_fall->probability < 0)
- e_fall->probability = 0;
- if (e_fall->count < 0)
- e_fall->count = 0;
- }
- }
- /* There is one special case: if *neither* block is next,
+ ;
+
+ /* There is another special case: if *neither* block is next,
such as happens at the very end of a function, then we'll
need to add a new unconditional jump. Choose the taken
edge based on known or assumed probability. */