From ce6a2c929e629df9e40cc99001c3fadeb0c687cd Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Wed, 9 Dec 2015 18:35:47 +0000 Subject: [PATCH] add array access function in the right order we used to add the access functions in the wrong order, Fortran style, leading to unprofitable interchanges. * graphite-sese-to-poly.c (pdr_add_memory_accesses): Iterate in the same order as adding data reference access functions. Co-Authored-By: Sebastian Pop From-SVN: r231465 --- gcc/ChangeLog | 6 ++++++ gcc/graphite-sese-to-poly.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5b7814a6476..069e69596e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-12-09 Aditya Kumar + Sebastian Pop + + * graphite-sese-to-poly.c (pdr_add_memory_accesses): Iterate in + the same order as adding data reference access functions. + 2015-12-09 Aditya Kumar Sebastian Pop diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 887c2125447..480c552afa9 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -912,7 +912,7 @@ pdr_add_memory_accesses (isl_map *acc, dr_info &dri) for (i = 0; i < nb_subscripts; i++) { isl_pw_aff *aff; - tree afn = DR_ACCESS_FN (dr, nb_subscripts - 1 - i); + tree afn = DR_ACCESS_FN (dr, i); aff = extract_affine (scop, afn, isl_space_domain (isl_map_get_space (acc))); -- 2.30.2