diff options
author | Jan Hubicka <jh@suse.cz> | 2001-10-29 12:45:45 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-10-29 11:45:45 +0000 |
commit | 473fb060f3609f51fc4e1711297f3600e15ed7c0 (patch) | |
tree | 91cc2113797ecc74514f6de4826f7f7c19e0e549 /gcc/cfgcleanup.c | |
parent | 4fdaa8786fe048b12597a2055370044e16a37e1f (diff) | |
download | gcc-473fb060f3609f51fc4e1711297f3600e15ed7c0.zip gcc-473fb060f3609f51fc4e1711297f3600e15ed7c0.tar.gz gcc-473fb060f3609f51fc4e1711297f3600e15ed7c0.tar.bz2 |
basic-block.h (purge_all_dead_edges): Add update_life_p argument.
* 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.
From-SVN: r46605
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 bd5a3ed..6919e0f 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); |