aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-11-14 23:18:24 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-11-14 23:18:24 -0500
commita3579a47d1dc8e565bf000e98468066dfe8cf795 (patch)
tree798f2289fcf27bb3296af86c4179753a2d2514e2 /gcc
parentb258707c7efd72e380f3b95d70208a9d2975a095 (diff)
downloadgcc-a3579a47d1dc8e565bf000e98468066dfe8cf795.zip
gcc-a3579a47d1dc8e565bf000e98468066dfe8cf795.tar.gz
gcc-a3579a47d1dc8e565bf000e98468066dfe8cf795.tar.bz2
(find_basic_blocks): When starting new basic block for a CALL_INSN in the presence of nonlocal labels...
(find_basic_blocks): When starting new basic block for a CALL_INSN in the presence of nonlocal labels, don't get confused with following CLOBBER. (flow_analysis): Use same logic as find_basic_block to see when the insn after a CALL_INSN starts a new basic block. From-SVN: r6097
Diffstat (limited to 'gcc')
-rw-r--r--gcc/flow.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index d230708..f293d2d 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -341,10 +341,17 @@ flow_analysis (f, nregs, file)
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
- && nonlocal_label_list != 0)
+ && nonlocal_label_list != 0
+ /* Ignore a CLOBBER after a CALL_INSN here. */
+ && ! (code == INSN
+ && GET_CODE (PATTERN (insn)) == CLOBBER))
|| prev_code == BARRIER)))
i++;
- if (code != NOTE)
+ if (code != NOTE
+ /* Skip a CLOBBER after a CALL_INSN. See similar code in
+ find_basic_blocks. */
+ && ! (prev_code == CALL_INSN
+ && code == INSN && GET_CODE (PATTERN (insn)) == CLOBBER))
prev_code = code;
}
}
@@ -431,7 +438,11 @@ find_basic_blocks (f, nonlocal_label_list)
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
- && nonlocal_label_list != 0)
+ && nonlocal_label_list != 0
+ /* Ignore if CLOBBER since we consider this
+ part of the CALL. See below. */
+ && ! (code == INSN
+ && GET_CODE (PATTERN (insn)) == CLOBBER))
|| prev_code == BARRIER)))
{
basic_block_head[++i] = insn;