mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-20 03:18:59 +08:00
flow.c (delete_unreachable_blocks): Do not require an edge to be marked with EDGE_FALLTHRU when...
* flow.c (delete_unreachable_blocks): Do not require an edge to be marked with EDGE_FALLTHRU when tidying an edge which connects consecutive basic blocks. * flow.c (can_delete_label_p): Do not convert a label into a deleted label here. From-SVN: r26306
This commit is contained in:
parent
10ef53b1ab
commit
abb3f0a989
@ -1,5 +1,12 @@
|
||||
Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* flow.c (delete_unreachable_blocks): Do not require an edge to
|
||||
be marked with EDGE_FALLTHRU when tidying an edge which connects
|
||||
consecutive basic blocks.
|
||||
|
||||
* flow.c (can_delete_label_p): Do not convert a label into a
|
||||
deleted label here.
|
||||
|
||||
* cse.c (flush_hash_table): New function.
|
||||
(cse_insn): Flush the hash table when we encounter a volatile asm.
|
||||
(cse_basic_block): Use flush_hash_table instead of doing it
|
||||
|
27
gcc/flow.c
27
gcc/flow.c
@ -1555,12 +1555,21 @@ delete_unreachable_blocks ()
|
||||
basic_block c = BASIC_BLOCK (i);
|
||||
edge s;
|
||||
|
||||
/* We only need care for simple unconditional jumps, which implies
|
||||
a single successor. */
|
||||
/* We care about simple conditional or unconditional jumps with
|
||||
a single successor.
|
||||
|
||||
If we had a conditional branch to the next instruction when
|
||||
find_basic_blocks was called, then there will only be one
|
||||
out edge for the block which ended with the conditional
|
||||
branch (since we do not create duplicate edges).
|
||||
|
||||
Furthermore, because we create the edge for the jump to the
|
||||
label before the fallthrough edge, we will only see the
|
||||
jump edge. So we do not want to check that the edge is a
|
||||
FALLTHRU edge. */
|
||||
if ((s = b->succ) != NULL
|
||||
&& s->succ_next == NULL
|
||||
&& s->dest == c
|
||||
&& ! (s->flags & EDGE_FALLTHRU))
|
||||
&& s->dest == c)
|
||||
tidy_fallthru_edge (s, b, c);
|
||||
}
|
||||
|
||||
@ -1823,15 +1832,9 @@ can_delete_label_p (label)
|
||||
if (label == XEXP (x, 0))
|
||||
return 0;
|
||||
|
||||
/* User declared labels must be preserved, but we can
|
||||
convert them into a NOTE instead. */
|
||||
/* User declared labels must be preserved. */
|
||||
if (LABEL_NAME (label) != 0)
|
||||
{
|
||||
PUT_CODE (label, NOTE);
|
||||
NOTE_LINE_NUMBER (label) = NOTE_INSN_DELETED_LABEL;
|
||||
NOTE_SOURCE_FILE (label) = 0;
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user