This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 195/236] Convert PATTERN from a macro to a pair of inline functions
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Aug 2014 20:03:18 +0200
- Subject: Re: [PATCH 195/236] Convert PATTERN from a macro to a pair of inline functions
- Authentication-results: sourceware.org; auth=none
- References: <1407345815-14551-1-git-send-email-dmalcolm at redhat dot com> <1407345815-14551-196-git-send-email-dmalcolm at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Aug 06, 2014 at 01:22:54PM -0400, David Malcolm wrote:
> gcc/
> * rtl.h (PATTERN): Convert this macro into a pair of inline
> functions, for now, requiring const_rtx and rtx.
> ---
> gcc/rtl.h | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/rtl.h b/gcc/rtl.h
> index 79cca1b..640616f 100644
> --- a/gcc/rtl.h
> +++ b/gcc/rtl.h
> @@ -1226,7 +1226,15 @@ inline rtx& SET_NEXT_INSN (rtx insn)
> #define BLOCK_FOR_INSN(INSN) XBBDEF (INSN, 2)
>
> /* The body of an insn. */
> -#define PATTERN(INSN) XEXP (INSN, 3)
> +inline rtx PATTERN (const_rtx insn)
> +{
> + return XEXP (insn, 3);
> +}
> +
> +inline rtx& PATTERN (rtx insn)
> +{
> + return XEXP (insn, 3);
> +}
:(, that is going to make debugging harder. Can you make sure they are
ignored by gdb?
skip file rtl.h
probably in gdbinit.in. I guess we also want skip file gimple.h and
similarly for some other headers where we have just tiny inlines we really
don't want to step in through.
Jakub