OSDN Git Service

Correcting ChangeLog errors
[pf3gnuchains/gcc-fork.git] / gcc / tree-loop-linear.c
index e0f5bd2..2840e9b 100644 (file)
@@ -265,12 +265,12 @@ linear_transform_loops (struct loops *loops)
                {
                ...
                }
-           for (j = 0; j < 50; j++)
+             for (j = 0; j < 50; j++)
                {
                 ...
                }
            } */
-      if (!loop_nest || !loop_nest->inner)
+      if (!loop_nest || !loop_nest->inner || !loop_nest->single_exit)
        continue;
       VEC_truncate (tree, oldivs, 0);
       VEC_truncate (tree, invariants, 0);
@@ -308,7 +308,7 @@ linear_transform_loops (struct loops *loops)
        {
          if (dump_file)
           fprintf (dump_file, "Won't transform loop. Optimal transform is the identity transform\n");
-         continue;
+         goto free_and_continue;
        }
 
       /* Check whether the transformation is legal.  */
@@ -316,15 +316,15 @@ linear_transform_loops (struct loops *loops)
        {
          if (dump_file)
            fprintf (dump_file, "Can't transform loop, transform is illegal:\n");
-         continue;
+         goto free_and_continue;
        }
 
       before = gcc_loopnest_to_lambda_loopnest (loops, loop_nest, &oldivs,
                                                &invariants);
 
       if (!before)
-       continue;
-            
+       goto free_and_continue;
+
       if (dump_file)
        {
          fprintf (dump_file, "Before:\n");
@@ -346,6 +346,7 @@ linear_transform_loops (struct loops *loops)
       if (dump_file)
        fprintf (dump_file, "Successfully transformed loop.\n");
 
+    free_and_continue:
       free_dependence_relations (dependence_relations);
       free_data_refs (datarefs);
     }