mesa/src/intel/compiler/elk
Alyssa Rosenzweig 82ae8b1d33 treewide: simplify nir_def_rewrite_uses_after
Most of the time with nir_def_rewrite_uses_after, you want to rewrite after the
replacement. Make that the default thing to be more ergonomic and to drop
parent_instr uses.

We leave nir_def_rewrite_uses_after_instr defined if you really want the old
signature with an arbitrary after point.

Via Coccinelle patch:

    @@
    expression a, b;
    @@

    -nir_def_rewrite_uses_after(a, b, b->parent_instr)
    +nir_def_rewrite_uses_after_def(a, b)

Followed by a bunch of sed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36489>
2025-08-01 15:34:24 +00:00
..
tests intel/compiler tests: fix path-to-string conversion 2025-06-23 08:26:29 +00:00
elk_asm.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_asm_tool.c intel/compiler tests: fix variable type for getopt_long() return value 2025-06-23 08:26:29 +00:00
elk_cfg.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_cfg.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_clip.h intel: Move devinfo->has_negative_rhw_bug into the elk compiler 2025-03-10 17:23:07 -07:00
elk_clip_line.c intel: Move devinfo->has_negative_rhw_bug into the elk compiler 2025-03-10 17:23:07 -07:00
elk_clip_point.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_clip_tri.c intel: Move devinfo->has_negative_rhw_bug into the elk compiler 2025-03-10 17:23:07 -07:00
elk_clip_unfilled.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_clip_util.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_compile_clip.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_compile_ff_gs.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_compile_sf.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_compiler.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_compiler.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_dead_control_flow.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_dead_control_flow.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_debug_recompile.c intel/elk: Remove coarse pixel handling 2024-03-07 15:53:18 +00:00
elk_disasm.c intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_disasm.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_disasm_info.c intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_disasm_info.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_disasm_tool.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_eu.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_eu.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_eu_compact.c intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_eu_defines.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_eu_emit.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_eu_opcodes.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_eu_util.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_eu_validate.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_fs.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_bank_conflicts.cpp util: crib SWAP macro from freedreno 2025-07-21 11:42:18 +00:00
elk_fs_builder.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_cmod_propagation.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_fs_combine_constants.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_copy_propagation.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_cse.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_dead_code_eliminate.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_fs_generator.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_live_variables.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_live_variables.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_fs_lower_pack.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_fs_lower_regioning.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_fs_nir.cpp treewide: use nir_def_as_* 2025-08-01 15:34:24 +00:00
elk_fs_reg_allocate.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_register_coalesce.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_fs_saturate_propagation.cpp intel/elk: Don't propagate saturate to an instruction that writes flags 2024-08-09 14:26:01 -07:00
elk_fs_sel_peephole.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_fs_thread_payload.cpp intel/elk: Remove coarse pixel handling 2024-03-07 15:53:18 +00:00
elk_fs_validate.cpp intel/elk: Remove validation code for Gfx9+ 2024-03-07 15:53:18 +00:00
elk_fs_visitor.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_gfx6_gs_visitor.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_gfx6_gs_visitor.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_gram.y intel/elk_asm: Add BranchCtrl support 2024-11-02 18:01:20 +00:00
elk_inst.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_interpolation_map.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_ir.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_ir_allocator.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_ir_analysis.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_ir_fs.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_ir_performance.cpp intel/elk: Remove Gfx9+ from passes 2024-03-07 15:53:18 +00:00
elk_ir_performance.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_ir_vec4.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_isa_info.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_lex.l intel/elk_asm: Add BranchCtrl support 2024-11-02 18:01:20 +00:00
elk_lower_logical_sends.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_nir.c treewide: simplify nir_def_rewrite_uses_after 2025-08-01 15:34:24 +00:00
elk_nir.h treewide: use nir_def_as_* 2025-08-01 15:34:24 +00:00
elk_nir_analyze_boolean_resolves.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_nir_analyze_ubo_ranges.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_nir_attribute_workarounds.c treewide: simplify nir_def_rewrite_uses_after 2025-08-01 15:34:24 +00:00
elk_nir_lower_alpha_to_coverage.c nir: rename nir_lower_io_to_temporaries -> nir_lower_io_vars_to_temporaries 2025-06-26 18:20:54 +00:00
elk_nir_lower_cs_intrinsics.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_nir_lower_storage_image.c build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_nir_options.c agx,freedreno,intel,lima,panfrost,svga,virgl,zink: fix supports_indirect_inputs 2025-07-08 06:11:42 +00:00
elk_nir_options.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_nir_private.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_nir_trig_workarounds.py intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_packed_float.c intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_predicated_break.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_prim.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_private.h intel: Move unlit centroid workaround into the elk compiler 2025-03-10 17:23:07 -07:00
elk_reg.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_reg_type.c intel/elk: Remove Gfx9+ from Reg related code 2024-03-07 15:53:18 +00:00
elk_reg_type.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_schedule_instructions.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_shader.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_shader.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_simd_selection.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_spirv.c nir: add nir_vectorize_cb callback parameter to nir_lower_phis_to_scalar() 2025-07-08 15:33:59 +00:00
elk_test_eu_compact.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_test_eu_validate.cpp intel/elk: Remove uses of VLAs 2025-01-10 07:05:35 +00:00
elk_test_fs_cmod_propagation.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_test_fs_combine_constants.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_test_fs_copy_propagation.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_test_fs_saturate_propagation.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_test_predicated_break.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_test_simd_selection.cpp intel: Switch uint64_t intel_debug to a bitset 2025-04-22 23:09:26 +00:00
elk_test_vec4_cmod_propagation.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_test_vec4_copy_propagation.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_test_vec4_dead_code_eliminate.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_test_vec4_register_coalesce.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_test_vf_float_conversions.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_vec4.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_builder.h intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_vec4_cmod_propagation.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_copy_propagation.cpp intel/elk: Fix wrong destination to memset 2025-01-24 01:09:26 +00:00
elk_vec4_cse.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_vec4_dead_code_eliminate.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_vec4_generator.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_gs_nir.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_gs_visitor.cpp intel: prepare VUE layout for more than 2 layouts 2025-05-08 06:48:35 +00:00
elk_vec4_gs_visitor.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_live_variables.cpp intel: fork exec_node/list -> brw_exec_node/list as a private Intel utility 2025-07-31 20:23:02 +00:00
elk_vec4_live_variables.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_nir.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_reg_allocate.cpp intel/elk: Remove uses of VLAs 2025-01-10 07:05:35 +00:00
elk_vec4_surface_builder.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_vec4_surface_builder.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_tcs.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_tcs.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_tes.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_vec4_tes.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_visitor.cpp build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
elk_vec4_vs.h intel/compiler: Use #pragma once instead of header guards 2024-12-11 19:47:44 +00:00
elk_vec4_vs_visitor.cpp intel/elk: Rename symbols 2024-02-24 00:24:31 +00:00
elk_vue_map.c treewide: use VARYING_BIT_* 2025-07-04 19:01:04 +00:00
meson.build intel/compiler: Use -Werror=vla 2025-02-11 11:25:48 +00:00