diff options
author | Bernd Schmidt <bernds@redhat.co.uk> | 2000-11-10 10:44:42 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2000-11-10 10:44:42 +0000 |
commit | 6fb85418122c9a3bde93c7db8e185c2d0f53413a (patch) | |
tree | 5f901a243b56c087804c26f29d2b686afd16cd45 | |
parent | 108d96a7f1a2eea7e3b9c1ec7750d1367739aca3 (diff) | |
download | gcc-6fb85418122c9a3bde93c7db8e185c2d0f53413a.zip gcc-6fb85418122c9a3bde93c7db8e185c2d0f53413a.tar.gz gcc-6fb85418122c9a3bde93c7db8e185c2d0f53413a.tar.bz2 |
Fix REG_INC note handling in register renamer.
From-SVN: r37364
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/regrename.c | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b8625b7..4ff995e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-11-09 Bernd Schmidt <bernds@redhat.co.uk> + + * regrename.c (build_def_use): Mark contents of REG_INC notes as + needing replacement. + 2000-11-09 Jan van Male <jan.vanmale@fenk.wau.nl> * c-tree.texi: Fix typos. diff --git a/gcc/regrename.c b/gcc/regrename.c index 5078585..b3aa6c2 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -714,10 +714,15 @@ build_def_use (bb, regs_used) scan_rtx (insn, loc, class, mark_read, type); } - /* Step 4: Close chains for registers that die here. */ + /* Step 4: Close chains for registers that die here. + Also record updates for REG_INC notes. */ for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) - if (REG_NOTE_KIND (note) == REG_DEAD) - scan_rtx (insn, &XEXP (note, 0), NO_REGS, terminate_dead, OP_IN); + { + if (REG_NOTE_KIND (note) == REG_DEAD) + scan_rtx (insn, &XEXP (note, 0), NO_REGS, terminate_dead, OP_IN); + else if (REG_NOTE_KIND (note) == REG_INC) + scan_rtx (insn, &XEXP (note, 0), ALL_REGS, mark_read, OP_INOUT); + } /* Step 4B: If this is a call, any chain live at this point requires a caller-saved reg. */ |