summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/bb-reorder.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2cc196d82d..32ac966eaba 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-19 Teresa Johnson <tejohnson@google.com>
+
+ PR gcov-profile/59542
+ * bb-reorder.c (duplicate_computed_gotos): Invoke fixup_partitions
+ if we have made any changes.
+
2013-12-19 Jakub Jelinek <jakub@redhat.com>
PR other/59545
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 7f8ea075e1b..7b8584f8ff9 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -2390,6 +2390,7 @@ duplicate_computed_gotos (void)
basic_block bb, new_bb;
bitmap candidates;
int max_size;
+ bool changed = false;
if (n_basic_blocks_for_fn (cfun) <= NUM_FIXED_BLOCKS + 1)
return 0;
@@ -2486,9 +2487,15 @@ duplicate_computed_gotos (void)
new_bb->aux = bb->aux;
bb->aux = new_bb;
new_bb->flags |= BB_VISITED;
+ 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. */
+ if (changed)
+ fixup_partitions ();
cfg_layout_finalize ();
BITMAP_FREE (candidates);
OpenPOWER on IntegriCloud