add array access function in the right order
authorAditya Kumar <aditya.k7@samsung.com>
Wed, 9 Dec 2015 18:35:47 +0000 (18:35 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 9 Dec 2015 18:35:47 +0000 (18:35 +0000)
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 <s.pop@samsung.com>
From-SVN: r231465

gcc/ChangeLog
gcc/graphite-sese-to-poly.c

index 5b7814a6476b1c8623244ef17d8df3b5db09dbd7..069e69596e8294e7d868b22990f426e46b15c898 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-09  Aditya Kumar  <aditya.k7@samsung.com>
+           Sebastian Pop  <s.pop@samsung.com>
+
+       * 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  <aditya.k7@samsung.com>
            Sebastian Pop  <s.pop@samsung.com>
 
index 887c2125447e76a0abc265a4bec17a25f204d9d9..480c552afa92000f023caabc1808ef85642e0f16 100644 (file)
@@ -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)));