diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2001-09-21 15:34:54 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2001-09-21 15:34:54 +0000 |
commit | f62ce55b12b8148b86f6f103179e9e9f3f1054dd (patch) | |
tree | aaeb21d8ee48338e5538f28d75ab830d375fe6eb /gcc | |
parent | 97a4f671ac49911f9773d1063263deb00b1347b5 (diff) | |
download | gcc-f62ce55b12b8148b86f6f103179e9e9f3f1054dd.zip gcc-f62ce55b12b8148b86f6f103179e9e9f3f1054dd.tar.gz gcc-f62ce55b12b8148b86f6f103179e9e9f3f1054dd.tar.bz2 |
cfgcleanup.c (merge_blocks_move_successor_nojumps): Don't leave ADDR_VEC or ADDR_DIFF_VEC jump insns as part of the basic block...
* cfgcleanup.c (merge_blocks_move_successor_nojumps): Don't leave
ADDR_VEC or ADDR_DIFF_VEC jump insns as part of the basic block
once merging is complete.
From-SVN: r45730
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b0ce893..3c90282 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +21-09-2001 Richard Earnshaw (reanrsha@arm.com) + + * cfgcleanup.c (merge_blocks_move_successor_nojumps): Don't leave + ADDR_VEC or ADDR_DIFF_VEC jump insns as part of the basic block + once merging is complete. + Fri Sep 21 11:20:12 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * integrate.c (allocate_initial_values): Eliminate unused arg warning. diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index a3ddcac..c52d255 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -319,8 +319,9 @@ static void merge_blocks_move_successor_nojumps (a, b) basic_block a, b; { - rtx barrier; + rtx barrier, real_b_end; + real_b_end = b->end; barrier = NEXT_INSN (b->end); /* Recognize a jump table following block B. */ @@ -331,6 +332,8 @@ merge_blocks_move_successor_nojumps (a, b) && (GET_CODE (PATTERN (NEXT_INSN (barrier))) == ADDR_VEC || GET_CODE (PATTERN (NEXT_INSN (barrier))) == ADDR_DIFF_VEC)) { + /* Temporarily add the table jump insn to b, so that it will also + be moved to the correct location. */ b->end = NEXT_INSN (barrier); barrier = NEXT_INSN (b->end); } @@ -351,6 +354,9 @@ merge_blocks_move_successor_nojumps (a, b) /* Scramble the insn chain. */ reorder_insns_nobb (b->head, b->end, a->end); + /* Restore the real end of b. */ + b->end = real_b_end; + /* Now blocks A and B are contiguous. Merge them. */ merge_blocks_nomove (a, b); |