<p dir="ltr"><br>
On Jan 15, 2015 12:27 AM, "Eero Tamminen" <<a href="mailto:eero.t.tamminen@intel.com">eero.t.tamminen@intel.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> On 01/15/2015 03:04 AM, Matt Turner wrote:<br>
>><br>
>> On Wed, Jan 14, 2015 at 1:52 PM, Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
>>><br>
>>> On Wed, Jan 14, 2015 at 1:29 PM, Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
>>>><br>
>>>> glsl: Optimize certain if-statements to just casts from the condition<br>
>>><br>
>>><br>
>>> Cherry-picked to master, the shader-db results are<br>
>>><br>
>>> total instructions in shared programs: 5965630 -> 5952789 (-0.22%)<br>
>>> instructions in affected programs:     737228 -> 724387 (-1.74%)<br>
>>> GAINED:                                5<br>
>>> LOST:                                  16<br>
>>><br>
>>> and we hurt 20 programs: 12 vec4 programs significantly (>68%) and 8<br>
>>> SIMD8/16 programs by 1 instruction.<br>
>><br>
>><br>
>> It looks like the vec4 programs have loops that are now able to be<br>
>> unrolled, so those are actually improvements.<br>
><br>
><br>
> Out of curiosity, do you always look also at the cases where instructions were removed, or do you have some other way to verify that something didn't e.g. cause loop unrolling to fail?<br>
><br>
> Any ideas how the loop unrolling could be reliably be taken into account automatically in these statistics?<br>
><br>
> Maybe with some extra output from compiler which outputs loop counter and marks loop start and end so that statistics generator can:<br>
> - count number of loops that could / could not be be unrolled<br>
> - multiply number of instructions inside loops by loop counter,<br>
>   if the counter is a static value<br>
><br>
><br>
>         - Eero</p>
<p dir="ltr">It already dumps out the number of loops in the final code. It would be easy to add some code to the results parser to identify that number changing.</p>
<p dir="ltr">><br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>