1825f9a2f4
2009-09-17 Li Feng <nemokingdom@gmail.com> PR middle-end/41118 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition. (pddr_original_scattering): Make sure 2 pdr2 in the same base object set. (graphite_carried_dependence_level_k): Ditto. * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET. * graphite-poly.h (struct poly_dr): Add member dr_base_object_set. (new_poly_dr): Adjust declaration. * graphite-sese-to-poly.c (free_data_refs_aux): New. (free_gimple_bb): Added free_data_refs_aux. (build_poly_dr): Add dr_base_object_set. (partition_drs_to_sets): New. (dr_same_base_object_p): New. (build_alias_set_for_drs): New. (build_base_object_set_for_drs): New. (build_scop_drs): Add build_base_obj_set_for_drs. * graphite-sese-to-poly.h: Added #define for alias set number index and base object set index. * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests. * libgomp/testsuite/libgomp.graphite/pr4118.c: New. From-SVN: r154549
39 lines
783 B
C
39 lines
783 B
C
#define N 500
|
|
|
|
int foo(void)
|
|
{
|
|
int i, j, k;
|
|
int X[2*N], Y[2*N], B[2*N];
|
|
int A[2*N][2*N], C[2*N][2*N];
|
|
|
|
for (i = 1; i <= N; i++)
|
|
{
|
|
X[i] = Y[i] + 10;
|
|
for (j = 1; j <= N; j++)
|
|
{
|
|
B[j] = A[j][N];
|
|
for (k = 1; k <= N; k++)
|
|
{
|
|
A[j+1][k] = B[j] + C[j][k];
|
|
}
|
|
Y[i+j] = A[j+1][N];
|
|
}
|
|
}
|
|
|
|
return A[1][5]*B[6];
|
|
}
|
|
|
|
int main(void)
|
|
{
|
|
foo();
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* Check that parallel code generation part make the right answer. */
|
|
/* { dg-final { scan-tree-dump-times "1 loops carried no dependency" 1 "graphite" } } */
|
|
/* { dg-final { cleanup-tree-dump "graphite" } } */
|
|
/* { dg-final { scan-tree-dump-times "loopfn.0" 5 "optimized" } } */
|
|
/* { dg-final { cleanup-tree-dump "parloops" } } */
|
|
/* { dg-final { cleanup-tree-dump "optimized" } } */
|