This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch]: Update bb->count to avoid erroneous partitioning decisions
>
> > OK,
> > is bb1 going to die? If not, probably bb1->count = 0 should be there, if so,
> > then the bb1->frequency = 0 is redundant.
>
> Agree, we do 'delete_basic_block (bb1)' and the frequency is not used in
> between, so the setting to 0 seems unnecessary.
>
> testing it:
>
> Index: tree-ssa-tail-merge.c
> ===================================================================
> --- tree-ssa-tail-merge.c (revision 193283)
> +++ tree-ssa-tail-merge.c (working copy)
> @@ -1488,8 +1488,9 @@ replace_block_by (basic_block bb1, basic_block bb2
> bb2->frequency += bb1->frequency;
> if (bb2->frequency > BB_FREQ_MAX)
> bb2->frequency = BB_FREQ_MAX;
> - bb1->frequency = 0;
>
> + bb2->count += bb1->count;
> +
> /* Do updates that use bb1, before deleting bb1. */
> release_last_vdef (bb1);
> same_succ_flush_bb (bb1);
>
> OK when validation completes ?
OK,
thanks.
Honza
>
> thanks
>
> Christian