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 <s.pop@samsung.com> From-SVN: r229889
This commit is contained in:
parent
1167ebe707
commit
40856c71be
@ -1,11 +1,17 @@
|
||||
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>
|
||||
|
@ -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
|
||||
|
@ -1,3 +1,10 @@
|
||||
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.
|
||||
|
43
gcc/testsuite/gcc.dg/graphite/fuse-1.c
Normal file
43
gcc/testsuite/gcc.dg/graphite/fuse-1.c
Normal file
@ -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<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;
|
||||
}
|
43
gcc/testsuite/gcc.dg/graphite/fuse-2.c
Normal file
43
gcc/testsuite/gcc.dg/graphite/fuse-2.c
Normal file
@ -0,0 +1,43 @@
|
||||
/* 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;
|
||||
}
|
@ -49,4 +49,3 @@ main (void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump "tiled" "graphite" } } */
|
||||
|
Loading…
Reference in New Issue
Block a user