nir: Make nir_ssa_def_rewrite_uses_after take an SSA value

This replaces the new_src parameter of nir_ssa_def_rewrite_uses_after()
with an SSA def, and rewrites all the users as needed.

Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383>
This commit is contained in:
Jason Ekstrand
2021-03-03 10:35:36 -06:00
committed by Marge Bot
parent 117668b811
commit e20e85f01e
33 changed files with 56 additions and 48 deletions

View File

@@ -247,7 +247,7 @@ lower_buffer_interface_derefs_impl(nir_function_impl *impl,
intrin->dest.ssa.bit_size = 32;
nir_ssa_def *bval = nir_i2b(&b, &intrin->dest.ssa);
nir_ssa_def_rewrite_uses_after(&intrin->dest.ssa,
nir_src_for_ssa(bval),
bval,
bval->parent_instr);
progress = true;
}