2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (scop_do_block): Print "SCoP will be loop
blocked" only when both the strip mine and the interchange have
been applied.
* testsuite/gcc.dg/graphite/block-2.c: Removed.
* testsuite/gcc.dg/graphite/block-3.c: Add scan pattern.
* testsuite/gcc.dg/graphite/block-4.c: Same.
* testsuite/gcc.dg/graphite/block-5.c: Same.
* testsuite/gcc.dg/graphite/block-6.c: Same.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155703
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-01-07 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/42641
+ * sese.c (rename_map_elt_info): Use the SSA name version, do
+ not hash pointers.
+
+2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
+ blocked" only when both the strip mine and the interchange have
+ been applied.
+
+ * testsuite/gcc.dg/graphite/block-2.c: Removed.
+ * testsuite/gcc.dg/graphite/block-3.c: Add scan pattern.
+ * testsuite/gcc.dg/graphite/block-4.c: Same.
+ * testsuite/gcc.dg/graphite/block-5.c: Same.
+ * testsuite/gcc.dg/graphite/block-6.c: Same.
+
2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
* graphite-clast-to-gimple.c (save_clast_name_index): Free slot
bool
scop_do_block (scop_p scop)
{
- bool transform_done = false;
+ bool strip_mined = false;
+ bool interchanged = false;
store_scattering (scop);
- lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
- transform_done = scop_do_interchange (scop);
+ strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop));
+ interchanged = scop_do_interchange (scop);
/* If we don't interchange loops, then the strip mine is not
profitable, and the transform is not a loop blocking. */
- if (!transform_done
+ if (!interchanged
|| !graphite_legal_transform (scop))
{
restore_scattering (scop);
return false;
}
- else if (dump_file && (dump_flags & TDF_DETAILS))
+ else if (strip_mined && interchanged
+ && dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "SCoP will be loop blocked.\n");
- return transform_done;
+ return strip_mined || interchanged;
}
#endif
+++ /dev/null
-typedef unsigned char UChar;
-typedef int Int32;
-typedef unsigned int UInt32;
-
-void fallbackSort ( UInt32* fmap,
- UInt32* eclass,
- Int32 nblock,
- Int32 verb )
-{
- Int32 ftab[257];
- Int32 ftabCopy[256];
- Int32 H, i, j, k, l, r, cc, cc1;
- Int32 nNotDone;
- Int32 nBhtab;
- UChar* eclass8 = (UChar*)eclass;
-
- if (verb >= 4)
- VPrintf0 ( " bucket sorting ...\n" );
- for (i = 0; i < 257; i++) ftab[i] = 0;
- for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
- for (i = 0; i < 256; i++) ftabCopy[i] = ftab[i];
- for (i = 1; i < 257; i++) ftab[i] += ftab[i-1];
-
- for (i = 0; i < nblock; i++) {
- j = eclass8[i] + ftab [i];
- }
- AssertH ( j < 256, 1005 );
-}
-/* { dg-final { cleanup-tree-dump "graphite" } } */
{
int i, j, k;
- /* These loops contain too few iterations for being strip-mined by 64. */
+ /* These loops contain too few iterations to be blocked by 64. */
for (i = 0; i < 24; i++)
for (j = 0; j < 24; j++)
for (k = 0; k < 24; k++)
A[i][j][k] = B[i][k] * C[k][j];
- /* These loops should still be strip mined. */
+ /* These loops should still be loop blocked. */
for (i = 0; i < M; i++)
for (j = 0; j < M; j++)
for (k = 0; k < M; k++)
A[i][j][k] = B[i][k] * C[k][j];
}
+/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
A[i][j] = B[i][k] * C[k][j];
}
+/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
int b[N][N];
unsigned i, j;
- for (i = 0; i < N; i++)
+ for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
a[i][j] = i*j;
- for (j = 1; j < N; j++)
+ /* This loop nest should be blocked. */
+ for (j = 1; j < N; j++)
for (i = 0; i < N; i++)
a[i][j] = a[i][j-1] + b[i][j];
- for (i = 0; i < N; i++)
- for (j = 0; j < N; j++)
- foo (a[i][j]);
+ for (i = 0; i < N; i++)
+ for (j = 0; j < N; j++)
+ foo (a[i][j]);
}
-/* Interchange is legal for loops 0 and 1 of the first two SCoPs */
-/* { dg-final { scan-tree-dump-times "Interchange valid for loops 0 and 1:" 2 "graphite" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "will be loop blocked" 1 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
int a[N][N];
unsigned i, j;
- for (i = 0; i < N; i++)
+ for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
- a[i][j] = i*j;
+ a[i][j] = i*j;
- for (i = 1; i < N; i++)
+ /* Interchange is not legal for loops 0 and 1. */
+ for (i = 1; i < N; i++)
for (j = 1; j < (N-1) ; j++)
- a[i][j] = a[i-1][j+1] * a[i-1][j+1]/2;
+ a[i][j] = a[i-1][j+1] * a[i-1][j+1]/2;
- for (i = 0; i < N; i++)
+ for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
- foo (a[i][j]);
+ foo (a[i][j]);
}
-/* Interchange is not legal for loops 0 and 1 of SCoP 2. */
-/* { dg-final { scan-tree-dump-times "Interchange not valid for loops 0 and 1:" 1 "graphite" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "will be loop blocked" 0 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */