[GOOGLE] don't overwrite precomputed loop bound in AutoFDO

Xinliang David Li davidxl@google.com
Fri Jan 17 17:27:00 GMT 2014


Ok.

David

On Fri, Jan 17, 2014 at 9:08 AM, Dehao Chen <dehao@google.com> wrote:
> If a loop is cunrolled/vectorized, the AutoFDO computed trip count
> will be very small. This patch disallows overwritting of precomputed
> loop bound in AutoFDO mode.
>
> Bootstrapped and passed regression test. Performance test on-going.
>
> OK for Google branches?
>
> Thanks,
> Dehao
>
> Index: tree-ssa-loop-niter.c
> ===================================================================
> --- tree-ssa-loop-niter.c (revision 206674)
> +++ tree-ssa-loop-niter.c (working copy)
> @@ -2520,7 +2520,8 @@ record_niter_bound (struct loop *loop, double_int
>      }
>    if (realistic
>        && (!loop->any_estimate
> -  || i_bound.ult (loop->nb_iterations_estimate)))
> +  || (!flag_auto_profile &&
> +      i_bound.ult (loop->nb_iterations_estimate))))
>      {
>        loop->any_estimate = true;
>        loop->nb_iterations_estimate = i_bound;



More information about the Gcc-patches mailing list