aboutsummaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorChristian Bruel <chrbr@gcc.gnu.org>2009-09-15 15:15:51 +0200
committerChristian Bruel <chrbr@gcc.gnu.org>2009-09-15 15:15:51 +0200
commitaf94453d356ddfd1087c505442e6c74e7b8974f7 (patch)
tree1d5dc639c5f8dc99a27155272a568a39dae7b788 /gcc/regrename.c
parent384ed84dc00e62af7bb69497fd9c34225edf9b55 (diff)
downloadgcc-af94453d356ddfd1087c505442e6c74e7b8974f7.zip
gcc-af94453d356ddfd1087c505442e6c74e7b8974f7.tar.gz
gcc-af94453d356ddfd1087c505442e6c74e7b8974f7.tar.bz2
Update REG_DEAD notes
From-SVN: r151720
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 03aba80..68d0874 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -376,11 +376,26 @@ do_replace (struct du_chain *chain, int reg)
INSN_VAR_LOCATION_LOC (chain->insn) = gen_rtx_UNKNOWN_VAR_LOC ();
else
{
+ rtx note;
+
*chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno;
REG_ATTRS (*chain->loc) = attr;
REG_POINTER (*chain->loc) = reg_ptr;
+
+ for (note = REG_NOTES (chain->insn); note; note = XEXP (note, 1))
+ {
+ if (REG_NOTE_KIND (note) == REG_DEAD
+ || REG_NOTE_KIND (note) == REG_UNUSED)
+ {
+ rtx reg = XEXP (note, 0);
+ gcc_assert (HARD_REGISTER_P (reg));
+
+ if (REGNO (reg) == base_regno)
+ XEXP (note, 0) = *chain->loc;
+ }
+ }
}
df_insn_rescan (chain->insn);