aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1999-02-22 13:34:33 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-02-22 13:34:33 +0000
commita4c6502a661a4d0a6e157e118c7be4178176f743 (patch)
tree0b06b500febf846a9be290f5b44393399d824d50 /gcc/rtl.c
parent44768aae76f6fe77bea11f4a0e5fcf24d65c8f8c (diff)
downloadgcc-a4c6502a661a4d0a6e157e118c7be4178176f743.zip
gcc-a4c6502a661a4d0a6e157e118c7be4178176f743.tar.gz
gcc-a4c6502a661a4d0a6e157e118c7be4178176f743.tar.bz2
cse.c (dump_class): New function.
* cse.c (dump_class): New function. (invalidate_memory): Fix typo in comment. * function.c (temp_slot): Add an alias set field. (assign_stack_temp): Only reuse slots if they will have the same alias set as before. (combine_temp_slots): Don't combine if -fstrict-aliasing; that's unsafe. * rtl.c (copy_rtx): Copy all the flags (in particular, MEM_SCALAR_P). From-SVN: r25372
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 33cf0cb..b4d870d 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -319,11 +319,24 @@ copy_rtx (orig)
}
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;
+
+ /* Copy the various flags, and other information. We assume that
+ all fields need copying, and then clear the fields that should
+ not be copied. That is the sensible default behavior, and forces
+ us to explicitly document why we are *not* copying a flag. */
+ bcopy (orig, copy, sizeof (struct rtx_def) - sizeof (rtunion));
+
+ /* We do not copy the USED flag, which is used as a mark bit during
+ walks over the RTL. */
+ copy->used = 0;
+
+ /* We do not copy JUMP, CALL, or FRAME_RELATED for INSNs. */
+ if (GET_RTX_CLASS (code) == 'i')
+ {
+ copy->jump = 0;
+ copy->call = 0;
+ copy->frame_related = 0;
+ }
format_ptr = GET_RTX_FORMAT (GET_CODE (copy));