rtl.h (in_expr_list_p): New declaration.
[gcc.git] / gcc / rtlanal.c
index b6056de14a1c4e79c59309347a09535844044e7a..427e3fbe9212f3dcd0996033e7c83ecf7a09e66f 100644 (file)
@@ -1953,6 +1953,24 @@ remove_note (insn, note)
   abort ();
 }
 
+/* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
+   return 1 if it is found.  A simple equality test is used to determine if
+   NODE matches.  */
+
+int
+in_expr_list_p (listp, node)
+     rtx listp;
+     rtx node;
+{
+  rtx x;
+
+  for (x = listp; x; x = XEXP (x, 1))
+    if (node == XEXP (x, 0))
+      return 1;
+
+  return 0;
+}
+
 /* Search LISTP (an EXPR_LIST) for an entry whose first operand is NODE and
    remove that entry from the list if it is found.