[Patch] Fix PR 59542: flow verification after compgotos
Steven Bosscher
stevenb.gcc@gmail.com
Thu Dec 19 22:07:00 GMT 2013
On Thu, Dec 19, 2013 at 8:33 PM, Teresa Johnson wrote:
> 2013-12-19 Teresa Johnson <>
>
> PR gcov-profile/59542
> * bb-reorder.c (duplicate_computed_gotos): Invoke fixup_partitions
> if we have made any changes.
>
> Index: bb-reorder.c
> ===================================================================
> --- bb-reorder.c (revision 206100)
> +++ bb-reorder.c (working copy)
> @@ -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,17 @@ 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. This will cause the verification when leaving cfg layout
> + mode to fail, and lead to now cold code in the hot section. Invoke
> + fixup_partitions to address these problems. */
Please remove the "This will ... problems." part. IMHO The first
sentence explains quite enough ;-)
> + if (changed)
> + fixup_partitions ();
> cfg_layout_finalize ();
>
> BITMAP_FREE (candidates);
>
>
This is OK.
Ciao!
Steven
More information about the Gcc-patches
mailing list