mn10300.c (mn10300_scan_for_setlb_lcc): Fix loop discovery code.
authorRichard Biener <rguenther@suse.de>
Wed, 13 Feb 2013 09:38:09 +0000 (09:38 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 13 Feb 2013 09:38:09 +0000 (09:38 +0000)
2013-02-13  Richard Biener  <rguenther@suse.de>

* config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc):
Fix loop discovery code.

From-SVN: r195998

gcc/ChangeLog
gcc/config/mn10300/mn10300.c

index 2e7171f..b3402d3 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-13  Richard Biener  <rguenther@suse.de>
+
+       * config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc):
+       Fix loop discovery code.
+
 2013-02-12  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR inline-asm/56148
index 4f9a81d..32b224f 100644 (file)
@@ -3235,9 +3235,7 @@ mn10300_scan_for_setlb_lcc (void)
   compute_bb_for_insn ();
 
   /* Find the loops.  */
-  if (flow_loops_find (& loops) < 1)
-    DUMP ("No loops found", NULL_RTX);
-  current_loops = & loops;
+  loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
 
   /* FIXME: For now we only investigate innermost loops.  In practice however
      if an inner loop is not suitable for use with the SETLB/Lcc insns, it may
@@ -3287,15 +3285,7 @@ mn10300_scan_for_setlb_lcc (void)
                 reason);
     }
 
-#if 0 /* FIXME: We should free the storage we allocated, but
-        for some unknown reason this leads to seg-faults.  */
-  FOR_EACH_LOOP (liter, loop, 0)
-    free_simple_loop_desc (loop);
-
-  flow_loops_free (current_loops);
-#endif
-
-  current_loops = NULL;
+  loop_optimizer_finalize ();
 
   df_finish_pass (false);