]> 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:37:49 +0000 (10:37 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 2 Sep 2012 10:37:49 +0000 (10:37 +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: r190860

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

index fe7a6629867894c9429a8ccc70ad947f47bce640..9dd505d5eff241f399f3cff29721ffbf97bb12a3 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-08-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * config/sol2.h (LINK_ARCH32_SPEC_BASE): Add /lib to default
index 8069a0bd736796ba96399404a80d199313361c88..87bf18e6c8e6b5e388291742ab496cef4a33b8fc 100644 (file)
@@ -15083,7 +15083,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 fea4a81d34b838b0ab4eed520dd1ed32406d69a4..9682609fecdb39e0e10daccc76f2cdb25962bbdd 100644 (file)
@@ -9456,7 +9456,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)