diff options
| author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-10 05:48:40 +0000 |
|---|---|---|
| committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-10 05:48:40 +0000 |
| commit | 75bfac32e0413e451b515790f2b85f0f42f48bca (patch) | |
| tree | bef8339a2300fe6163aecfbb335441279c09169a | |
| parent | 3b2168bc05d2f19ebfb48bf61c819fbbe41db188 (diff) | |
| download | ppe42-gcc-75bfac32e0413e451b515790f2b85f0f42f48bca.tar.gz ppe42-gcc-75bfac32e0413e451b515790f2b85f0f42f48bca.zip | |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33814 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/flow.c | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e91f0b2ed7e..ea8972bdb6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2000-05-09 Richard Henderson <rth@cygnus.com> + * 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. + +2000-05-09 Richard Henderson <rth@cygnus.com> + * calls.c (expand_call): Increment currently_expanding_call before calling optimize_tail_recursion. diff --git a/gcc/flow.c b/gcc/flow.c index f5287802254..239c70f4d30 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 { |

