On Mon, Dec 07, 2015 at 11:30:18PM +0000, Segher Boessenkool wrote:
> --- a/gcc/shrink-wrap.c
> +++ b/gcc/shrink-wrap.c
> @@ -744,33 +744,64 @@ try_shrink_wrapping (edge *entry_edge, bitmap_head 
> *bb_with,
>         vec.quick_push (e->dest);
>      }
>  
> -  vec.release ();
> -
>    if (dump_file)
>      fprintf (dump_file, "Avoiding non-duplicatable blocks, PRO is now %d\n",
>            pro->index);
>  
>    /* If we can move PRO back without having to duplicate more blocks, do so.
> +     We do this because putting the prologue earlier is better for 
> scheduling.
>       We can move back to a block PRE if every path from PRE will eventually
> -     need a prologue, that is, PRO is a post-dominator of PRE.  */
> +     need a prologue, that is, PRO is a post-dominator of PRE.  PRE needs
> +     to dominate every block reachable from itself.  */
>  
>    if (pro != entry)
>      {
>        calculate_dominance_info (CDI_POST_DOMINATORS);
...
> +      BITMAP_FREE (bb_tmp);
> +      vec.release ();
>        free_dominance_info (CDI_POST_DOMINATORS);
>      }

Isn't this missing vec.release () for the pro == entry case?

        Jakub

Reply via email to