nir: Replace vecN(undef, undef, ...) with a single undef.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Apr 2016 08:42:25 +0000 (01:42 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 5 May 2016 21:24:00 +0000 (14:24 -0700)
commitc7a8b3270058a8831ee811494f722d278074b0f1
treed4b3080546471d1b45422ee9f6f25a8e2919bf77
parent49ea7454a189d9ebfa03fddfdba9949c6eaf4caa
nir: Replace vecN(undef, undef, ...) with a single undef.

shader-db statistics on Broadwell:

total instructions in shared programs: 8963409 -> 8962455 (-0.01%)
instructions in affected programs: 60858 -> 59904 (-1.57%)
helped: 318
HURT: 0

total cycles in shared programs: 71408022 -> 71406276 (-0.00%)
cycles in affected programs: 398416 -> 396670 (-0.44%)
helped: 199
HURT: 51

GAINED: 1

The only shaders affected were in Dota 2 Reborn.

It also sets up for the next optimization.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/nir/nir_opt_undef.c