Add LABEL_REF_P to rtl.h

Message ID 5f19dbef-02d2-d02b-c3d7-eb8a40b23220@linux.ibm.com
State New
Headers show
Series
  • Add LABEL_REF_P to rtl.h
Related show

Commit Message

Bill Schmidt May 23, 2019, 8:59 p.m.
Hi,

This patch just adds a convenience macro to be used in subsequent patches.

Bootstrapped successfully on powerpc64le-unknown-linux-gnu.  Okay for trunk?

Thanks,
Bill


2019-05-23  Michael Meissner  <meissner@linux.ibm.com>

	* rtl.h (LABEL_REF_P): New #define.

Comments

Richard Biener May 24, 2019, 9:26 a.m. | #1
On Thu, May 23, 2019 at 10:59 PM Bill Schmidt <wschmidt@linux.ibm.com> wrote:
>

> Hi,

>

> This patch just adds a convenience macro to be used in subsequent patches.

>

> Bootstrapped successfully on powerpc64le-unknown-linux-gnu.  Okay for trunk?


OK.

> Thanks,

> Bill

>

>

> 2019-05-23  Michael Meissner  <meissner@linux.ibm.com>

>

>         * rtl.h (LABEL_REF_P): New #define.

>

>

> Index: gcc/rtl.h

> ===================================================================

> --- gcc/rtl.h   (revision 271579)

> +++ gcc/rtl.h   (working copy)

> @@ -1052,6 +1052,10 @@ is_a_helper <rtx_note *>::test (rtx_insn *insn)

>  #define CONSTANT_P(X)   \

>    (GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ)

>

> +/* 1 if X is a LABEL_REF.  */

> +#define LABEL_REF_P(X)  \

> +  (GET_CODE (X) == LABEL_REF)

> +

>  /* 1 if X can be used to represent an object.  */

>  #define OBJECT_P(X)                                                    \

>    ((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)

>

Patch

Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h	(revision 271579)
+++ gcc/rtl.h	(working copy)
@@ -1052,6 +1052,10 @@  is_a_helper <rtx_note *>::test (rtx_insn *insn)
 #define CONSTANT_P(X)   \
   (GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ)
 
+/* 1 if X is a LABEL_REF.  */
+#define LABEL_REF_P(X)  \
+  (GET_CODE (X) == LABEL_REF)
+
 /* 1 if X can be used to represent an object.  */
 #define OBJECT_P(X)							\
   ((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)