diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2022-03-15 16:25:55 -0700 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-03-26 00:28:19 +0000 |
commit | 49ef23f4a681e9132a13e4ef366b0641b1c1fe5e (patch) | |
tree | 539046ea0bbe69de695c361afe1786dd898a5ae5 | |
parent | b3942beecf15c3ab72dd9694d2762fe4d37a4773 (diff) |
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 <ian.d.romanick@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15484>
-rw-r--r-- | src/intel/compiler/brw_nir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index e764041b623..e8526ecefca 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); |