From abb3f0a989ba263258704a50ca8bc5be8a35c40d Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Fri, 9 Apr 1999 01:23:05 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/flow.c | 27 +++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1ed42707ed..d06c3a4e5d9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/flow.c b/gcc/flow.c index 072d2089c79..daf357114bc 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; }