2015-11-06 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
- * graphite-scop-detection.c (scop_detection::merge_sese): Entry
+ * graphite-optimize-isl.c (optimize_isl): Call
+ isl_options_set_schedule_maximize_band_depth.
+
+2015-11-06 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * graphite-scop-detection.c (scop_detection::merge_sese): Entry
and exit edges should not be a part of irreducible loop.
- (scop_detection::can_represent_loop_1): Loops should not be
+ (scop_detection::can_represent_loop_1): Loops should not be
irreducible.
- (scop_detection::harmful_stmt_in_region): All the basic block
+ (scop_detection::harmful_stmt_in_region): All the basic block
should belong to reducible loops.
2015-11-06 Christophe Lyon <christophe.lyon@linaro.org>
isl_options_set_schedule_maximize_band_depth (scop->isl_context, 1);
#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS
/* ISL-0.15 or later. */
- isl_options_set_schedule_serialize_sccs (scop->isl_context, 1);
+ isl_options_set_schedule_maximize_band_depth (scop->isl_context, 1);
#else
isl_options_set_schedule_fuse (scop->isl_context, ISL_SCHEDULE_FUSE_MIN);
#endif
+2015-11-06 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * gcc.dg/graphite/fuse-1.c: New.
+ * gcc.dg/graphite/fuse-2.c: New.
+ * gcc.dg/graphite/interchange-13.c: Remove bogus check.
+
2015-11-06 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/aarch64/advsimd-intrinsics/vqtbX.c: New test.
--- /dev/null
+/* Check that the two loops are fused and that we manage to fold the two xor
+ operations. */
+/* { dg-options "-O2 -floop-nest-optimize -fdump-tree-forwprop-all" } */
+/* { dg-do run } */
+
+/* Make sure we fuse the loops like this:
+ISL AST generated by ISL:
+for (int c0 = 0; c0 <= 99; c0 += 1) {
+ S_3(c0);
+ S_6(c0);
+ S_9(c0);
+}
+*/
+/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for (int c0 = 0; c0 <= 99; c0 += 1) \{.*S_.*(c0);.*S_.*(c0);.*S_.*(c0);.*\}" 1 "graphite" } } */
+
+/* Check that after fusing the loops, the scalar computation is also fused. */
+/* { dg-final { scan-tree-dump-times "gimple_simplified to\[^\\n\]*\\^ 12" 1 "forwprop4" } } */
+
+
+
+#define MAX 100
+int A[MAX];
+
+extern void abort ();
+
+int
+main (void)
+{
+ int i;
+
+ for (i = 0; i < MAX; i++)
+ A[i] = i;
+ for(int i=0; i<MAX; i++)
+ A[i] ^= 4;
+ for(int i=0; i<MAX; i++)
+ A[i] ^= 8;
+
+ for (i = 0; i < MAX; i++)
+ if (A[i] != (i ^ 12))
+ abort ();
+
+ return 0;
+}
--- /dev/null
+/* Check that the three loops are fused. */
+/* { dg-options "-O2 -floop-nest-optimize" } */
+/* { dg-do run } */
+
+/* Make sure we fuse the loops like this:
+ISL AST generated by ISL:
+for (int c0 = 0; c0 <= 99; c0 += 1) {
+ S_3(c0);
+ S_6(c0);
+ S_9(c0);
+}
+*/
+
+/* { dg-final { scan-tree-dump-times "ISL AST generated by ISL:.*for (int c0 = 0; c0 <= 99; c0 += 1) \{.*S_.*(c0);.*S_.*(c0);.*S_.*(c0);.*\}" 1 "graphite" } } */
+
+#define MAX 100
+int A[MAX], B[MAX], C[MAX];
+
+extern void abort ();
+
+int
+main (void)
+{
+ int i;
+
+ /* The next three loops should be fused. */
+ for (i = 0; i < MAX; i++)
+ {
+ A[i] = i;
+ B[i] = i + 2;
+ C[i] = i + 1;
+ }
+ for(int i=0; i<MAX; i++)
+ A[i] += B[i];
+ for(int i=0; i<MAX; i++)
+ A[i] += C[i];
+
+ for (i = 0; i < MAX; i++)
+ if (A[i] != 3*i+3)
+ abort ();
+
+ return 0;
+}
return 0;
}
-/* { dg-final { scan-tree-dump "tiled" "graphite" } } */