Mesa (main): intel/compiler: Convert to LCSSA and use divergence analysis.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Mar 26 01:21:25 UTC 2022
Module: Mesa
Branch: main
Commit: 49ef23f4a681e9132a13e4ef366b0641b1c1fe5e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49ef23f4a681e9132a13e4ef366b0641b1c1fe5e
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Mar 15 16:25:55 2022 -0700
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 at intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15484>
---
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 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);
More information about the mesa-commit
mailing list