+2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
+ Harsha Jagasia <harsha.jagasia@amd.com>
+
+ PR tree-optimization/37828
+ * graphite.c (graphite_trans_loop_block): Do not loop block
+ single nested loops.
+
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/37686
/* TODO: - Calculate the stride size automatically. */
int stride_size = 64;
+ /* It makes no sense to block a single loop. */
+ for (i = 0; VEC_iterate (graphite_bb_p, bbs, i, gb); i++)
+ if (gbb_nb_loops (gb) < 2)
+ return false;
+
for (i = 0; VEC_iterate (graphite_bb_p, bbs, i, gb); i++)
transform_done |= graphite_trans_bb_block (gb, stride_size, loops);
return transform_done;
}
-/* Loop block all basic blocks of SCOP. */
+/* Loop block all basic blocks of SCOP. Return false when the
+ transform is not performed. */
static bool
graphite_trans_scop_block (scop_p scop)
lambda_vector last_schedule = lambda_vector_new (max_schedule);
if (VEC_length (graphite_bb_p, SCOP_BBS (scop)) == 0)
- return transform_done;
+ return false;
/* Get the data of the first bb. */
- gb = VEC_index (graphite_bb_p, SCOP_BBS (scop), 0);
+ gb = VEC_index (graphite_bb_p, SCOP_BBS (scop), 0);
last_nb_loops = gbb_nb_loops (gb);
lambda_vector_copy (GBB_STATIC_SCHEDULE (gb), last_schedule,
last_nb_loops + 1);
+2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
+ Harsha Jagasia <harsha.jagasia@amd.com>
+
+ PR tree-optimization/37828
+ * testsuite/gcc.dg/graphite/pr37828.c: New.
+
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/37686
--- /dev/null
+/* { dg-options "-O2 -floop-block" } */
+
+typedef struct foo
+{
+ struct foo **Node;
+} foo;
+
+static int sort_and_split (foo **Root, foo **Finite, long first)
+{
+ foo *cd;
+ long i;
+ for (i = 0; i < first; i++)
+ cd->Node[i] = Finite[first+i];
+
+ sort_and_split(Root, Finite, first);
+ return (0);
+}
+
+
+void Build_foo(foo **Root, foo **Finite, foo **Infinite)
+{
+ long low, high;
+ while (sort_and_split(Root, Finite, low) == 0);
+}
+