Commit 11e5489b by Richard Henderson Committed by Richard Henderson

* rtl.c (shallow_copy_rtx): Use memcpy for the entire node.

From-SVN: r58102
parent 8fa7c5af
2002-10-13 Richard Henderson <rth@redhat.com>
* rtl.c (shallow_copy_rtx): Use memcpy for the entire node.
2002-10-12 Neil Booth <neil@daikokuya.co.uk> 2002-10-12 Neil Booth <neil@daikokuya.co.uk>
PR preprocessor/7862 PR preprocessor/7862
......
...@@ -387,19 +387,12 @@ rtx ...@@ -387,19 +387,12 @@ rtx
shallow_copy_rtx (orig) shallow_copy_rtx (orig)
rtx orig; rtx orig;
{ {
int i;
RTX_CODE code = GET_CODE (orig); RTX_CODE code = GET_CODE (orig);
rtx copy = rtx_alloc (code); size_t n = GET_RTX_LENGTH (code);
rtx copy = ggc_alloc_rtx (n);
PUT_MODE (copy, GET_MODE (orig));
RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
RTX_FLAG (copy, integrated) = RTX_FLAG (orig, integrated);
RTX_FLAG (copy, frame_related) = RTX_FLAG (orig, frame_related);
for (i = 0; i < GET_RTX_LENGTH (code); i++) memcpy (copy, orig,
copy->fld[i] = orig->fld[i]; sizeof (struct rtx_def) + sizeof (rtunion) * (n - 1));
return copy; return copy;
} }
......
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