diff options
author | Jan Hubicka <jh@suse.cz> | 2001-10-30 12:13:49 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-10-30 11:13:49 +0000 |
commit | 73991d6ae74ffcb1fbd0dc4435c5aa7dc50947d7 (patch) | |
tree | 5aed4d117e8130cabea4a775fc620383c6f0edc9 /gcc/lcm.c | |
parent | 415c055a2acc0449e4c20fe22e703d7173de2629 (diff) | |
download | gcc-73991d6ae74ffcb1fbd0dc4435c5aa7dc50947d7.tar.gz |
lcm.c (optimize_mode_switching): Do not rebuild liveness information when no changes has been made.
* lcm.c (optimize_mode_switching): Do not rebuild liveness information
when no changes has been made.
* gcse.c (reg_set_bitmap): Turn into reg_set.
(modify_mem_list_set, canon_modify_mem_list_set)
(clear_modify_mem_tables, free_modify_mem_tables): New.
(gcse_main); Use free_modify_mem_tables.
(free_gcse_mem): Likewise; free the bitmaps.
(alloc_gcse_main): Initialize the bitmaps.
(canon_list_insert): Set canon_modify_mem_list_set.
(record_last_mem_set_info): Likewise; set modify_mem_list_set.
(compute_hash_table): Use clear_modify_mem_tables.
(reset_opr_set_tables): Likewise.
(oprs_not_set_p): reg_set_bitmap is regset.
(mark_set, mark_clobber): Likewise.
* df.h (DF_EQUIV_NOTES): New constant.
(df_insn_refs_record): Record uses inside or REG_EQUIV/EQUAL notes
when asked for.
* sched-rgn.c (CHECK_DEAD_NOTES): New constant.
(init_regions, schedule_insns): Conditionalize the checking
code by CHECK_DEAD_NOTES; avoid multiple calls to update_life_info.
From-SVN: r46634
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r-- | gcc/lcm.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c index 4f5d6927161..88e58410d81 100644 --- a/gcc/lcm.c +++ b/gcc/lcm.c @@ -1029,6 +1029,7 @@ optimize_mode_switching (file) int i, j; int n_entities; int max_num_modes = 0; + bool emited = false; #ifdef NORMAL_MODE /* Increment n_basic_blocks before allocating bb_info. */ @@ -1239,10 +1240,16 @@ optimize_mode_switching (file) mode_set = gen_sequence (); end_sequence (); + /* Do not bother to insert empty sequence. */ + if (GET_CODE (mode_set) == SEQUENCE + && !XVECLEN (mode_set, 0)) + continue; + /* If this is an abnormal edge, we'll insert at the end of the previous block. */ if (eg->flags & EDGE_ABNORMAL) { + emited = true; if (GET_CODE (src_bb->end) == JUMP_INSN) emit_insn_before (mode_set, src_bb->end); /* It doesn't make sense to switch to normal mode @@ -1313,10 +1320,16 @@ optimize_mode_switching (file) mode_set = gen_sequence (); end_sequence (); + /* Do not bother to insert empty sequence. */ + if (GET_CODE (mode_set) == SEQUENCE + && !XVECLEN (mode_set, 0)) + continue; + /* If this is an abnormal edge, we'll insert at the end of the previous block. */ if (eg->flags & EDGE_ABNORMAL) { + emited = true; if (GET_CODE (eg->src->end) == JUMP_INSN) emit_insn_before (mode_set, eg->src->end); else if (GET_CODE (eg->src->end) == INSN) @@ -1349,6 +1362,12 @@ optimize_mode_switching (file) mode_set = gen_sequence (); end_sequence (); + /* Do not bother to insert empty sequence. */ + if (GET_CODE (mode_set) == SEQUENCE + && !XVECLEN (mode_set, 0)) + continue; + + emited = true; if (GET_CODE (ptr->insn_ptr) == NOTE && (NOTE_LINE_NUMBER (ptr->insn_ptr) == NOTE_INSN_BASIC_BLOCK)) @@ -1376,6 +1395,9 @@ optimize_mode_switching (file) if (need_commit) commit_edge_insertions (); + 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 indicies we'd collected, and also need to |