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

Haicheng Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 08:02:26 PST 2017


haicheng added a comment.

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.


https://reviews.llvm.org/D28368





More information about the llvm-commits mailing list