+#ifdef GATHER_STATISTICS
+
+/* Store information about each particular varray. */
+struct varray_descriptor
+{
+ const char *name;
+ int allocated;
+ int created;
+ int resized;
+ int copied;
+};
+
+/* Hashtable mapping varray names to descriptors. */
+static htab_t varray_hash;
+
+/* Hashtable helpers. */
+static hashval_t
+hash_descriptor (const void *p)
+{
+ const struct varray_descriptor *d = p;
+ return htab_hash_pointer (d->name);
+}
+static int
+eq_descriptor (const void *p1, const void *p2)
+{
+ const struct varray_descriptor *d = p1;
+ return d->name == p2;
+}
+
+/* For given name, return descriptor, create new if needed. */
+static struct varray_descriptor *
+varray_descriptor (const char *name)
+{
+ struct varray_descriptor **slot;
+
+ if (!varray_hash)
+ varray_hash = htab_create (10, hash_descriptor, eq_descriptor, NULL);
+
+ slot = (struct varray_descriptor **)
+ htab_find_slot_with_hash (varray_hash, name,
+ htab_hash_pointer (name),
+ 1);
+ if (*slot)
+ return *slot;
+ *slot = xcalloc (sizeof (**slot), 1);
+ (*slot)->name = name;
+ return *slot;
+}
+#endif
+
+/* Do not add any more non-GC items here. Please either remove or GC
+ those items that are not GCed. */
+
+static const struct {
+ unsigned char size;
+ bool uses_ggc;
+} element[NUM_VARRAY_DATA] = {
+ { sizeof (char), 1 },
+ { sizeof (unsigned char), 1 },
+ { sizeof (short), 1 },
+ { sizeof (unsigned short), 1 },
+ { sizeof (int), 1 },
+ { sizeof (unsigned int), 1 },
+ { sizeof (long), 1 },
+ { sizeof (unsigned long), 1 },
+ { sizeof (HOST_WIDE_INT), 1 },
+ { sizeof (unsigned HOST_WIDE_INT), 1 },
+ { sizeof (void *), 1 },
+ { sizeof (void *), 0 },
+ { sizeof (char *), 1 },
+ { sizeof (struct rtx_def *), 1 },
+ { sizeof (struct rtvec_def *), 1 },
+ { sizeof (union tree_node *), 1 },
+ { sizeof (struct bitmap_head_def *), 1 },
+ { sizeof (struct reg_info_def *), 0 },
+ { sizeof (struct basic_block_def *), 1 },
+ { sizeof (struct elt_list *), 1 },
+ { sizeof (struct edge_def *), 1 },
+ { sizeof (tree *), 1 },
+};
+