mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-25 03:55:32 +08:00
flow.c (reorder_basic_blocks): Account for barriers when writing over NEXT_INSN (last_bb->end).
* flow.c (reorder_basic_blocks): Account for barriers when writing over NEXT_INSN (last_bb->end). (verify_flow_info): Add check for missing barriers. From-SVN: r32545
This commit is contained in:
parent
24dc027c9a
commit
0edd203b8d
@ -1,3 +1,9 @@
|
||||
|
||||
2000-03-14 Jason Eckhardt <jle@cygnus.com>
|
||||
* flow.c (reorder_basic_blocks): Account for barriers when writing
|
||||
over NEXT_INSN (last_bb->end).
|
||||
(verify_flow_info): Add check for missing barriers.
|
||||
|
||||
2000-03-14 Greg McGary <gkm@gnu.org>
|
||||
|
||||
* c-lex.h (enum rid): Add RID_BOUNDED & RID_UNBOUNDED.
|
||||
|
22
gcc/flow.c
22
gcc/flow.c
@ -5785,6 +5785,7 @@ set_block_num (insn, bb)
|
||||
and NOTE_INSN_BASIC_BLOCK
|
||||
- check that all insns are in the basic blocks
|
||||
(except the switch handling code, barriers and notes)
|
||||
- check that all returns are followed by barriers
|
||||
|
||||
In future it can be extended check a lot of other stuff as well
|
||||
(reachability of basic blocks, life information, etc. etc.). */
|
||||
@ -5988,6 +5989,12 @@ verify_flow_info ()
|
||||
}
|
||||
}
|
||||
|
||||
if (GET_RTX_CLASS (GET_CODE (x)) == 'i'
|
||||
&& GET_CODE (x) == JUMP_INSN
|
||||
&& returnjump_p (x)
|
||||
&& ! (NEXT_INSN (x) && GET_CODE (NEXT_INSN (x)) == BARRIER))
|
||||
fatal_insn ("Return not followed by barrier", x);
|
||||
|
||||
x = NEXT_INSN (x);
|
||||
}
|
||||
|
||||
@ -7758,8 +7765,19 @@ reorder_basic_blocks ()
|
||||
BASIC_BLOCK (j) = tempbb;
|
||||
}
|
||||
}
|
||||
|
||||
NEXT_INSN (BASIC_BLOCK (n_basic_blocks - 1)->end) = last_insn;
|
||||
|
||||
{
|
||||
rtx xafter = skip_insns_between_block (BASIC_BLOCK (n_basic_blocks - 1),
|
||||
REORDER_SKIP_AFTER);
|
||||
if (xafter)
|
||||
NEXT_INSN (xafter) = last_insn;
|
||||
else
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
verify_flow_info ();
|
||||
#endif
|
||||
|
||||
for (i = 0; i < n_basic_blocks - 1; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user