diff options
author | Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> | 1998-10-16 00:08:51 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-15 18:08:51 -0600 |
commit | 6764d250ec661945176113c1e58262884c02dc9a (patch) | |
tree | 35e9d178ac30fae30efb3a75fce6b7fa5ed815f3 /gcc/flow.c | |
parent | 913135dfc2dce8e152ff5864dce5fffaca4ce1c5 (diff) | |
download | gcc-6764d250ec661945176113c1e58262884c02dc9a.zip gcc-6764d250ec661945176113c1e58262884c02dc9a.tar.gz gcc-6764d250ec661945176113c1e58262884c02dc9a.tar.bz2 |
flow.c (life_analysis_1): Do not clobber regs_ever_live after reload.
* flow.c (life_analysis_1): Do not clobber regs_ever_live after
reload. Never perform rescans of the insn chain after reload.
(propagate_block): Do not delete insn or create new autoinc addressing
modes after reload.
* jump.c (jump_optimize): Unconditionally use the code that was
previously conditional on PRESERVE_DEATH_INFO_REGNO_P.
* reload1.c (reload): When reloading is finished, delete all
REG_DEAD and REG_UNUSED notes.
(emit_reload_insns): Delete all code that was conditional on
PRESERVE_DEATH_INFO_REGNO_P.
(no_longer_dead_regs): Delete variable.
(reload_cse_delete_death_notes): Delete function.
(reload_cse_no_longer_dead): Delete function.
(reload_cse_regs_1): Delete all code to handle deletion of death
notes.
(reload_cse_noop_set_p): Likewise.
(reload_cse_simplify_set): Likewise.
(reload_cse_simplify_operands): Likewise.
(reload_cse_move2add): Likewise.
* reorg.c (used_spill_regs): Delete declaration.
(max_label_num_after_reload): Delete declaration.
(find_dead_or_set_registers): Don't assume that spill regs are
dead at a CODE_LABEL.
* rtlanal.c (dead_or_set_regno_p): Death notes are always accurate,
even after reload.
* sched.c (sched_analyze_insn): Likewise.
(update_flow_info): Likewise.
* haifa-sched.c (sched_analyze_insn): Likewise.
(update_flow_info): Likewise.
* tm.texi (PRESERVE_DEATH_INFO_REGNO_P): Delete documentation.
* toplev.c (max_label_num_after_reload): Delete variable.
(rest_of_compilation): Don't set max_label_num_after_reload.
Call life_analysis after reload_cse_regs if optimizing.
* config/gmicro/gmicro.h: Delete comment referring to
PRESERVE_DEATH_INFO_REGNO_P.
* config/i386/i386.h: Likewise.
* config/m88k/m88k.h: Likewise.
* config/m32r/m32r.h (PRESERVE_DEATH_INFO_REGNO_P): Delete definition.
* config/sh/sh.h: Likewise.
Accurate REG_DEAD notes after reload.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r23120
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -1347,6 +1347,7 @@ life_analysis_1 (f, nregs) possibly excluding those that are used after they are set. */ regset *basic_block_significant; register int i; + char save_regs_ever_live[FIRST_PSEUDO_REGISTER]; struct obstack flow_obstack; @@ -1354,6 +1355,16 @@ life_analysis_1 (f, nregs) max_regno = nregs; + /* The post-reload life analysis have (on a global basis) the same registers + live as was computed by reload itself. + + Otherwise elimination offsets and such may be incorrect. + + Reload will make some registers as live even though they do not appear + in the rtl. */ + if (reload_completed) + bcopy (regs_ever_live, save_regs_ever_live, (sizeof (regs_ever_live))); + bzero (regs_ever_live, sizeof regs_ever_live); /* Allocate and zero out many data structures @@ -1436,7 +1447,8 @@ life_analysis_1 (f, nregs) basic_block_live_at_end[i], 0, j, { consider = 1; - if (REGNO_REG_SET_P (basic_block_significant[i], j)) + if (!reload_completed + && REGNO_REG_SET_P (basic_block_significant[i], j)) { must_rescan = 1; goto done; @@ -1581,6 +1593,9 @@ life_analysis_1 (f, nregs) } }); + /* Restore regs_ever_live that was provided by reload. */ + if (reload_completed) + bcopy (save_regs_ever_live, regs_ever_live, (sizeof (regs_ever_live))); free_regset_vector (basic_block_live_at_end, n_basic_blocks); free_regset_vector (basic_block_new_live_at_end, n_basic_blocks); @@ -1792,7 +1807,7 @@ propagate_block (old, first, last, final, significant, bnum) "delete" it by turning it into a NOTE of type NOTE_INSN_DELETED. We could really delete it with delete_insn, but that can cause trouble for first or last insn in a basic block. */ - if (final && insn_is_dead) + if (!reload_completed && final && insn_is_dead) { PUT_CODE (insn, NOTE); NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; @@ -1832,7 +1847,8 @@ propagate_block (old, first, last, final, significant, bnum) register rtx x = single_set (insn); /* Does this instruction increment or decrement a register? */ - if (final && x != 0 + if (!reload_completed + && final && x != 0 && GET_CODE (SET_DEST (x)) == REG && (GET_CODE (SET_SRC (x)) == PLUS || GET_CODE (SET_SRC (x)) == MINUS) |