summaryrefslogtreecommitdiffstats
path: root/gcc/lcm.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-28 10:11:01 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-28 10:11:01 +0000
commit308f9b7994783bcf7867e5c06fe3a88bd01d847f (patch)
tree8d5067250a1945f16e7442da0ebfa33bcd46322d /gcc/lcm.c
parentea5356cdbd7b2cbdb81a2f971be4ca11ce8fdda2 (diff)
downloadppe42-gcc-308f9b7994783bcf7867e5c06fe3a88bd01d847f.tar.gz
ppe42-gcc-308f9b7994783bcf7867e5c06fe3a88bd01d847f.zip
* basic-block.h (BB_REACHABLE): Renumber.
(BB_DIRTY, BB_NEW): New flags. (clear_bb_flags): Declare. (update_life_info_in_dirty_blocks): Declare. * cfg.c (clear_bb_flags): New function. * cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW. * emit-rtl.c (add_insn_after, add_insn_before, remove_insn, reorder_insns, emit_insn_after): Mark block as dirty. * flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS. (update_life_info_in_dirty_blocks): New function. * recog.c (apply_change_group): Dirtify block. * cse.c (cse_insn): Reorder emitting of jump insn to keep cfg consistent. * gcse.c (delete_null_pointer_checks): Likewise. * toplev.c (dump_file_index): Move cse2 after bp, add DFI_null (dump_file_info): Similary. (rest_of_compilation): Avoid most of CFG rebuilds; do first if converision after null pointer checks, do cse2 after branch prediction; avoid full liveness rebuild after initializing subregs. * invoke.texi (-d options): Document -du, renumber. * cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE. (notice_new_block): Do not set BB_UPDATE_LIFE. (try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, merge_blocks, try_crossjump_to_edge): Likewise. (try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks. * cfgrtl.c (merge_blocks_nomove): Copy b's flags to a. * ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill. (merge_of_block): Do not use life_data_ok. (find_if_case_1): Do not use SET_UPDATE_LIFE. (if_convert): Use BB_DIRTY mechanizm to update life. * lcm.c (optimize_mode_switching): Update update_life_info_in_dirty_blocks git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50127 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r--gcc/lcm.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 0a8a7cef9a1..f64c7ada7d4 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -1031,6 +1031,7 @@ optimize_mode_switching (file)
int max_num_modes = 0;
bool emited = false;
+ clear_bb_flags ();
#ifdef NORMAL_MODE
/* Increment n_basic_blocks before allocating bb_info. */
n_basic_blocks++;
@@ -1398,16 +1399,11 @@ optimize_mode_switching (file)
if (!need_commit && !emited)
return 0;
- /* Ideally we'd figure out what blocks were affected and start from
- there, but this is enormously complicated by commit_edge_insertions,
- which would screw up any indices we'd collected, and also need to
- be involved in the update. Bail and recompute global life info for
- everything. */
-
- allocate_reg_life_data ();
- update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
- (PROP_DEATH_NOTES | PROP_KILL_DEAD_CODE
- | PROP_SCAN_DEAD_CODE | PROP_REG_INFO));
+ max_regno = max_reg_num ();
+ allocate_reg_info (max_regno, FALSE, FALSE);
+ update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
+ (PROP_DEATH_NOTES | PROP_KILL_DEAD_CODE
+ | PROP_SCAN_DEAD_CODE));
return 1;
}
OpenPOWER on IntegriCloud