]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/54369 (delayed-branch pass removes too many instructions)
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 2 Sep 2012 10:36:27 +0000 (10:36 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 2 Sep 2012 10:36:27 +0000 (10:36 +0000)
PR rtl-optimization/54369
* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
calling dbr_schedule.
* config/sparc/sparc.c (sparc_reorg): Likewise.

From-SVN: r190858

gcc/ChangeLog
gcc/config/mips/mips.c
gcc/config/sparc/sparc.c

index c9790e8af99b2ecd22047748ffa9ca895f175d9f..19c3645e8a978a5f29ca65605a75bc7d4989e3a8 100644 (file)
@@ -1,3 +1,10 @@
+2012-09-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/54369
+       * config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
+       calling dbr_schedule.
+       * config/sparc/sparc.c (sparc_reorg): Likewise.
+
 2012-09-01  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/54436
index 7721a7c1ce10424c17fc5fe82f45ef80aede8984..06b2ff4d0c36e7934fba7d3de683810a435a98b5 100644 (file)
@@ -15729,7 +15729,10 @@ mips_reorg (void)
     }
 
   if (optimize > 0 && flag_delayed_branch)
-    dbr_schedule (get_insns ());
+    {
+      cleanup_barriers ();
+      dbr_schedule (get_insns ());
+    }
   mips_reorg_process_insns ();
   if (!TARGET_MIPS16
       && TARGET_EXPLICIT_RELOCS
index 59ce3d014ca6f302fe0d36c67aa77621f73ef7bd..140332eb8990a381efe2943d6acd1e54038cf5c8 100644 (file)
@@ -10691,7 +10691,10 @@ sparc_reorg (void)
   /* We need to have the (essentially) final form of the insn stream in order
      to properly detect the various hazards.  Run delay slot scheduling.  */
   if (optimize > 0 && flag_delayed_branch)
-    dbr_schedule (get_insns ());
+    {
+      cleanup_barriers ();
+      dbr_schedule (get_insns ());
+    }
 
   /* Now look for specific patterns in the insn stream.  */
   for (insn = get_insns (); insn; insn = next)