nir: Produce intrinsics in lower_{phis,ssa_defs}_to_regs

A number of passes lower SSA partially to registers, do work that would be
invalid in SSA, and then go back into SSA with nir_lower_regs_to_ssa. As a step
towards replacing nir_register with intrinsics,
the nir_lower_{phis,ssa_defs}_to_regs passes are changed to produce intrinsics
instead of nir_registers, and their callers are updated to call
nir_lower_reg_intrinsics_to_ssa instead of nir_lower_regs_to_ssa to compensate.

Jointly authored with Faith.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23089>
This commit is contained in:
Alyssa Rosenzweig
2023-05-22 13:04:05 -04:00
committed by Marge Bot
parent 73e191924c
commit 36b29201fa
8 changed files with 102 additions and 42 deletions
+1 -1
View File
@@ -1142,7 +1142,7 @@ nir_opt_loop_unroll_impl(nir_function_impl *impl,
if (progress) {
nir_metadata_preserve(impl, nir_metadata_none);
nir_lower_regs_to_ssa_impl(impl);
nir_lower_reg_intrinsics_to_ssa_impl(impl);
} else {
nir_metadata_preserve(impl, nir_metadata_all);
}