[Mesa-dev] [PATCH 2/2] nir: Optimize a + neg(a)

Thomas Helland thomashelland90 at gmail.com
Sat Feb 28 11:47:34 PST 2015


On Feb 28, 2015 8:39 PM, "Jason Ekstrand" <jason at jlekstrand.net> wrote:
>
> Both patches are
>
> Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

Could you commit them?
I don't have commit access.

Regards,
Thomas

>
> On Sat, Feb 28, 2015 at 11:32 AM, Thomas Helland <
thomashelland90 at gmail.com> wrote:
>>
>> Shader-db i965 instructions:
>> total instructions in shared programs: 1711180 -> 1711159 (-0.00%)
>> instructions in affected programs:     825 -> 804 (-2.55%)
>> helped:                                9
>> HURT:                                  0
>> GAINED:                                3
>> LOST:                                  3
>>
>> Shader-db NIR instructions:
>> total instructions in shared programs: 606187 -> 606179 (-0.00%)
>> instructions in affected programs:     298 -> 290 (-2.68%)
>> helped:                                4
>> HURT:                                  0
>> GAINED:                                0
>> LOST:                                  0
>>
>> Signed-off-by: Thomas Helland <thomashelland90 at gmail.com>
>> ---
>>  src/glsl/nir/nir_opt_algebraic.py | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/src/glsl/nir/nir_opt_algebraic.py
b/src/glsl/nir/nir_opt_algebraic.py
>> index 688ceff..ef855aa 100644
>> --- a/src/glsl/nir/nir_opt_algebraic.py
>> +++ b/src/glsl/nir/nir_opt_algebraic.py
>> @@ -58,6 +58,8 @@ optimizations = [
>>     (('iadd', a, 0), a),
>>     (('fadd', ('fmul', a, b), ('fmul', a, c)), ('fmul', a, ('fadd', b,
c))),
>>     (('iadd', ('imul', a, b), ('imul', a, c)), ('imul', a, ('iadd', b,
c))),
>> +   (('fadd', ('fneg', a), a), 0.0),
>> +   (('iadd', ('ineg', a), a), 0),
>>     (('fmul', a, 0.0), 0.0),
>>     (('imul', a, 0), 0),
>>     (('fmul', a, 1.0), a),
>> --
>> 2.2.1
>>
>> _______________________________________________
>> 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/20150228/8ce68087/attachment-0001.html>


More information about the mesa-dev mailing list