From: Boyan Ding Date: Fri, 21 Aug 2015 13:42:45 +0000 (+0800) Subject: i965/nir: Make use of nir_opt_undef X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86c57ebe0ed1acc98545746058862db7429412da;p=mesa.git i965/nir: Make use of nir_opt_undef Shader-db result on Ivy Bridge: total instructions in shared programs: 145484 -> 145445 (-0.03%) instructions in affected programs: 225 -> 186 (-17.33%) helped: 5 HURT: 0 Reviewed-by: Matt Turner Reviewed-by: Thomas Helland Signed-off-by: Boyan Ding --- diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index 8c6d28a7cd8..247b223f2e2 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -63,6 +63,8 @@ nir_optimize(nir_shader *nir, bool is_scalar) nir_validate_shader(nir); progress |= nir_opt_remove_phis(nir); nir_validate_shader(nir); + progress |= nir_opt_undef(nir); + nir_validate_shader(nir); } while (progress); }