Remove continue from loop, add one more assert.
authorSebastian Pop <sebastian.pop@amd.com>
Fri, 8 Jul 2011 19:15:11 +0000 (19:15 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Fri, 8 Jul 2011 19:15:11 +0000 (19:15 +0000)
2011-07-08  Sebastian Pop  <sebastian.pop@amd.com>

* graphite-dependences.c (build_alias_set_powerset): Remove
continue from loop, add one more assert.

From-SVN: r176057

gcc/ChangeLog
gcc/ChangeLog.graphite
gcc/graphite-dependences.c

index 16451f8daa130bd7d6a1ec9e863fd577dec30bb7..60412b237ebf224a17d58942ab5b19c57fce01f5 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-08  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-dependences.c (build_alias_set_powerset): Remove
+       continue from loop, add one more assert.
+
 2011-07-08  Georg-Johann Lay  <avr@gjlay.de>
        
        PR target/46779
index 2a14fc4607f6c02135d9a84ae7f8555aa373d953..628fb7edc587895bd897d0cd5ae9a96c22e96598 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-24  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * graphite-dependences.c (build_alias_set_powerset): Remove
+       continue from loop, add one more assert.
+
 2011-05-24  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-dependences.c (graphite_outer_subscript_bound): Remove
index b9b1d1b5880339713b19338042537a97e556cf6a..081aa691ba6dec0d86c753e544f6bf1f7ba4c312 100644 (file)
@@ -171,19 +171,16 @@ build_alias_set_powerset (ppl_Pointset_Powerset_C_Polyhedron_t alias_powerset,
 {
   ppl_dimension_type *ds;
   ppl_dimension_type access_dim;
-  unsigned i, pos = 0;
+  unsigned i, pos;
 
   ppl_Pointset_Powerset_C_Polyhedron_space_dimension (alias_powerset,
                                                      &access_dim);
-  ds = XNEWVEC (ppl_dimension_type, access_dim-1);
-  for (i = 0; i < access_dim; i++)
-    {
-      if (i == alias_dim)
-       continue;
+  ds = XNEWVEC (ppl_dimension_type, access_dim - 1);
+  gcc_assert (alias_dim < access_dim);
 
-      ds[pos] = i;
-      pos++;
-    }
+  for (pos = 0, i = 0; i < access_dim; i++)
+    if (i != alias_dim)
+      ds[pos++] = i;
 
   ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions (alias_powerset,
                                                              ds,