]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/61608 (FAIL: gcc.target/arm/epilog-1.c scan-assembler tests)
authorRichard Henderson <rth@redhat.com>
Mon, 30 Jun 2014 20:14:42 +0000 (13:14 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 30 Jun 2014 20:14:42 +0000 (13:14 -0700)
PR rtl-opt/61608

        PR target/39284
        * bb-reorder.c (pass_duplicate_computed_gotos::execute): Cleanup
        the cfg if there were any changes.
        * passes.def: Revert move of peephole2 after reorder_blocks;
        move duplicate_computed_gotos before peephole2.

From-SVN: r212172

gcc/ChangeLog
gcc/bb-reorder.c
gcc/passes.def

index a571eef7fa04f837e7296ec7889d6f927bee6680..671fc6ce072447953e785398a437d7a3fa03bf78 100644 (file)
@@ -1,3 +1,12 @@
+2014-06-30  Richard Henderson  <rth@redhat.com>
+
+       PR rtl-opt/61608
+       PR target/39284
+       * bb-reorder.c (pass_duplicate_computed_gotos::execute): Cleanup
+       the cfg if there were any changes.
+       * passes.def: Revert move of peephole2 after reorder_blocks;
+       move duplicate_computed_gotos before peephole2.
+
 2014-06-30  Uros Bizjak  <ubizjak@gmail.com>
 
        * except.c (emit_note_eh_region_end): New helper function.
index 61b0caba8b8c84bd620fff08be4b6b1f41ec90ee..cd68fee4d77a1c3971fa169a6ffc34f32f1fff59 100644 (file)
@@ -2520,13 +2520,20 @@ pass_duplicate_computed_gotos::execute (function *fun)
       changed = true;
     }
 
-done:
-  /* Duplicating blocks above will redirect edges and may cause hot blocks
-     previously reached by both hot and cold blocks to become dominated only
-     by cold blocks.  */
+ done:
   if (changed)
-    fixup_partitions ();
-  cfg_layout_finalize ();
+    {
+      /* Duplicating blocks above will redirect edges and may cause hot
+        blocks previously reached by both hot and cold blocks to become
+        dominated only by cold blocks.  */
+      fixup_partitions ();
+
+      /* Merge the duplicated blocks into predecessors, when possible.  */
+      cfg_layout_finalize ();
+      cleanup_cfg (0);
+    }
+  else
+    cfg_layout_finalize ();
 
   BITMAP_FREE (candidates);
   return 0;
index 280cf166be3ae216cfbf2864c5ac85c54bcac923..f13df6cff26853f81df1bfdd4e9829d26417dcea 100644 (file)
@@ -396,20 +396,13 @@ along with GCC; see the file COPYING3.  If not see
          NEXT_PASS (pass_rtl_dse2);
          NEXT_PASS (pass_stack_adjustments);
          NEXT_PASS (pass_jump2);
+         NEXT_PASS (pass_duplicate_computed_gotos);
+         NEXT_PASS (pass_peephole2);
          NEXT_PASS (pass_if_after_reload);
          NEXT_PASS (pass_regrename);
          NEXT_PASS (pass_cprop_hardreg);
          NEXT_PASS (pass_fast_rtl_dce);
-         NEXT_PASS (pass_duplicate_computed_gotos);
          NEXT_PASS (pass_reorder_blocks);
-         /* We need to run peephole2 pass after the duplicate-
-            compute-gotos and the reorder-blocks pass (PR/39284).
-            We have a single indirect branch in the entire function
-            before duplicate-compute-gotos pass.  This vastly reduces
-            the size of the CFG.
-            For preventing to run peephole2 pass twice, its run after
-            the jump2 got removed.  */
-         NEXT_PASS (pass_peephole2);
          NEXT_PASS (pass_branch_target_load_optimize2);
          NEXT_PASS (pass_leaf_regs);
          NEXT_PASS (pass_split_before_sched2);