* rtl.h (shallow_copy_rtx): Declare.
* rtl.c (shallow_copy_rtx): New function.
* reload.c (find_reloads_toplev): Use shallow_copy_rtx instead of
copy_rtx.
From-SVN: r25897
+Mon Mar 22 21:08:59 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * rtl.h (shallow_copy_rtx): Declare.
+ * rtl.c (shallow_copy_rtx): New function.
+ * reload.c (find_reloads_toplev): Use shallow_copy_rtx instead of
+ copy_rtx.
+
Mon Mar 22 10:44:33 1999 Vladimir Makarov <vmakarov@tofu.to.cygnus.com>
* config/h8300/h8300.md (adjust_length): New attribute.
not to do the change. */
if (new_part != XEXP (x, i) && ! CONSTANT_P (new_part) && ! copied)
{
- x = copy_rtx (x);
+ x = shallow_copy_rtx (x);
copied = 1;
}
XEXP (x, i) = new_part;
}
return copy;
}
+
+/* Create a new copy of an rtx. Only copy just one level. */
+rtx
+shallow_copy_rtx (orig)
+ rtx orig;
+{
+ register int i;
+ register char *format_ptr;
+ register RTX_CODE code = GET_CODE (orig);
+ register rtx copy = rtx_alloc (code);
+
+ PUT_MODE (copy, GET_MODE (orig));
+ copy->in_struct = orig->in_struct;
+ copy->volatil = orig->volatil;
+ copy->unchanging = orig->unchanging;
+ copy->integrated = orig->integrated;
+
+ for (i = 0; i < GET_RTX_LENGTH (code); i++)
+ copy->fld[i] = orig->fld[i];
+
+ return copy;
+}
\f
/* Subroutines of read_rtx. */
extern rtx copy_rtx PROTO((rtx));
extern rtx copy_rtx_if_shared PROTO((rtx));
extern rtx copy_most_rtx PROTO((rtx, rtx));
+extern rtx shallow_copy_rtx PROTO((rtx));
extern rtvec gen_rtvec_v PROTO((int, rtx *));
extern rtvec gen_rtvec_vv PROTO((int, rtunion *));
extern rtx gen_reg_rtx PROTO((enum machine_mode));