This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Update register attributes in regrename
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Thu, 6 Feb 2003 12:32:36 +0100
- Subject: Update register attributes in regrename
regtested/bootstrapped on rtlopt branch, mainline testing in progress.
OK?
Thu Feb 6 12:30:58 CET 2003 Jan Hubicka <jh@suse.cz>
* regrename.c (do_replace, find_oldest_value_reg,
copyprop_hardreg_forward_1): Update register attributes.
Index: regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.59.2.5
diff -c -3 -p -r1.59.2.5 regrename.c
*** regrename.c 1 Jan 2003 17:22:28 -0000 1.59.2.5
--- regrename.c 6 Feb 2003 11:30:51 -0000
*************** do_replace (chain, reg)
*** 379,387 ****
--- 379,390 ----
while (chain)
{
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);
if (regno >= FIRST_PSEUDO_REGISTER)
ORIGINAL_REGNO (*chain->loc) = regno;
+ REG_ATTRS (*chain->loc) = attr;
chain = chain->next_use;
}
}
*************** find_oldest_value_reg (class, reg, vd)
*** 1395,1400 ****
--- 1398,1404 ----
regno)))
{
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
+ REG_ATTRS (new) = REG_ATTRS (reg);
return new;
}
}
*************** copyprop_hardreg_forward_1 (bb, vd)
*** 1688,1693 ****
--- 1692,1698 ----
if (validate_change (insn, &SET_SRC (set), new, 0))
{
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src);
+ REG_ATTRS (new) = REG_ATTRS (src);
if (rtl_dump_file)
fprintf (rtl_dump_file,
"insn %u: replaced reg %u with %u\n",