nv50/ir/ra: prefer def == src2 for fma with immediates on nvc0
authorKarol Herbst <karolherbst@gmail.com>
Tue, 27 Mar 2018 17:10:34 +0000 (19:10 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 21 Apr 2018 14:53:59 +0000 (10:53 -0400)
commit63572091b52ace35b60c46d092183bf818733ee0
tree0044f18dc119a61fa0709fa0f16f1cb27854db46
parentcc35b76e99779e6360fdd25fb39fbf1092f938be
nv50/ir/ra: prefer def == src2 for fma with immediates on nvc0

This helps with the PostRALoadPropagation pass moving long immediates into
FMA/MAD instructions.

changes in shader-db:
total instructions in shared programs : 5894114 -> 5886074 (-0.14%)
total gprs used in shared programs    : 666558 -> 666563 (0.00%)
total shared used in shared programs  : 520416 -> 520416 (0.00%)
total local used in shared programs   : 53524 -> 53524 (0.00%)
total bytes used in shared programs   : 54006744 -> 53932472 (-0.14%)

                local     shared        gpr       inst      bytes
    helped           0           0           2        4192        4192
      hurt           0           0           7           9           9

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
[imirkin: minor edits to separate nv50 and nvc0+ cases]
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp