pan/compiler: Rename bifrost_optimize_nir

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40924>
This commit is contained in:
Lorenzo Rossi 2026-04-13 10:53:01 +02:00 committed by Marge Bot
parent 6f05b27b9a
commit 312603b2fa

View file

@ -183,7 +183,7 @@ mem_vectorize_cb(unsigned align_mul, unsigned align_offset, unsigned bit_size,
}
static void
bi_optimize_loop_nir(nir_shader *nir, uint64_t gpu_id, bool allow_copies)
bi_optimize_loop(nir_shader *nir, uint64_t gpu_id, bool allow_copies)
{
bool progress;
@ -198,7 +198,7 @@ bi_optimize_loop_nir(nir_shader *nir, uint64_t gpu_id, bool allow_copies)
NIR_PASS(progress, nir, nir_lower_wrmasks);
if (allow_copies) {
/* Only run this pass in the first call to bi_optimize_nir. Later
/* Only run this pass in the first call to bi_optimize_loop. Later
* calls assume that we've lowered away any copy_deref instructions
* and we don't want to introduce any more.
*/
@ -260,11 +260,11 @@ bi_optimize_loop_nir(nir_shader *nir, uint64_t gpu_id, bool allow_copies)
}
static void
bi_optimize_nir(nir_shader *nir, uint64_t gpu_id,
bi_optimize_late(nir_shader *nir, uint64_t gpu_id,
nir_variable_mode robust_modes)
{
NIR_PASS(_, nir, nir_opt_shrink_stores, true);
bi_optimize_loop_nir(nir, gpu_id, false);
bi_optimize_loop(nir, gpu_id, false /* allow_copies */);
NIR_PASS(_, nir, nir_opt_shrink_vectors, false);
@ -400,7 +400,7 @@ bifrost_preprocess_nir(nir_shader *nir, uint64_t gpu_id)
/* Get rid of any global vars before we lower to scratch. */
NIR_PASS(_, nir, nir_lower_global_vars_to_local);
bi_optimize_loop_nir(nir, gpu_id, true);
bi_optimize_loop(nir, gpu_id, true /* allow_copies */);
NIR_PASS(_, nir, nir_lower_var_copies);
}
@ -1289,7 +1289,7 @@ bifrost_compile_shader_nir(nir_shader *nir,
NIR_PASS(_, nir, pan_nir_lower_fs_outputs, skip_atest);
}
bi_optimize_nir(nir, inputs->gpu_id, inputs->robust_modes);
bi_optimize_late(nir, inputs->gpu_id, inputs->robust_modes);
/* Lower constants to scalar but then immediately fold so we get minimum-
* width vectors instead of scalars