From 49ef23f4a681e9132a13e4ef366b0641b1c1fe5e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 15 Mar 2022 16:25:55 -0700 Subject: [PATCH] intel/compiler: Convert to LCSSA and use divergence analysis. We'll use this more shortly. For now, enable it to separately in case anything bisects to this. Reviewed-by: Ian Romanick Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_nir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index e764041..e8526ec 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1213,6 +1213,12 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, OPT(nir_opt_move, nir_move_comparisons); OPT(nir_opt_dead_cf); + NIR_PASS_V(nir, nir_convert_to_lcssa, true, true); + NIR_PASS_V(nir, nir_divergence_analysis); + + /* Clean up LCSSA phis */ + OPT(nir_opt_remove_phis); + OPT(nir_lower_bool_to_int32); OPT(nir_copy_prop); OPT(nir_opt_dce); -- 2.7.4