Commit 6652875f by Sebastian Pop Committed by Sebastian Pop

correctly handle non affine data references

2015-10-01  Sebastian Pop  <s.pop@samsung.com>
            Aditya Kumar  <aditya.k7@samsung.com>
        PR tree-optimization/66980
        * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false
        when data reference analysis has failed.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>

From-SVN: r228357
parent 55fec44d
2015-10-01 Sebastian Pop <s.pop@samsung.com>
Aditya Kumar <aditya.k7@samsung.com>
PR tree-optimization/66980
* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false
when data reference analysis has failed.
2015-10-01 Sebastian Pop <s.pop@samsung.com>
Aditya Kumar <aditya.k7@samsung.com>
PR tree-optimization/67754
* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Call
scev analysis on the same loop nest as analyze_drs_in_stmts.
......@@ -274,6 +274,13 @@ stmt_has_simple_data_refs_p (sese_l scop, gimple *stmt)
FOR_EACH_VEC_ELT (drs, j, dr)
{
int nb_subscripts = DR_NUM_DIMENSIONS (dr);
if (nb_subscripts < 1)
{
free_data_refs (drs);
return false;
}
tree ref = DR_REF (dr);
for (int i = nb_subscripts - 1; i >= 0; i--)
......
void foo(unsigned char *in, unsigned char *out, int w, int h)
{
unsigned int i, j;
for (i = 0; i < 3*w*h; i++)
for (j = 0; j < 3*w*h; j++)
out[i * w + j] = in[(i * w + j)*3] + in[(i * w + j)*3 + 1] + in[(i * w + j)*3 + 2];
}
/* Requires delinearization to be able to represent "i*w". */
/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite" { xfail *-*-* } } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment