Commit d1d3c9a6 by Jan Hubicka Committed by Jan Hubicka

regrename.c (do_replace, [...]): Update register attributes.

	* regrename.c (do_replace, find_oldest_value_reg,
	copyprop_hardreg_forward_1): Update register attributes.

From-SVN: r62509
parent afb6c265
Fri Feb 7 02:18:57 CET 2003 Jan Hubicka <jh@suse.cz>
* regrename.c (do_replace, find_oldest_value_reg,
copyprop_hardreg_forward_1): Update register attributes.
2003-02-06 Vladimir Makarov <vmakarov@redhat.com> 2003-02-06 Vladimir Makarov <vmakarov@redhat.com>
* genautomata.c (VLA_PTR_CREATE, VLA_PTR_EXPAND, VLA_PTR_ADD, * genautomata.c (VLA_PTR_CREATE, VLA_PTR_EXPAND, VLA_PTR_ADD,
......
...@@ -377,9 +377,12 @@ do_replace (chain, reg) ...@@ -377,9 +377,12 @@ do_replace (chain, reg)
while (chain) while (chain)
{ {
unsigned int regno = ORIGINAL_REGNO (*chain->loc); unsigned int regno = ORIGINAL_REGNO (*chain->loc);
struct reg_attrs * attr = REG_ATTRS (*chain->loc);
*chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg); *chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
if (regno >= FIRST_PSEUDO_REGISTER) if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno; ORIGINAL_REGNO (*chain->loc) = regno;
REG_ATTRS (*chain->loc) = attr;
chain = chain->next_use; chain = chain->next_use;
} }
} }
...@@ -1393,6 +1396,7 @@ find_oldest_value_reg (class, reg, vd) ...@@ -1393,6 +1396,7 @@ find_oldest_value_reg (class, reg, vd)
regno))) regno)))
{ {
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg); ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
REG_ATTRS (new) = REG_ATTRS (reg);
return new; return new;
} }
} }
...@@ -1686,6 +1690,7 @@ copyprop_hardreg_forward_1 (bb, vd) ...@@ -1686,6 +1690,7 @@ copyprop_hardreg_forward_1 (bb, vd)
if (validate_change (insn, &SET_SRC (set), new, 0)) if (validate_change (insn, &SET_SRC (set), new, 0))
{ {
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src); ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src);
REG_ATTRS (new) = REG_ATTRS (src);
if (rtl_dump_file) if (rtl_dump_file)
fprintf (rtl_dump_file, fprintf (rtl_dump_file,
"insn %u: replaced reg %u with %u\n", "insn %u: replaced reg %u with %u\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment