]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
lambda-code.c (lambda_transform_legal_p): Handle the case of no dependences in the...
authorSebastian Pop <sebastian.pop@amd.com>
Wed, 16 Jan 2008 19:26:26 +0000 (19:26 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 16 Jan 2008 19:26:26 +0000 (19:26 +0000)
2008-01-16  Sebastian Pop  <sebastian.pop@amd.com>

* lambda-code.c (lambda_transform_legal_p): Handle the case of
no dependences in the dependence_relations vector.

From-SVN: r131577

gcc/ChangeLog
gcc/lambda-code.c

index 8e2caec9b1672f45843ded4895ca7d1313420ebf..1cf3e93f565bcb7ab9449be4bc2c7181187853a5 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-16  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * lambda-code.c (lambda_transform_legal_p): Handle the case of
+       no dependences in the dependence_relations vector.
+
 2008-01-16  Jan Hubicka  <jh@suse.cz>
 
        PR rtl-optimization/31396
index 0b67231a58d2c689e9a72507b522d69f4a6fdbc4..dc656d3ef4e08b75c264e0f7b1b9e6886d7f2711 100644 (file)
@@ -2595,11 +2595,16 @@ lambda_transform_legal_p (lambda_trans_matrix trans,
   gcc_assert (LTM_COLSIZE (trans) == nb_loops
              && LTM_ROWSIZE (trans) == nb_loops);
 
-  /* When there is an unknown relation in the dependence_relations, we
-     know that it is no worth looking at this loop nest: give up.  */
+  /* When there are no dependences, the transformation is correct.  */
+  if (VEC_length (ddr_p, dependence_relations) == 0)
+    return true;
+
   ddr = VEC_index (ddr_p, dependence_relations, 0);
   if (ddr == NULL)
     return true;
+
+  /* When there is an unknown relation in the dependence_relations, we
+     know that it is no worth looking at this loop nest: give up.  */
   if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
     return false;