cfgcleanup.c (try_forward_edges): Do not update BB_FORWARDER_BLOCK.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 22 May 2011 21:29:20 +0000 (21:29 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 22 May 2011 21:29:20 +0000 (21:29 +0000)
* cfgcleanup.c (try_forward_edges): Do not update BB_FORWARDER_BLOCK.
(try_optimize_cfg): Update BB_FORWARDER_BLOCK if try_forward_edges
returns true.

From-SVN: r174046

gcc/ChangeLog
gcc/cfgcleanup.c

index 53b72b2ab19af4f1e0c9ee6a80da56adebec70cd..6959dd4c78d1d097c986e3b9fa630eb07fa7ae1f 100644 (file)
@@ -1,3 +1,9 @@
+2011-05-22  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * cfgcleanup.c (try_forward_edges): Do not update BB_FORWARDER_BLOCK.
+       (try_optimize_cfg): Update BB_FORWARDER_BLOCK if try_forward_edges
+       returns true.
+
 2011-05-22  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * config/mips/mips.c (mips_default_arch): Honor MIPS_ISA_DEFAULT.
index 179cd00ad0c8b741dcb5fba981b09144cd1876e5..c36af89a137c5fa45b228b9ffc2f3f3ff594d2d0 100644 (file)
@@ -599,9 +599,6 @@ try_forward_edges (int mode, basic_block b)
                             + REG_BR_PROB_BASE / 2)
                            / REG_BR_PROB_BASE);
 
-         if (!FORWARDER_BLOCK_P (b) && forwarder_block_p (b))
-           b->flags |= BB_FORWARDER_BLOCK;
-
          do
            {
              edge t;
@@ -2693,7 +2690,10 @@ try_optimize_cfg (int mode)
 
              /* Simplify branch to branch.  */
              if (try_forward_edges (mode, b))
-               changed_here = true;
+               {
+                 update_forwarder_flag (b);
+                 changed_here = true;
+               }
 
              /* Look for shared code between blocks.  */
              if ((mode & CLEANUP_CROSSJUMP)