aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-05-09 22:48:40 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-05-09 22:48:40 -0700
commit47095bfc99080f1a17942390e8815a07efcbf12c (patch)
treebef8339a2300fe6163aecfbb335441279c09169a /gcc/flow.c
parent840e7b5148eb5894ee29e8d6267b56903412eeac (diff)
downloadgcc-47095bfc99080f1a17942390e8815a07efcbf12c.zip
gcc-47095bfc99080f1a17942390e8815a07efcbf12c.tar.gz
gcc-47095bfc99080f1a17942390e8815a07efcbf12c.tar.bz2
flow.c (find_basic_blocks_1): Do not delete the first bb_note we run across.
* flow.c (find_basic_blocks_1): Do not delete the first bb_note we run across. (create_basic_block): Use reorder_insns to move an existing bb_note to the correct place. From-SVN: r33814
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index f528780..239c70f 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -584,8 +584,8 @@ find_basic_blocks_1 (f)
{
if (bb_note == NULL_RTX)
bb_note = insn;
-
- next = flow_delete_insn (insn);
+ else
+ next = flow_delete_insn (insn);
}
break;
}
@@ -780,13 +780,18 @@ create_basic_block (index, head, end, bb_note)
{
/* If we found an existing note, thread it back onto the chain. */
+ rtx after;
+
if (GET_CODE (head) == CODE_LABEL)
- add_insn_after (bb_note, head);
+ after = head;
else
{
- add_insn_before (bb_note, head);
+ after = PREV_INSN (head);
head = bb_note;
}
+
+ if (after != bb_note && NEXT_INSN (after) != bb_note)
+ reorder_insns (bb_note, bb_note, after);
}
else
{