[PATCH] Clear BB_VISITED in bb-reorder

Thomas Schwinge thomas@codesourcery.com
Mon Oct 17 13:12:00 GMT 2016


Hi!

On Mon, 17 Oct 2016 14:26:42 +0200 (CEST), Richard Biener <rguenther@suse.de> wrote:
> --- gcc/bb-reorder.c	(revision 241228)
> +++ gcc/bb-reorder.c	(working copy)
> @@ -2355,7 +2355,10 @@ reorder_basic_blocks_simple (void)
>       To start with, everything points to itself, nothing is assigned yet.  */
>  
>    FOR_ALL_BB_FN (bb, cfun)
> -    bb->aux = bb;
> +    {
> +      bb->aux = bb;
> +      bb->flags &= ~BB_VISITED;
> +    }
>  
>    EXIT_BLOCK_PTR_FOR_FN (cfun)->aux = 0;

"EXIT_BLOCK_PTR_FOR_FN (cfun)->flags &= ~BB_VISITED;" is not required
here, additionally?

Also, I see that in this file, pass_duplicate_computed_gotos::execute
does call clear_bb_flags to clear basic block flags -- but
reorder_basic_blocks_simple (cited above), called via
reorder_basic_blocks, called via pass_reorder_blocks::execute is part of
a different pass...


Grüße
 Thomas



More information about the Gcc-patches mailing list