diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-02 22:47:50 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-02 22:47:50 +0000 |
commit | 7a40109845843278aa68d83eb1c7c7acf75f4577 (patch) | |
tree | 9ae9d94e53504579c5780cb80ef18bf1729a5658 /gcc/cfglayout.c | |
parent | e143c70590bb34f91652d2b5c596750ca463c69f (diff) | |
download | gcc-7a40109845843278aa68d83eb1c7c7acf75f4577.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r-- | gcc/cfglayout.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index d2580b4e19f..5880819a918 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. */ |