bitmap.h (struct bitmap_element_def): GTY annotate next/prev.
authorRichard Guenther <rguenther@suse.de>
Fri, 17 Aug 2012 10:49:30 +0000 (10:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Aug 2012 10:49:30 +0000 (10:49 +0000)
2012-08-17  Richard Guenther  <rguenther@suse.de>

* bitmap.h (struct bitmap_element_def): GTY annotate next/prev.
(struct bitmap_head_def): GTY skip current field.

From-SVN: r190479

gcc/ChangeLog
gcc/bitmap.h

index ca2b319236a2d6d6d520769179bea77e6e3c6fc8..c9a81d14b73d3c1d45ca697e9836bb3d96f4b9ca 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-17  Richard Guenther  <rguenther@suse.de>
+
+       * bitmap.h (struct bitmap_element_def): GTY annotate next/prev.
+       (struct bitmap_head_def): GTY skip current field.
+
 2012-08-17  Steven Bosscher  <steven@gcc.gnu.org>
 
        PR middle-end/54146
index 6ca9073750d26a17ae5224391b3ccfe01880e1aa..1c39cd49efd40f0bd57fb8525b2df92533135bd0 100644 (file)
@@ -167,9 +167,9 @@ typedef struct GTY (()) bitmap_obstack {
    bitmap_elt_clear_from to be implemented in unit time rather than
    linear in the number of elements to be freed.  */
 
-typedef struct GTY(()) bitmap_element_def {
-  struct bitmap_element_def *next;             /* Next element.  */
-  struct bitmap_element_def *prev;             /* Previous element.  */
+typedef struct GTY((chain_next ("%h.next"), chain_prev ("%h.prev"))) bitmap_element_def {
+  struct bitmap_element_def *next;     /* Next element.  */
+  struct bitmap_element_def *prev;     /* Previous element.  */
   unsigned int indx;                   /* regno/BITMAP_ELEMENT_ALL_BITS.  */
   BITMAP_WORD bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set.  */
 } bitmap_element;
@@ -177,15 +177,17 @@ typedef struct GTY(()) bitmap_element_def {
 struct bitmap_descriptor;
 /* Head of bitmap linked list.  gengtype ignores ifdefs, but for
    statistics we need to add a bitmap descriptor pointer.  As it is
-   not collected, we can just GTY((skip)) it.   */
+   not collected, we can just GTY((skip(""))) it.  Likewise current
+   points to something already pointed to by the chain started by first,
+   no need to walk it again.  */
 
 typedef struct GTY(()) bitmap_head_def {
-  bitmap_element *first;       /* First element in linked list.  */
-  bitmap_element *current;     /* Last element looked at.  */
-  unsigned int indx;           /* Index of last element looked at.  */
-  bitmap_obstack *obstack;     /* Obstack to allocate elements from.
-                                  If NULL, then use GGC allocation.  */
-  struct bitmap_descriptor GTY((skip)) *desc;
+  bitmap_element *first;               /* First element in linked list.  */
+  bitmap_element * GTY((skip(""))) current; /* Last element looked at.  */
+  unsigned int indx;                   /* Index of last element looked at.  */
+  bitmap_obstack *obstack;             /* Obstack to allocate elements from.
+                                          If NULL, then use GGC allocation.  */
+  struct bitmap_descriptor GTY((skip(""))) *desc;
 } bitmap_head;
 
 /* Global data */