};
static alloc_pool et_nodes;
-static alloc_pool et_occurences;
+static alloc_pool et_occurrences;
/* Changes depth of OCC to D. */
/* For recording the paths. */
+/* An ad-hoc constant; if the function has more blocks, this won't work,
+ but since it is used for debugging only, it does not matter. */
+#define MAX_NODES 100000
+
static int len;
-static void *datas[100000];
-static int depths[100000];
+static void *datas[MAX_NODES];
+static int depths[MAX_NODES];
/* Records the path represented by OCC, with depth incremented by DEPTH. */
}
fprintf (stderr, "%d (%d); ", ((basic_block) occ->of->data)->index, depth);
+
+ if (len >= MAX_NODES)
+ abort ();
+
depths[len] = depth;
datas[len] = occ->of;
len++;
{
struct et_occ *nw;
- if (!et_occurences)
- et_occurences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300);
- nw = pool_alloc (et_occurences);
+ if (!et_occurrences)
+ et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300);
+ nw = pool_alloc (et_occurrences);
nw->of = node;
nw->parent = NULL;
if (t->father)
et_split (t);
- pool_free (et_occurences, t->rightmost_occ);
+ pool_free (et_occurrences, t->rightmost_occ);
pool_free (et_nodes, t);
}
rmost->depth = 0;
rmost->min = 0;
- pool_free (et_occurences, p_occ);
+ pool_free (et_occurrences, p_occ);
/* Update the tree. */
if (father->son == t)