mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 03:30:10 +01:00
If we have NIR such as:
32x4 %48 = @load_vulkan_descriptor (%47) (desc_type=SSBO)
32x4 %76 = deref_cast (tint_symbol_11 *)%48 (ssbo tint_symbol_11) (ptr_stride=0, align_mul=4, align_offset=0)
32x4 %77 = deref_struct &%76->tint_symbol_10 (ssbo int) // &((tint_symbol_11 *)%48)->tint_symbol_10
A single nir_rematerialize_deref_in_use_blocks() will rematerialize the
deref_struct and then it's deref_cast. However,
nir_foreach_instr_reverse_safe is not safe if the next iteration's
instruction is removed. This can result in the instruction loop exiting
and the load_vulkan_descriptor never having an LCSSA phi.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| algebraic_parser_test.py | ||
| algebraic_tests.cpp | ||
| builder_tests.cpp | ||
| comparison_pre_tests.cpp | ||
| control_flow_tests.cpp | ||
| core_tests.cpp | ||
| dce_tests.cpp | ||
| format_convert_tests.cpp | ||
| load_store_vectorizer_tests.cpp | ||
| loop_analyze_tests.cpp | ||
| loop_unroll_tests.cpp | ||
| lower_alu_width_tests.cpp | ||
| mod_analysis_tests.cpp | ||
| negative_equal_tests.cpp | ||
| nir_opt_varyings_test.h | ||
| nir_test.h | ||
| opt_if_tests.cpp | ||
| opt_loop_tests.cpp | ||
| opt_peephole_select.cpp | ||
| opt_shrink_vectors_tests.cpp | ||
| opt_varyings_tests_bicm_binary_alu.cpp | ||
| opt_varyings_tests_dead_input.cpp | ||
| opt_varyings_tests_dead_output.cpp | ||
| opt_varyings_tests_dedup.cpp | ||
| opt_varyings_tests_prop_const.cpp | ||
| opt_varyings_tests_prop_ubo.cpp | ||
| opt_varyings_tests_prop_uniform.cpp | ||
| opt_varyings_tests_prop_uniform_expr.cpp | ||
| range_analysis_tests.cpp | ||
| serialize_tests.cpp | ||
| vars_tests.cpp | ||