}
/* Compute the number of nondebug deps in list LIST for INSN. */
-
-static int
+int
dep_list_size (rtx_insn *insn, sd_list_types_def list)
{
sd_iterator_def sd_it;
if (!MAY_HAVE_DEBUG_INSNS)
return sd_lists_size (insn, list);
+ /* TODO: We should split normal and debug insns into separate SD_LIST_*
+ sub-lists, and then we'll be able to use something like
+ sd_lists_size(insn, list & SD_LIST_NON_DEBUG)
+ instead of walking dependencies below. */
+
FOR_EACH_DEP (insn, list, sd_it, dep)
{
if (DEBUG_INSN_P (DEP_CON (dep)))
sd_iterator_def sd_it;
dep_t dep;
sd_list_types_def mem_deps = backwards ? SD_LIST_HARD_BACK : SD_LIST_FORW;
- int n_mem_deps = sd_lists_size (mii->mem_insn, mem_deps);
+ int n_mem_deps = dep_list_size (mii->mem_insn, mem_deps);
sd_it = sd_iterator_start (mii->mem_insn, mem_deps);
while (sd_iterator_cond (&sd_it, &dep))
if (backwards)
{
inc_cand = pro;
- n_inc_deps = sd_lists_size (inc_cand, SD_LIST_BACK);
+ n_inc_deps = dep_list_size (inc_cand, SD_LIST_BACK);
}
else
{
inc_cand = con;
- n_inc_deps = sd_lists_size (inc_cand, SD_LIST_FORW);
+ n_inc_deps = dep_list_size (inc_cand, SD_LIST_FORW);
}
/* In the FOR_EACH_DEP loop below we will create additional n_inc_deps
--- /dev/null
+/* PR bootstrap/113445 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug -Wno-uninitialized" } */
+
+enum E { F };
+int *a, *b, *c, *d, e, f, g, h, i;
+int *f1 (int *);
+int *f2 (...);
+int *f3 (int *, int);
+int *f4 (unsigned, int);
+int *f5 (enum E, int);
+int *f6 (int, int);
+enum E j;
+
+void
+f7 (void)
+{
+ int *k, *l, *m, *n, *o, *p, *q, *r, *s, *t, *u, *v, w, x, y, z, aa;
+ v = f6 (0, 1);
+ u = d;
+ t = c;
+ s = a;
+ f4 (f, 1);
+ f4 (f, 1);
+ int *ab = f4 (f, 1);
+ k = b;
+ int ac = *f3 (&e, F);
+ r = f1 (&ac);
+ int ad = *f3 (&e, F);
+ f1 (&ad);
+ q = f5 (j, 0);
+ p = f1 (t);
+ f1 (o);
+ f2 ();
+ f2 ();
+ f2 ();
+ f2 ();
+ f2 ();
+ f2 ();
+ f2 (z, z);
+ f2 ();
+ f2 ();
+ f2 ();
+ f1 (&h);
+ f2 (z, k, ab, aa, r, g, (void *) 0);
+ f2 (aa, w, &aa, r, k, (void *) 0);
+ f2 (q, (void *) 0);
+ f2 ();
+ f2 (&aa, s, r, o, o, z, (void *) 0);
+ n = f2 (s, (void *) 0);
+ f2 (v, u, p, t, p, p, (void *) 0);
+ m = f2 (v, u, x, y, x, x, (void *) 0);
+ l = f2 (v);
+ f2 (v, s);
+ f2 (t, u);
+ f2 (&aa, i, o, t, t, t, t);
+ f2 (v, u, x, t, y, x, x, o, t, t, t, t, t);
+ f2 (t);
+ f2 (t, t, t, t, t, t, t, z, y);
+ f2 (t, l, m, n);
+}