diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-07 09:50:05 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-07 09:50:05 +0000 |
commit | 7665c3764e7c185884ef4cfb01a2225d1c04a17b (patch) | |
tree | 9893083db6aa42f9eba74e6a249f517dd5cf5d96 | |
parent | ece3ccfd27eb29b0be48e8b2918dc78e14ff1988 (diff) | |
download | ppe42-gcc-7665c3764e7c185884ef4cfb01a2225d1c04a17b.tar.gz ppe42-gcc-7665c3764e7c185884ef4cfb01a2225d1c04a17b.zip |
* jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all
insns we're going to copy.
* regclass.c (reg_scan_mark_refs): Don't test X for NULL_RTX.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22887 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/jump.c | 17 | ||||
-rw-r--r-- | gcc/regclass.c | 7 |
3 files changed, 12 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c47326d5608..e176a7e3488 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -21,6 +21,10 @@ Wed Oct 7 02:27:52 1998 Jeffrey A Law (law@cygnus.com) Wed Oct 7 01:08:43 1998 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE> + * jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all + insns we're going to copy. + * regclass.c (reg_scan_mark_refs): Don't test X for NULL_RTX. + * loop.c (count_one_set): Add prototype. * caller-save.c (restore_referenced_regs): Lose mode argument. diff --git a/gcc/jump.c b/gcc/jump.c index 77c3556a8b7..967981aef44 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -480,12 +480,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) remove_death (dreg, trial); break; } -#ifdef PRESERVE_DEATH_INFO_REGNO_P - /* Deleting insn could lose a death-note for SREG - so don't do it if final needs accurate - death-notes. */ - if (PRESERVE_DEATH_INFO_REGNO_P (sreg) - && (trial = find_regno_note (insn, REG_DEAD, sreg))) + + /* Deleting insn could lose a death-note for SREG. */ + if ((trial = find_regno_note (insn, REG_DEAD, sreg))) { /* Change this into a USE so that we won't emit code for it, but still can keep the note. */ @@ -497,7 +494,6 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) XEXP (trial, 1) = NULL_RTX; } else -#endif delete_insn (insn); } } @@ -2434,8 +2430,7 @@ duplicate_loop_exit_test (loop_start) has a REG_RETVAL or REG_LIBCALL note (hard to adjust) is a NOTE_INSN_LOOP_BEG because this means we have a nested loop is a NOTE_INSN_BLOCK_{BEG,END} because duplicating these notes - are not valid - + is not valid. We also do not do this if we find an insn with ASM_OPERANDS. While this restriction should not be necessary, copying an insn with @@ -2480,6 +2475,10 @@ duplicate_loop_exit_test (loop_start) break; case JUMP_INSN: case INSN: + /* The code below would grossly mishandle REG_WAS_0 notes, + so get rid of them here. */ + while ((p = find_reg_note (insn, REG_WAS_0, NULL_RTX)) != 0) + remove_note (insn, p); if (++num_insns > 20 || find_reg_note (insn, REG_RETVAL, NULL_RTX) || find_reg_note (insn, REG_LIBCALL, NULL_RTX) diff --git a/gcc/regclass.c b/gcc/regclass.c index 793c9ac050e..cd882df5cd1 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -1995,13 +1995,6 @@ reg_scan_mark_refs (x, insn, note_flag, min_regno) register rtx dest; register rtx note; - /* This can happen when scanning insns referenced by certain notes. - - It is unclear if we should be scanning such insns; until someone can - say for sure this seems like the safest fix. */ - if (x == NULL_RTX) - return; - code = GET_CODE (x); switch (code) { |