From: Jason Ekstrand Date: Wed, 1 Apr 2015 19:37:43 +0000 (-0700) Subject: i965/nir: Run DCE again before going out of SSA X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9d7454571029ab330f28164fe6869f5e455ca90;p=mesa.git i965/nir: Run DCE again before going out of SSA We run lowering and optimization passes that might leave garbage lying around. This keeps the FS cse from having to clean it up. Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 94641cf2ec1..4dfb4d693ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -163,6 +163,8 @@ fs_visitor::emit_nir_code() nir_validate_shader(nir); nir_copy_prop(nir); nir_validate_shader(nir); + nir_opt_dce(nir); + nir_validate_shader(nir); if (unlikely(debug_enabled)) { fprintf(stderr, "NIR (SSA form) for %s shader:\n", stage_name);