OSDN Git Service

* tracer.c (rest_of_handle_tracer): We already cleaned
[pf3gnuchains/gcc-fork.git] / gcc / lists.c
index 70f2ee8..23529a3 100644 (file)
@@ -1,6 +1,6 @@
 /* List management for the GCC expander.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2003, 2004 Free Software Foundation, Inc.
+   1999, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -98,7 +98,7 @@ remove_list_node (rtx *listp)
 
 /* Removes corresponding to ELEM node from the list pointed to by LISTP.
    Returns that node.  */
-static rtx
+rtx
 remove_list_elem (rtx elem, rtx *listp)
 {
   rtx node;
@@ -159,7 +159,7 @@ alloc_EXPR_LIST (int kind, rtx val, rtx next)
    node available, we'll use it, otherwise a call to gen_rtx_DEPS_LIST
    is made.  */
 rtx
-alloc_DEPS_LIST (rtx val, rtx next, HOST_WIDE_INT ds)
+alloc_DEPS_LIST (rtx val, rtx next, int ds)
 {
   rtx r;
 
@@ -169,7 +169,7 @@ alloc_DEPS_LIST (rtx val, rtx next, HOST_WIDE_INT ds)
       unused_deps_list = XEXP (r, 1);
       XEXP (r, 0) = val;
       XEXP (r, 1) = next;
-      XWINT (r, 2) = ds;
+      XINT (r, 2) = ds;
       PUT_REG_NOTE_KIND (r, VOIDmode);
 
       gcc_assert (GET_CODE (r) == DEPS_LIST);
@@ -241,4 +241,28 @@ remove_free_DEPS_LIST_elem (rtx elem, rtx *listp)
   free_DEPS_LIST_node (remove_list_elem (elem, listp));
 }
 
+/* Remove and free corresponding to ELEM node in the INSN_LIST pointed to
+   by LISTP.  */
+void
+remove_free_INSN_LIST_elem (rtx elem, rtx *listp)
+{
+  free_INSN_LIST_node (remove_list_elem (elem, listp));
+}
+
+/* Create and return a copy of the DEPS_LIST LIST.  */
+rtx
+copy_DEPS_LIST_list (rtx list)
+{
+  rtx res = NULL_RTX, *resp = &res;
+
+  while (list)
+    {
+      *resp = alloc_DEPS_LIST (XEXP (list, 0), 0, XINT (list, 2));
+      PUT_REG_NOTE_KIND (*resp, REG_NOTE_KIND (list));
+      resp = &XEXP (*resp, 1);
+      list = XEXP (list, 1);
+    }
+  return res;
+}
+
 #include "gt-lists.h"