OSDN Git Service

* config/rs6000/ppc64-fp.c (__floatunditf): New function.
[pf3gnuchains/gcc-fork.git] / gcc / lambda-code.c
index 29b3e5a..2d6db22 100644 (file)
@@ -2010,27 +2010,6 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest,
   VEC_free (tree, heap, new_ivs);
 }
 
-/* Returns true when the vector V is lexicographically positive, in
-   other words, when the first nonzero element is positive.  */
-
-static bool
-lambda_vector_lexico_pos (lambda_vector v, 
-                         unsigned n)
-{
-  unsigned i;
-  for (i = 0; i < n; i++)
-    {
-      if (v[i] == 0)
-       continue;
-      if (v[i] < 0)
-       return false;
-      if (v[i] > 0)
-       return true;
-    }
-  return true;
-}
-
-
 /* Return TRUE if this is not interesting statement from the perspective of
    determining if we have a perfect loop nest.  */
 
@@ -2612,7 +2591,7 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
                          int nb_loops,
                          varray_type dependence_relations)
 {
-  unsigned int i;
+  unsigned int i, j;
   lambda_vector distres;
   struct data_dependence_relation *ddr;
 
@@ -2649,15 +2628,18 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
          
       /* If the dependence could not be captured by a distance vector,
         conservatively answer that the transform is not valid.  */
-      if (DDR_DIST_VECT (ddr) == NULL)
+      if (DDR_NUM_DIST_VECTS (ddr) == 0)
        return false;
 
       /* Compute trans.dist_vect */
-      lambda_matrix_vector_mult (LTM_MATRIX (trans), nb_loops, nb_loops, 
-                                DDR_DIST_VECT (ddr), distres);
+      for (j = 0; j < DDR_NUM_DIST_VECTS (ddr); j++)
+       {
+         lambda_matrix_vector_mult (LTM_MATRIX (trans), nb_loops, nb_loops, 
+                                    DDR_DIST_VECT (ddr, j), distres);
 
-      if (!lambda_vector_lexico_pos (distres, nb_loops))
-       return false;
+         if (!lambda_vector_lexico_pos (distres, nb_loops))
+           return false;
+       }
     }
   return true;
 }