Clean up partitioning in try_optimize_cfg (PR bootstrap/82831).
authorMartin Liska <mliska@suse.cz>
Wed, 10 Jan 2018 10:54:20 +0000 (11:54 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 10 Jan 2018 10:54:20 +0000 (10:54 +0000)
2018-01-10  Martin Liska  <mliska@suse.cz>

PR bootstrap/82831
* basic-block.h (CLEANUP_NO_PARTITIONING): New define.
* bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
partitioning.
* cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
CLEANUP_NO_PARTITIONING is not set.

From-SVN: r256422

gcc/ChangeLog
gcc/basic-block.h
gcc/bb-reorder.c
gcc/cfgcleanup.c

index 03c5f868d03996e0a6d1db43ae2f38a02c540b44..19eea83b82a7815b94f4d182a4b67a8a9bb3baf9 100644 (file)
@@ -1,3 +1,12 @@
+2018-01-10  Martin Liska  <mliska@suse.cz>
+
+       PR bootstrap/82831
+       * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
+       * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
+       partitioning.
+       * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
+       CLEANUP_NO_PARTITIONING is not set.
+
 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * doc/rtl.texi: Remove documentation of (const ...) wrappers
index b9394cdb1f2f0f53b10ebdebf4904686f3367721..823627a14a8d359f55c0248a79f00a00bd99b1fa 100644 (file)
@@ -506,6 +506,7 @@ ei_cond (edge_iterator ei, edge *p)
                                           insns.  */
 #define CLEANUP_CFGLAYOUT      32      /* Do cleanup in cfglayout mode.  */
 #define CLEANUP_CFG_CHANGED    64      /* The caller changed the CFG.  */
+#define CLEANUP_NO_PARTITIONING        128     /* Do not try to fix partitions.  */
 
 /* Return true if BB is in a transaction.  */
 
index f977082de5aa3504d9b029b6c73c332799c11f66..9d18fcc495f3b2b3517a7bc4b566fa2c8ee4d16c 100644 (file)
@@ -2575,7 +2575,7 @@ pass_reorder_blocks::execute (function *fun)
   cfg_layout_initialize (CLEANUP_EXPENSIVE);
 
   reorder_basic_blocks ();
-  cleanup_cfg (CLEANUP_EXPENSIVE);
+  cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_NO_PARTITIONING);
 
   FOR_EACH_BB_FN (bb, fun)
     if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (fun))
index 43d18766d8adb34381191e5ba32d52db9a647b89..eebbe8f7959bd4ddadcff94513a171696eb559db 100644 (file)
@@ -3012,7 +3012,8 @@ try_optimize_cfg (int mode)
                  to detect and fix during edge forwarding, and in some cases
                  is only visible after newly unreachable blocks are deleted,
                  which will be done in fixup_partitions.  */
-             fixup_partitions ();
+             if ((mode & CLEANUP_NO_PARTITIONING) == 0)
+               fixup_partitions ();
              checking_verify_flow_info ();
             }