nir: Make nir_ssa_def_rewrite_uses take an SSA value
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 Mar 2021 06:13:38 +0000 (00:13 -0600)
committerMarge Bot <eric+marge@anholt.net>
Mon, 8 Mar 2021 16:59:55 +0000 (16:59 +0000)
commit117668b81187f1c04d40ea472ffa1b50276a84c9
tree05697885ed751d8fad5edbddf1ae421bc35df90a
parent13a0ee8a516a1208ffeeba0227f2061a6444e602
nir: Make nir_ssa_def_rewrite_uses take an SSA value

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

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9383>
110 files changed:
src/amd/vulkan/radv_nir_lower_ycbcr_textures.c
src/amd/vulkan/radv_shader.c
src/broadcom/compiler/v3d_nir_lower_scratch.c
src/broadcom/vulkan/v3dv_pipeline.c
src/compiler/glsl/gl_nir_lower_buffers.c
src/compiler/nir/nir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_control_flow.c
src/compiler/nir/nir_deref.c
src/compiler/nir/nir_from_ssa.c
src/compiler/nir/nir_inline_functions.c
src/compiler/nir/nir_inline_uniforms.c
src/compiler/nir/nir_instr_set.c
src/compiler/nir/nir_linking_helpers.c
src/compiler/nir/nir_lower_alu.c
src/compiler/nir/nir_lower_array_deref_of_vec.c
src/compiler/nir/nir_lower_atomics_to_ssbo.c
src/compiler/nir/nir_lower_bit_size.c
src/compiler/nir/nir_lower_bool_to_float.c
src/compiler/nir/nir_lower_cl_images_to_tex.c
src/compiler/nir/nir_lower_convert_alu_types.c
src/compiler/nir/nir_lower_discard_or_demote.c
src/compiler/nir/nir_lower_drawpixels.c
src/compiler/nir/nir_lower_fb_read.c
src/compiler/nir/nir_lower_flrp.c
src/compiler/nir/nir_lower_frexp.c
src/compiler/nir/nir_lower_idiv.c
src/compiler/nir/nir_lower_indirect_derefs.c
src/compiler/nir/nir_lower_input_attachments.c
src/compiler/nir/nir_lower_int_to_float.c
src/compiler/nir/nir_lower_interpolation.c
src/compiler/nir/nir_lower_io.c
src/compiler/nir/nir_lower_io_arrays_to_elements.c
src/compiler/nir/nir_lower_io_to_scalar.c
src/compiler/nir/nir_lower_io_to_temporaries.c
src/compiler/nir/nir_lower_load_const_to_scalar.c
src/compiler/nir/nir_lower_locals_to_regs.c
src/compiler/nir/nir_lower_multiview.c
src/compiler/nir/nir_lower_packing.c
src/compiler/nir/nir_lower_patch_vertices.c
src/compiler/nir/nir_lower_phis_to_scalar.c
src/compiler/nir/nir_lower_printf.c
src/compiler/nir/nir_lower_scratch.c
src/compiler/nir/nir_lower_ssbo.c
src/compiler/nir/nir_lower_tex.c
src/compiler/nir/nir_lower_two_sided_color.c
src/compiler/nir/nir_lower_undef_to_zero.c
src/compiler/nir/nir_lower_uniforms_to_ubo.c
src/compiler/nir/nir_lower_vars_to_ssa.c
src/compiler/nir/nir_opt_comparison_pre.c
src/compiler/nir/nir_opt_constant_folding.c
src/compiler/nir/nir_opt_copy_prop_vars.c
src/compiler/nir/nir_opt_copy_propagate.c
src/compiler/nir/nir_opt_dead_cf.c
src/compiler/nir/nir_opt_gcm.c
src/compiler/nir/nir_opt_idiv_const.c
src/compiler/nir/nir_opt_if.c
src/compiler/nir/nir_opt_intrinsics.c
src/compiler/nir/nir_opt_large_constants.c
src/compiler/nir/nir_opt_load_store_vectorize.c
src/compiler/nir/nir_opt_loop_unroll.c
src/compiler/nir/nir_opt_peephole_select.c
src/compiler/nir/nir_opt_remove_phis.c
src/compiler/nir/nir_opt_shrink_vectors.c
src/compiler/nir/nir_opt_undef.c
src/compiler/nir/nir_opt_uniform_atomics.c
src/compiler/nir/nir_search.c
src/compiler/nir/nir_split_per_member_structs.c
src/compiler/nir/nir_split_vars.c
src/freedreno/ir3/ir3_nir.c
src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c
src/freedreno/ir3/ir3_nir_lower_io_offsets.c
src/freedreno/ir3/ir3_nir_lower_tess.c
src/freedreno/vulkan/tu_shader.c
src/gallium/auxiliary/nir/nir_to_tgsi.c
src/gallium/drivers/d3d12/d3d12_nir_passes.c
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
src/gallium/drivers/etnaviv/etnaviv_nir_lower_ubo_to_uniform.c
src/gallium/drivers/iris/iris_program.c
src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
src/gallium/drivers/lima/ir/lima_nir_split_load_input.c
src/gallium/drivers/r600/sfn/sfn_nir.cpp
src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp
src/gallium/drivers/r600/sfn/sfn_nir_vectorize_vs_inputs.c
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/vc4/vc4_nir_lower_io.c
src/gallium/drivers/zink/zink_compiler.c
src/gallium/frontends/clover/nir/invocation.cpp
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_nir.c
src/intel/compiler/brw_nir_lower_conversions.c
src/intel/compiler/brw_nir_lower_cs_intrinsics.c
src/intel/compiler/brw_nir_lower_image_load_store.c
src/intel/compiler/brw_nir_lower_intersection_shader.c
src/intel/compiler/brw_nir_lower_mem_access_bit_sizes.c
src/intel/compiler/brw_nir_lower_rt_intrinsics.c
src/intel/compiler/brw_nir_lower_shader_calls.c
src/intel/compiler/brw_nir_opt_peephole_ffma.c
src/intel/compiler/brw_nir_rt.c
src/intel/vulkan/anv_nir_apply_pipeline_layout.c
src/intel/vulkan/anv_nir_lower_multiview.c
src/intel/vulkan/anv_nir_lower_ycbcr_textures.c
src/mesa/drivers/dri/i965/brw_nir_uniforms.cpp
src/mesa/state_tracker/st_nir_lower_builtin.c
src/microsoft/clc/clc_compiler.c
src/microsoft/clc/clc_nir.c
src/microsoft/compiler/dxil_nir.c
src/panfrost/midgard/midgard_compile.c
src/panfrost/util/pan_lower_helper_invocation.c
src/panfrost/util/pan_lower_sample_position.c