This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] checking version of rtl flag access macros
- From: Krister Walfridsson <cato at df dot lth dot se>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 16 May 2002 02:05:24 +0200 (MEST)
- Subject: Re: [PATCH] checking version of rtl flag access macros
On Mon, 6 May 2002, Janis Johnson wrote:
> 2002-05-06 Janis Johnson <janis187@us.ibm.com>
>
> * 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.
The reload1.c part of this patch causes bootstrap failure for
arm-unknown-netbsd1.5Y. I don't claim to understand gcc internals,
but shouldn't the line below read "if (GET_CODE (body) == SET"?
> @@ -8079,7 +8079,8 @@ reload_cse_simplify (insn)
> if (!count && reload_cse_noop_set_p (body))
> {
> rtx value = SET_DEST (body);
> - if (! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> + if (GET_CODE (body) == REG
> + && ! REG_FUNCTION_VALUE_P (SET_DEST (body)))
> value = 0;
> reload_cse_delete_noop_set (insn, value);
> return;
/Krister