2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2024-12-29 23:15:55 +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:
Jeffrey A Law 1999-04-09 01:23:05 +00:00 committed by Jeff Law
parent 10ef53b1ab
commit abb3f0a989
2 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,12 @@
Thu Apr 8 19:20:18 1999 Jeffrey A Law (law@cygnus.com) 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.c (flush_hash_table): New function.
(cse_insn): Flush the hash table when we encounter a volatile asm. (cse_insn): Flush the hash table when we encounter a volatile asm.
(cse_basic_block): Use flush_hash_table instead of doing it (cse_basic_block): Use flush_hash_table instead of doing it

View File

@ -1555,12 +1555,21 @@ delete_unreachable_blocks ()
basic_block c = BASIC_BLOCK (i); basic_block c = BASIC_BLOCK (i);
edge s; edge s;
/* We only need care for simple unconditional jumps, which implies /* We care about simple conditional or unconditional jumps with
a single successor. */ 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 if ((s = b->succ) != NULL
&& s->succ_next == NULL && s->succ_next == NULL
&& s->dest == c && s->dest == c)
&& ! (s->flags & EDGE_FALLTHRU))
tidy_fallthru_edge (s, b, c); tidy_fallthru_edge (s, b, c);
} }
@ -1823,15 +1832,9 @@ can_delete_label_p (label)
if (label == XEXP (x, 0)) if (label == XEXP (x, 0))
return 0; return 0;
/* User declared labels must be preserved, but we can /* User declared labels must be preserved. */
convert them into a NOTE instead. */
if (LABEL_NAME (label) != 0) if (LABEL_NAME (label) != 0)
{ return 0;
PUT_CODE (label, NOTE);
NOTE_LINE_NUMBER (label) = NOTE_INSN_DELETED_LABEL;
NOTE_SOURCE_FILE (label) = 0;
return 0;
}
return 1; return 1;
} }