[PATCH] Add XINSN macro and use it within NEXT_INSN/PREV_INSN (was Re: [PATCH] Force rtl templates to be inlined)

Jakub Jelinek jakub@redhat.com
Thu Sep 4 20:46:00 GMT 2014

On Thu, Sep 04, 2014 at 04:04:17PM -0400, David Malcolm wrote:
> --- a/gcc/rtl.h
> +++ b/gcc/rtl.h
> @@ -195,6 +195,7 @@ union rtunion
>    unsigned int rt_uint;
>    const char *rt_str;
>    rtx rt_rtx;
> +  rtx_insn *rt_insn;
>    rtvec rt_rtvec;
>    enum machine_mode rt_type;
>    addr_diff_vec_flags rt_addr_diff_vec_flags;
> @@ -1208,6 +1209,7 @@ extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
>  #define XUINT(RTX, N)   (RTL_CHECK2 (RTX, N, 'i', 'n').rt_uint)
>  #define XSTR(RTX, N)	(RTL_CHECK2 (RTX, N, 's', 'S').rt_str)
>  #define XEXP(RTX, N)	(RTL_CHECK2 (RTX, N, 'e', 'u').rt_rtx)

Shouldn't XEXP be changed into RTL_CHECK1 (RTX, N, 'e').rt_rtx
then and the accessors of first operand of INSN_LIST and only operand of
LABEL_REF be changed to XINSN too?  Of course doesn't have to be done
immediately, can be done as a followup.

> +#define XINSN(RTX, N)	(RTL_CHECK1 (RTX, N, 'u').rt_insn)
>  #define XVEC(RTX, N)	(RTL_CHECK2 (RTX, N, 'E', 'V').rt_rtvec)
>  #define XMODE(RTX, N)	(RTL_CHECK1 (RTX, N, 'M').rt_type)
>  #define XTREE(RTX, N)   (RTL_CHECK1 (RTX, N, 't').rt_tree)


More information about the Gcc-patches mailing list