From: Aditya Kumar Date: Fri, 6 Nov 2015 20:43:46 +0000 (+0000) Subject: enable loop fusion on isl-15 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40856c71be57cd32733304904d74e5ffe221623d;p=gcc.git enable loop fusion on isl-15 * graphite-optimize-isl.c (optimize_isl): Call isl_options_set_schedule_maximize_band_depth. * gcc.dg/graphite/fuse-1.c: New. * gcc.dg/graphite/fuse-2.c: New. * gcc.dg/graphite/interchange-13.c: Remove bogus check. Co-Authored-By: Sebastian Pop From-SVN: r229889 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 906dc9449f4..04bc2b49659 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,11 +1,17 @@ 2015-11-06 Aditya Kumar Sebastian Pop - * 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 + Sebastian Pop + + * 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 diff --git a/gcc/graphite-optimize-isl.c b/gcc/graphite-optimize-isl.c index 53355bb57dc..0d859759da1 100644 --- a/gcc/graphite-optimize-isl.c +++ b/gcc/graphite-optimize-isl.c @@ -404,7 +404,7 @@ optimize_isl (scop_p scop) 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 564b45a9d83..4af202213de 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-11-06 Aditya Kumar + Sebastian Pop + + * 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 * gcc.target/aarch64/advsimd-intrinsics/vqtbX.c: New test. diff --git a/gcc/testsuite/gcc.dg/graphite/fuse-1.c b/gcc/testsuite/gcc.dg/graphite/fuse-1.c new file mode 100644 index 00000000000..c9bb67debe1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/fuse-1.c @@ -0,0 +1,43 @@ +/* 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