diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-29 11:45:45 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-29 11:45:45 +0000 |
commit | 0922c91230e655839f2bc0929c984e36f25f73a2 (patch) | |
tree | 91cc2113797ecc74514f6de4826f7f7c19e0e549 /gcc/cfgcleanup.c | |
parent | ec8a67ba1478ca1ebbb0a647d58ed80c1b5a6a39 (diff) | |
download | gcc-0922c91230e655839f2bc0929c984e36f25f73a2.tar.gz |
* basic-block.h (purge_all_dead_edges): Add update_life_p argument.
* cfgcleanup.c (merge_blocks): Update the life flag after merging;
fix warning.
* cfgrtl.c (purge_all_dead_edges): Allow updating of liveness.
(life_analysis): call purge_all_dead_edges after deleting noops.
(delete_noop_move): Do not purge CFG.
* toplev.c (rest_of_compilation): Update purge_all_dead_edges call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index bd5a3ed95e9..6919e0fdb14 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -433,6 +433,12 @@ merge_blocks (e, b, c, mode) /* If B has a fallthru edge to C, no need to move anything. */ if (e->flags & EDGE_FALLTHRU) { + /* We need to update liveness in case C already has broken liveness + or B ends by conditional jump to next instructions that will be + removed. */ + if ((BB_FLAGS (c) & BB_UPDATE_LIFE) + || GET_CODE (b->end) == JUMP_INSN) + BB_SET_FLAG (b, BB_UPDATE_LIFE); merge_blocks_nomove (b, c); update_forwarder_flag (b); @@ -490,7 +496,7 @@ merge_blocks (e, b, c, mode) if (b_has_incoming_fallthru) { - rtx bb; + basic_block bb; if (b_fallthru_edge->src == ENTRY_BLOCK_PTR) return false; bb = force_nonfallthru (b_fallthru_edge); |