[PATCH] D28368: Give higher full-unroll boosting when the loop iteration is small.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 12:11:15 PST 2017


danielcdh added a comment.

In https://reviews.llvm.org/D28368#637912, @haicheng wrote:

> In https://reviews.llvm.org/D28368#637684, @mzolotukhin wrote:
>
> > > The real motivation for this patch is to boost the threshold for fully unroll so that we can materialize the performance benefits in our benchmarks. The initial thoughts were: simply boost unroll-threshold by a minimum of 2X for fully unrolling (which is fine to materialize the performance). But I think this might be harder to be accepted by upstream as it seems too brutal-force. Then I'm thinking of integrating trip_count into the model to limit the "relative code size increase".
> >
> > I see. Just doubling the threshold indeed will be hard to upstream,...
>
>
> Alternatively, maybe we can make the cost model more accurate.  I observe the cost model used by the unroller overestimate the cost of free (S/Z)EXT and unconditional branches.


Agree that we need more accurate model, but the problem is that even the model is 100% accurate, linear-boosting factor cannot help boost threshold big enough for our case.

Thanks,
Dehao


https://reviews.llvm.org/D28368





More information about the llvm-commits mailing list