<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Nov 19, 2018 at 5:31 PM Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com">tarceri@itsqueeze.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 20/11/18 2:46 am, Jason Ekstrand wrote:<br>
> I also saw a case last week where the induction variable is <= <br>
> imax(thing, 4) and it'd be nice to unroll those too.<br>
<br>
That is an interesting one. It means we could do a simple unroll for the <br>
first 4 iterations i.e no if statements required, which is a bit of a <br>
different use case from the new functions introduced in this series but <br>
shouldn't bee too hard to do. <br></blockquote><div><br></div><div>Actually, I think it was imin(thing, 4) so we would do a conditional unroll of 4 iterations.  Still, it's potentially similar.  Mostly that was to point out that more creative loop unrolling is a good thing.<br></div><div><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> <br>
> --Jason<br>
> <br>
> On Mon, Nov 19, 2018 at 12:18 AM Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a> <br>
> <mailto:<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>>> wrote:<br>
> <br>
>     This series add support for partial loop unrolling for loops with an<br>
>     unknown trip count. The new partial_unroll function allows the caller<br>
>     to specifiy how may times the loop should be unrolled and then the<br>
>     loop is inserted in the innermost continue branch of the unrolled loop.<br>
> <br>
>     For now we only do partial unrolling for loops where we can guess the<br>
>     iteration count based on array access that uses an induction variable<br>
>     as its index (see patch 7).<br>
> <br>
>     Patches 1-6 are tidy-ups/refactors.<br>
> <br>
>     Patch 7 adds a method for guessing the trip count for the loop.<br>
> <br>
>     Patch 8 adds partial unrolling support and also support for removing<br>
>     redundant load/stores from the remaining loop when considering if<br>
>     we would be accessing an array out bounds.<br>
> <br>
> <br>
>     _______________________________________________<br>
>     mesa-dev mailing list<br>
>     <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a> <mailto:<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a>><br>
>     <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
> <br>
</blockquote></div></div>