This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 195/236] Convert PATTERN from a macro to a pair of inline functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]