[Mesa-dev] shader-db statistics generation (was: [PATCH 3/4] i965/fs: Optimize (gl_FrontFacing ? x : y)...)

Jason Ekstrand jason at jlekstrand.net
Thu Jan 15 07:12:20 PST 2015


On Jan 15, 2015 12:27 AM, "Eero Tamminen" <eero.t.tamminen at intel.com> wrote:
>
> Hi,
>
> On 01/15/2015 03:04 AM, Matt Turner wrote:
>>
>> On Wed, Jan 14, 2015 at 1:52 PM, Matt Turner <mattst88 at gmail.com> wrote:
>>>
>>> On Wed, Jan 14, 2015 at 1:29 PM, Matt Turner <mattst88 at gmail.com> wrote:
>>>>
>>>> glsl: Optimize certain if-statements to just casts from the condition
>>>
>>>
>>> Cherry-picked to master, the shader-db results are
>>>
>>> total instructions in shared programs: 5965630 -> 5952789 (-0.22%)
>>> instructions in affected programs:     737228 -> 724387 (-1.74%)
>>> GAINED:                                5
>>> LOST:                                  16
>>>
>>> and we hurt 20 programs: 12 vec4 programs significantly (>68%) and 8
>>> SIMD8/16 programs by 1 instruction.
>>
>>
>> It looks like the vec4 programs have loops that are now able to be
>> unrolled, so those are actually improvements.
>
>
> 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?
>
> Any ideas how the loop unrolling could be reliably be taken into account
automatically in these statistics?
>
> Maybe with some extra output from compiler which outputs loop counter and
marks loop start and end so that statistics generator can:
> - count number of loops that could / could not be be unrolled
> - multiply number of instructions inside loops by loop counter,
>   if the counter is a static value
>
>
>         - Eero

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.

>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150115/bd04c0c4/attachment.html>


More information about the mesa-dev mailing list