i965/nir: Do not scalarize phis in non-scalar setups

Significantly reduces register pressure in some piglit tests.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
Iago Toral Quiroga 2015-07-15 09:32:17 +02:00 committed by Jason Ekstrand
parent 34d162260f
commit da1b1bf85c

View file

@ -42,8 +42,12 @@ nir_optimize(nir_shader *nir, bool is_scalar)
progress |= nir_copy_prop(nir);
nir_validate_shader(nir);
nir_lower_phis_to_scalar(nir);
nir_validate_shader(nir);
if (is_scalar) {
nir_lower_phis_to_scalar(nir);
nir_validate_shader(nir);
}
progress |= nir_copy_prop(nir);
nir_validate_shader(nir);
progress |= nir_opt_dce(nir);