diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1999-03-22 13:11:31 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1999-03-22 13:11:31 +0000 |
commit | ce9d4c6d80126b0d4549e80ddd92bfab017d22f4 (patch) | |
tree | 3dc71ee0033d2efbf9c8a4e8c88dd81a231e3a57 /gcc/rtl.c | |
parent | d3c29f99efaa2162cc444dc66c8c488f31dfa88d (diff) | |
download | gcc-ce9d4c6d80126b0d4549e80ddd92bfab017d22f4.zip gcc-ce9d4c6d80126b0d4549e80ddd92bfab017d22f4.tar.gz gcc-ce9d4c6d80126b0d4549e80ddd92bfab017d22f4.tar.bz2 |
rtl.h (shallow_copy_rtx): Declare.
* 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
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -488,6 +488,28 @@ copy_most_rtx (orig, may_share) } 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; +} /* Subroutines of read_rtx. */ |