aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-04-09 01:23:05 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-08 19:23:05 -0600
commitabb3f0a989ba263258704a50ca8bc5be8a35c40d (patch)
tree7e232abfa4411d0183d3a023adff0be5814cf8b6 /gcc/flow.c
parent10ef53b1ab73e5ed13a94c27d4fd1acb90a53fdd (diff)
downloadgcc-abb3f0a989ba263258704a50ca8bc5be8a35c40d.zip
gcc-abb3f0a989ba263258704a50ca8bc5be8a35c40d.tar.gz
gcc-abb3f0a989ba263258704a50ca8bc5be8a35c40d.tar.bz2
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
Diffstat (limited to 'gcc/flow.c')
-rw-r--r--gcc/flow.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/gcc/flow.c b/gcc/flow.c
index 072d208..daf3571 100644
--- a/gcc/flow.c
+++ b/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;
}