From 7e86653a6f58efbf78b4c1f530c49de9513d687d Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Thu, 14 Aug 2025 10:23:30 +0000 Subject: [PATCH] pan/bi: remove dead variables in preprocess This should have no effect apart cleaning up NIR_DEBUG print outputs a bit. Signed-off-by: Mary Guillemard Reviewed-by: Olivia Lee Part-of: --- src/panfrost/compiler/bifrost_compile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index dc14c0b8fb8..70333eaff8a 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -5962,6 +5962,10 @@ bifrost_preprocess_nir(nir_shader *nir, unsigned gpu_id) NIR_PASS(_, nir, nir_lower_vars_to_ssa); bi_optimize_loop_nir(nir, gpu_id, true); + + /* Lower away all variables for smaller shaders */ + NIR_PASS(_, nir, nir_lower_vars_to_ssa); + NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_all, NULL); } void