aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-interchange.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-11-25 05:10:43 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-11-25 05:10:43 +0000
commit92d92abba165da174b63dbd12b1899a2e8ff9dc3 (patch)
treecba497d11e9dc9a6ee870059692006d32ce9bcda /gcc/graphite-interchange.c
parent23159c56104ded6234ae8088dd628c2f202fe83e (diff)
downloadgcc-92d92abba165da174b63dbd12b1899a2e8ff9dc3.zip
gcc-92d92abba165da174b63dbd12b1899a2e8ff9dc3.tar.gz
gcc-92d92abba165da174b63dbd12b1899a2e8ff9dc3.tar.bz2
graphite-interchange.c (memory_stride_in_loop): The depth argument corresponds to a dynamic time dimension...
2009-10-15 Sebastian Pop <sebastian.pop@amd.com> * graphite-interchange.c (memory_stride_in_loop): The depth argument corresponds to a dynamic time dimension, so use psct_dynamic_dim to refer to the transformed scattering dimension. From-SVN: r154595
Diffstat (limited to 'gcc/graphite-interchange.c')
-rw-r--r--gcc/graphite-interchange.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/graphite-interchange.c b/gcc/graphite-interchange.c
index 4321732..0e432ce 100644
--- a/gcc/graphite-interchange.c
+++ b/gcc/graphite-interchange.c
@@ -110,6 +110,7 @@ build_linearized_memory_access (ppl_dimension_type offset, poly_dr_p pdr)
static void
memory_stride_in_loop (Value stride, graphite_dim_t depth, poly_dr_p pdr)
{
+ ppl_dimension_type time_depth;
ppl_Linear_Expression_t le, lma;
ppl_Constraint_t new_cstr;
ppl_dimension_type i, *map;
@@ -223,8 +224,10 @@ memory_stride_in_loop (Value stride, graphite_dim_t depth, poly_dr_p pdr)
This means that all the time dimensions are equal except for
depth, where we will add t_{depth} = t'_{depth} + 1 in the next
step. */
+
+ time_depth = psct_dynamic_dim (pbb, depth);
for (i = 0; i < dim_sctr; i++)
- if (i != depth)
+ if (i != time_depth)
{
ppl_new_Linear_Expression_with_dimension (&le, new_dim);
ppl_set_coef (le, i, 1);
@@ -241,8 +244,8 @@ memory_stride_in_loop (Value stride, graphite_dim_t depth, poly_dr_p pdr)
between two consecutive points in time dimensions. */
{
ppl_new_Linear_Expression_with_dimension (&le, new_dim);
- ppl_set_coef (le, depth, 1);
- ppl_set_coef (le, depth + offset, -1);
+ ppl_set_coef (le, time_depth, 1);
+ ppl_set_coef (le, time_depth + offset, -1);
ppl_set_inhomogeneous (le, 1);
ppl_new_Constraint (&new_cstr, le, PPL_CONSTRAINT_TYPE_EQUAL);
ppl_Pointset_Powerset_C_Polyhedron_add_constraint (p2, new_cstr);