summaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-07 00:18:48 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-07 00:18:48 +0000
commite7f75e1502da4fc0f07a193f76878efde483469a (patch)
tree6a6fcad1a0a0bc7ab5bf7d4105bb09ccee379fcb /gcc/rtl.c
parent92778b4a5964feb3f4d4f0562a2e69bf5e36a04d (diff)
downloadgcc-e7f75e1502da4fc0f07a193f76878efde483469a.tar.gz
* rtl.h (struct rtx_def): Update comments.
(RTL_FLAG_CHECK[12345678]): New. (rtl_check_failed_flag): Declare. (RTL_FLAG): New. (CLEAR_RTX_FLAGS): New. (flag access macros): Use RTL_FLAG_CHECK macros with list of expected RTL codes. * rtl.c (copy_rtx, shallow_copy_rtx): Use RTX_FLAG macro. (rtl_check_failed_flag): New. * reload1.c (reload): Use REG macro before changing rtx to MEM. (reload_cse_noop_set_p): Check rtx code before using access macro. * config/ia64/ia64.c (process_for_unwind_directive): Check rtx code before using access macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53245 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index b7ae4452dc4..ad0bc53694d 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -331,13 +331,13 @@ copy_rtx (orig)
/* We do not copy the USED flag, which is used as a mark bit during
walks over the RTL. */
- copy->used = 0;
+ RTX_FLAG (copy, used) = 0;
/* We do not copy FRAME_RELATED for INSNs. */
if (GET_RTX_CLASS (code) == 'i')
- copy->frame_related = 0;
- copy->jump = orig->jump;
- copy->call = orig->call;
+ RTX_FLAG (copy, frame_related) = 0;
+ RTX_FLAG (copy, jump) = RTX_FLAG (orig, jump);
+ RTX_FLAG (copy, call) = RTX_FLAG (orig, call);
format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
@@ -390,11 +390,11 @@ shallow_copy_rtx (orig)
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;
- copy->frame_related = orig->frame_related;
+ 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++)
copy->fld[i] = orig->fld[i];
@@ -637,3 +637,17 @@ rtvec_check_failed_bounds (r, n, file, line, func)
n, GET_NUM_ELEM (r) - 1, func, trim_filename (file), line);
}
#endif /* ENABLE_RTL_CHECKING */
+
+#if defined ENABLE_RTL_FLAG_CHECKING
+void
+rtl_check_failed_flag (r, file, line, func)
+ rtx r;
+ const char *file;
+ int line;
+ const char *func;
+{
+ internal_error
+ ("RTL flag check: access macro used with unexpected rtx code `%s' in %s, at %s:%d",
+ GET_RTX_NAME (GET_CODE (r)), func, trim_filename (file), line);
+}
+#endif /* ENABLE_RTL_FLAG_CHECKING */