re PR middle-end/37828 ([graphite] ICE in expand_scalar_variables_expr, at graphite.c:3421 with -floop-block)
2008-10-15 Sebastian Pop <sebastian.pop@amd.com> Harsha Jagasia <harsha.jagasia@amd.com> PR tree-optimization/37828 * testsuite/gcc.dg/graphite/pr37828.c: New. * graphite.c (graphite_trans_loop_block): Do not loop block single nested loops. Co-Authored-By: Harsha Jagasia <harsha.jagasia@amd.com> From-SVN: r141142
This commit is contained in:
parent
36174c82ee
commit
575da9be0d
@ -1,3 +1,10 @@
|
||||
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||
Harsha Jagasia <harsha.jagasia@amd.com>
|
||||
|
||||
PR tree-optimization/37828
|
||||
* graphite.c (graphite_trans_loop_block): Do not loop block
|
||||
single nested loops.
|
||||
|
||||
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR tree-optimization/37686
|
||||
|
@ -4767,13 +4767,19 @@ graphite_trans_loop_block (VEC (graphite_bb_p, heap) *bbs, int loops)
|
||||
/* TODO: - Calculate the stride size automatically. */
|
||||
int stride_size = 64;
|
||||
|
||||
/* It makes no sense to block a single loop. */
|
||||
for (i = 0; VEC_iterate (graphite_bb_p, bbs, i, gb); i++)
|
||||
if (gbb_nb_loops (gb) < 2)
|
||||
return false;
|
||||
|
||||
for (i = 0; VEC_iterate (graphite_bb_p, bbs, i, gb); i++)
|
||||
transform_done |= graphite_trans_bb_block (gb, stride_size, loops);
|
||||
|
||||
return transform_done;
|
||||
}
|
||||
|
||||
/* Loop block all basic blocks of SCOP. */
|
||||
/* Loop block all basic blocks of SCOP. Return false when the
|
||||
transform is not performed. */
|
||||
|
||||
static bool
|
||||
graphite_trans_scop_block (scop_p scop)
|
||||
@ -4790,10 +4796,10 @@ graphite_trans_scop_block (scop_p scop)
|
||||
lambda_vector last_schedule = lambda_vector_new (max_schedule);
|
||||
|
||||
if (VEC_length (graphite_bb_p, SCOP_BBS (scop)) == 0)
|
||||
return transform_done;
|
||||
return false;
|
||||
|
||||
/* Get the data of the first bb. */
|
||||
gb = VEC_index (graphite_bb_p, SCOP_BBS (scop), 0);
|
||||
gb = VEC_index (graphite_bb_p, SCOP_BBS (scop), 0);
|
||||
last_nb_loops = gbb_nb_loops (gb);
|
||||
lambda_vector_copy (GBB_STATIC_SCHEDULE (gb), last_schedule,
|
||||
last_nb_loops + 1);
|
||||
|
@ -1,3 +1,9 @@
|
||||
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||
Harsha Jagasia <harsha.jagasia@amd.com>
|
||||
|
||||
PR tree-optimization/37828
|
||||
* testsuite/gcc.dg/graphite/pr37828.c: New.
|
||||
|
||||
2008-10-15 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
PR tree-optimization/37686
|
||||
|
25
gcc/testsuite/gcc.dg/graphite/pr37828.c
Normal file
25
gcc/testsuite/gcc.dg/graphite/pr37828.c
Normal file
@ -0,0 +1,25 @@
|
||||
/* { dg-options "-O2 -floop-block" } */
|
||||
|
||||
typedef struct foo
|
||||
{
|
||||
struct foo **Node;
|
||||
} foo;
|
||||
|
||||
static int sort_and_split (foo **Root, foo **Finite, long first)
|
||||
{
|
||||
foo *cd;
|
||||
long i;
|
||||
for (i = 0; i < first; i++)
|
||||
cd->Node[i] = Finite[first+i];
|
||||
|
||||
sort_and_split(Root, Finite, first);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
void Build_foo(foo **Root, foo **Finite, foo **Infinite)
|
||||
{
|
||||
long low, high;
|
||||
while (sort_and_split(Root, Finite, low) == 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user