mesa/src/intel/compiler/brw
Konstantin Seurer de32f9275f treewide: add & use parent instr helpers
We add a bunch of new helpers to avoid the need to touch >parent_instr,
including the full set of:

* nir_def_is_*
* nir_def_as_*_or_null
* nir_def_as_* [assumes the right instr type]
* nir_src_is_*
* nir_src_as_*
* nir_scalar_is_*
* nir_scalar_as_*

Plus nir_def_instr() where there's no more suitable helper.

Also an existing helper is renamed to unify all the names, while we're
churning the tree:

* nir_src_as_alu_instr -> nir_src_as_alu

..and then we port the tree to use the helpers as much as possible, using
nir_def_instr() where that does not work.

Acked-by: Marek Olšák <maraeo@gmail.com>

---

To eliminate nir_def::parent_instr we need to churn the tree anyway, so I'm
taking this opportunity to clean up a lot of NIR patterns.

Co-authored-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38313>
2025-11-12 21:22:13 +00:00
..
tests brw: Don't set destination of branch instructions 2025-10-30 17:18:15 +00:00
brw_analysis.cpp
brw_analysis.h
brw_analysis_def.cpp
brw_analysis_liveness.cpp
brw_analysis_performance.cpp brw: account for disabled SEND fused message in cycle computation 2025-10-16 18:55:06 +00:00
brw_asm.c brw: Set relevant immediate bits for Gfx9-11 in JIP and UIP helpers 2025-10-30 17:18:15 +00:00
brw_asm.h
brw_asm_internal.h
brw_asm_tool.c treewide: don't check before free 2025-10-15 23:01:33 +00:00
brw_builder.cpp
brw_builder.h brw/builder: Add BFN 2025-10-10 17:25:10 +00:00
brw_cfg.cpp
brw_cfg.h
brw_compile_bs.cpp
brw_compile_cs.cpp
brw_compile_fs.cpp
brw_compile_gs.cpp brw: avoid invalid URB messages 2025-11-05 17:18:09 +00:00
brw_compile_mesh.cpp brw: disable io_semantic validation for mesh intrinsics 2025-11-03 21:28:22 +00:00
brw_compile_tcs.cpp anv/brw: fix output tcs vertices 2025-10-23 18:54:05 +00:00
brw_compile_tes.cpp brw: handle GLSL/GLSL tessellation parameters 2025-10-22 20:48:59 +00:00
brw_compile_vs.cpp nir/validate: expand IO intrinsic validation with nir_io_semantics 2025-11-02 02:21:46 +00:00
brw_compiler.c brw: Use BFN to implement nir_opt_bitfield_select 2025-10-10 17:25:11 +00:00
brw_compiler.h brw: plug some holes in brw_wm_prog_data 2025-10-28 20:24:23 +00:00
brw_debug_recompile.c
brw_disasm.c brw: new Xe2 sampler opcodes 2025-10-16 12:08:16 +00:00
brw_disasm.h
brw_disasm_info.cpp brw/disasm: Pretty print the BFN equation as an annotation 2025-10-10 17:25:09 +00:00
brw_disasm_info.h
brw_disasm_tool.c util/dynarray: infer type in append 2025-10-24 18:32:07 +00:00
brw_eu.c brw: Initial bits of BFN support 2025-10-10 17:25:09 +00:00
brw_eu.h brw: Initial bits of BFN support 2025-10-10 17:25:09 +00:00
brw_eu_compact.c
brw_eu_defines.h brw: handling dynamic programmable offsets pre-Xe2 2025-10-21 06:13:10 +00:00
brw_eu_emit.c intel: use util_is_aligned more 2025-10-31 15:03:58 +00:00
brw_eu_inst.h brw: Set relevant immediate bits for Gfx9-11 in JIP and UIP helpers 2025-10-30 17:18:15 +00:00
brw_eu_validate.c brw: Fix EU validation of VxH and Vx1 region 2025-10-30 16:06:42 +00:00
brw_from_nir.cpp treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_generator.cpp brw: Correctly generate conditional modifier for BFN 2025-11-05 16:52:56 +00:00
brw_generator.h
brw_gram.y brw: Don't set destination of branch instructions 2025-10-30 17:18:15 +00:00
brw_inst.cpp brw: get rid of GET_BUFFER_SIZE opcode 2025-10-16 12:08:16 +00:00
brw_inst.h brw: Store brw_urb_inst::offset in bytes on Xe2 2025-11-11 10:55:44 +00:00
brw_isa_info.h
brw_lex.l
brw_load_reg.cpp
brw_lower.cpp
brw_lower_dpas.cpp
brw_lower_integer_multiplication.cpp
brw_lower_logical_sends.cpp brw: Store brw_urb_inst::offset in bytes on Xe2 2025-11-11 10:55:44 +00:00
brw_lower_pack.cpp
brw_lower_regioning.cpp
brw_lower_scoreboard.cpp
brw_lower_simd_width.cpp brw: switch to new sampler payload description scheme 2025-10-16 12:08:15 +00:00
brw_lower_subgroup_ops.cpp
brw_nir.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_nir.h treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_nir_analyze_ubo_ranges.c
brw_nir_lower_alpha_to_coverage.c
brw_nir_lower_cooperative_matrix.c
brw_nir_lower_cs_intrinsics.c
brw_nir_lower_fs_barycentrics.c brw/nir_lower_fs_barycentrics: avoid nir_def_rewrite_uses_after 2025-10-09 09:50:19 -04:00
brw_nir_lower_fs_load_output.c
brw_nir_lower_fsign.py
brw_nir_lower_immediate_offsets.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_nir_lower_intersection_shader.c nir: remove manual nir_store_global 2025-10-21 12:37:58 +02:00
brw_nir_lower_ray_queries.c brw/rt: fix ray_object_(direction|origin) for closest-hit shaders 2025-10-27 01:42:22 +00:00
brw_nir_lower_rt_intrinsics.c brw/rt: Move nir_build_vec3_mat_mult_col_major helper to header 2025-10-27 01:42:22 +00:00
brw_nir_lower_rt_intrinsics_pre_trace.c
brw_nir_lower_sample_index_in_coord.c brw/nir_lower_sample_index_in_coord: use helpers 2025-10-09 09:50:20 -04:00
brw_nir_lower_shader_calls.c brw/nir_lower_shader_calls: use helpers 2025-10-09 09:50:20 -04:00
brw_nir_lower_storage_image.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_nir_lower_texel_address.c
brw_nir_lower_texture.c brw: handling dynamic programmable offsets pre-Xe2 2025-10-21 06:13:10 +00:00
brw_nir_opt_fsat.c treewide: add & use parent instr helpers 2025-11-12 21:22:13 +00:00
brw_nir_rt.c nir: remove manual nir_load_global_constant 2025-10-21 12:39:53 +02:00
brw_nir_rt.h brw/rt: Move nir_build_vec3_mat_mult_col_major helper to header 2025-10-27 01:42:22 +00:00
brw_nir_rt_builder.h treewide: use nir_store_global alias of nir_build_store_global 2025-10-21 12:37:58 +02:00
brw_nir_wa_18019110168.c nir: remove manual nir_load_global_constant 2025-10-21 12:39:53 +02:00
brw_nir_workarounds.py
brw_opt.cpp intel/compiler/brw: fix potential unsigned overflow 2025-10-24 07:52:09 -07:00
brw_opt_address_reg_load.cpp
brw_opt_algebraic.cpp
brw_opt_bank_conflicts.cpp
brw_opt_cmod_propagation.cpp brw/cmod: Enable limited cmod propagation for BFN 2025-10-10 17:25:11 +00:00
brw_opt_combine_constants.cpp brw: Constant propagation and constant combining support for BFN 2025-10-10 17:25:10 +00:00
brw_opt_copy_propagation.cpp brw: Constant propagation and constant combining support for BFN 2025-10-10 17:25:10 +00:00
brw_opt_cse.cpp brw: get rid of GET_BUFFER_SIZE opcode 2025-10-16 12:08:16 +00:00
brw_opt_dead_code_eliminate.cpp
brw_opt_register_coalesce.cpp
brw_opt_saturate_propagation.cpp
brw_opt_txf_combiner.cpp brw: switch to new sampler payload description scheme 2025-10-16 12:08:15 +00:00
brw_opt_virtual_grfs.cpp
brw_packed_float.c
brw_print.cpp brw: handling dynamic programmable offsets pre-Xe2 2025-10-21 06:13:10 +00:00
brw_private.h
brw_reg.cpp
brw_reg.h intel: use util_is_aligned more 2025-10-31 15:03:58 +00:00
brw_reg_allocate.cpp brw: Apply Gfx9 vgrf127 workaround in more cases 2025-10-31 22:55:53 +00:00
brw_reg_type.c
brw_reg_type.h
brw_rt.h
brw_sampler.c brw: handling dynamic programmable offsets pre-Xe2 2025-10-21 06:13:10 +00:00
brw_sampler.h brw: new Xe2 sampler opcodes 2025-10-16 12:08:16 +00:00
brw_schedule_instructions.cpp brw: fix ballot() type operations in shaders with HALT instructions 2025-10-21 05:55:04 +00:00
brw_shader.cpp brw: Store brw_urb_inst::offset in bytes on Xe2 2025-11-11 10:55:44 +00:00
brw_shader.h intel/brw: Add comment to first_non_payload_grf 2025-10-14 18:26:39 +00:00
brw_simd_selection.cpp
brw_thread_payload.cpp
brw_thread_payload.h
brw_validate.cpp brw: get rid of GET_BUFFER_SIZE opcode 2025-10-16 12:08:16 +00:00
brw_vue_map.c
brw_workaround.cpp
meson.build brw,elk: drop unused spirv->nir routines 2025-11-06 17:47:41 +00:00
test_eu_compact.cpp
test_eu_validate.cpp
test_helpers.cpp
test_helpers.h
test_insert_load_reg.cpp
test_lower_scoreboard.cpp
test_opt_algebraic.cpp
test_opt_cmod_propagation.cpp brw: switch to new sampler payload description scheme 2025-10-16 12:08:15 +00:00
test_opt_combine_constants.cpp
test_opt_copy_propagation.cpp
test_opt_cse.cpp
test_opt_register_coalesce.cpp
test_opt_saturate_propagation.cpp brw: switch to new sampler payload description scheme 2025-10-16 12:08:15 +00:00
test_simd_selection.cpp
test_vf_float_conversions.cpp