diff options
author | Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> | 1998-10-07 03:50:05 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-07 03:50:05 -0600 |
commit | d143a8907abfc4e4480c67dd127db1596ffd4f9c (patch) | |
tree | 9893083db6aa42f9eba74e6a249f517dd5cf5d96 | |
parent | 237228c033a9e9ee5fb145dbc961a41badcbda92 (diff) | |
download | gcc-d143a8907abfc4e4480c67dd127db1596ffd4f9c.zip gcc-d143a8907abfc4e4480c67dd127db1596ffd4f9c.tar.gz gcc-d143a8907abfc4e4480c67dd127db1596ffd4f9c.tar.bz2 |
jump.c (duplicate_loop_exit_test): Strip REG_WAS_0 notes off all insns we're going to copy.
* 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.
From-SVN: r22887
-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 c47326d..e176a7e 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. @@ -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 793c9ac..cd882df 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) { |