summaryrefslogtreecommitdiff
path: root/gcc/graphite-sese-to-poly.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-21 21:18:27 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-21 21:18:27 +0000
commit13f421d5605ccac3dae6a07ddcf3bbddaf7f2209 (patch)
treeedc739b54786c480775bcdd4ce45e801f6224ec9 /gcc/graphite-sese-to-poly.c
parent84e9670514d751c49ea70db115f9d8ef8d2aa934 (diff)
downloadgcc-13f421d5605ccac3dae6a07ddcf3bbddaf7f2209.tar.gz
a scalar depending on vdefs in the current region is not invariant
When a scalar is defined in function of an array reference in the current scop, it does variate. Graphite cannot represent the condition in scop-11.c, as a[*] variates in the current region, and it is not an affine condition: for (j = 0; j <= 20; j++) a[j] = b + i; if (a[12] == 23) b = 3; else b = 1; for (j = 0; j <= 20; j++) a[j] = b + i; * graphite-scop-detection.c (parameter_index_in_region): Update call to invariant_in_sese_p_rec. * graphite-sese-to-poly.c (extract_affine): Same. * sese.c (invariant_in_sese_p_rec): Pass in an extra parameter has_vdefs. (scalar_evolution_in_region): Return chrec_dont_know when the scalar variable depends on virtual definitions in the current region. * sese.h (invariant_in_sese_p_rec): Update declaration. testsuite/ * gcc.dg/graphite/scop-11.c: Update pattern. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-sese-to-poly.c')
-rw-r--r--gcc/graphite-sese-to-poly.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index d1eae9036ec..c06d9debf55 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -540,7 +540,7 @@ extract_affine (scop_p s, tree e, __isl_take isl_space *space)
case SSA_NAME:
gcc_assert (-1 != parameter_index_in_region_1 (e, s->scop_info)
- || !invariant_in_sese_p_rec (e, s->scop_info->region));
+ || !invariant_in_sese_p_rec (e, s->scop_info->region, NULL));
res = extract_affine_name (s, e, space);
break;