diff --git a/src/amd/compiler/tests/helpers.cpp b/src/amd/compiler/tests/helpers.cpp index 9dc1afe5bdc..f63750165ca 100644 --- a/src/amd/compiler/tests/helpers.cpp +++ b/src/amd/compiler/tests/helpers.cpp @@ -362,7 +362,6 @@ void finish_isel_test(enum ac_hw_stage hw_stage, unsigned wave_size) { nir_validate_shader(nb->shader, "in finish_isel_test"); - nir_validate_ssa_dominance(nb->shader, "in finish_isel_test"); program.reset(new Program); program->debug.func = nullptr; diff --git a/src/asahi/clc/asahi_clc.c b/src/asahi/clc/asahi_clc.c index 95255c799db..a518d17cdba 100644 --- a/src/asahi/clc/asahi_clc.c +++ b/src/asahi/clc/asahi_clc.c @@ -85,7 +85,6 @@ compile(void *memctx, const uint32_t *spirv, size_t spirv_size) spirv_to_nir(spirv, spirv_size / 4, NULL, 0, MESA_SHADER_KERNEL, "library", &spirv_options, nir_options); nir_validate_shader(nir, "after spirv_to_nir"); - nir_validate_ssa_dominance(nir, "after spirv_to_nir"); ralloc_steal(memctx, nir); nir_fixup_is_exported(nir); diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 45a94e0efff..50c0e62519c 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -48,8 +48,6 @@ static const struct debug_named_value nir_debug_control[] = { "Test serialize and deserialize shader at each successful lowering/optimization call" }, { "novalidate", NIR_DEBUG_NOVALIDATE, "Disable shader validation at each successful lowering/optimization call" }, - { "validate_ssa_dominance", NIR_DEBUG_VALIDATE_SSA_DOMINANCE, - "Validate SSA dominance in shader at each successful lowering/optimization call" }, { "tgsi", NIR_DEBUG_TGSI, "Dump NIR/TGSI shaders when doing a NIR<->TGSI translation" }, { "print", NIR_DEBUG_PRINT, diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index a51f05c7528..79906938d58 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -73,7 +73,6 @@ extern bool nir_debug_print_shader[MESA_SHADER_KERNEL + 1]; #define NIR_DEBUG_CLONE (1u << 0) #define NIR_DEBUG_SERIALIZE (1u << 1) #define NIR_DEBUG_NOVALIDATE (1u << 2) -#define NIR_DEBUG_VALIDATE_SSA_DOMINANCE (1u << 3) #define NIR_DEBUG_TGSI (1u << 4) #define NIR_DEBUG_PRINT_VS (1u << 5) #define NIR_DEBUG_PRINT_TCS (1u << 6) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index f94375f5f8b..6029c1b7b8a 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -1721,10 +1721,8 @@ validate_dominance(nir_function_impl *impl, validate_state *state) state->block = NULL; } - if (NIR_DEBUG(VALIDATE_SSA_DOMINANCE)) { - memset(state->ssa_defs_found, 0, BITSET_WORDS(impl->ssa_alloc) * sizeof(BITSET_WORD)); - validate_ssa_dominance(impl, state); - } + memset(state->ssa_defs_found, 0, BITSET_WORDS(impl->ssa_alloc) * sizeof(BITSET_WORD)); + validate_ssa_dominance(impl, state); /* Restore the old dominance metadata */ set_foreach(state->blocks, entry) { @@ -1900,10 +1898,8 @@ validate_metadata_and_ssa_dominance(nir_function_impl *impl, validate_state *sta if (impl->valid_metadata & nir_metadata_instr_index) validate_instr_index(impl, state); - if (((impl->valid_metadata & nir_metadata_dominance) || - NIR_DEBUG(VALIDATE_SSA_DOMINANCE))) { - validate_dominance(impl, state); - } + /* This validates both metadata and SSA dominance. */ + validate_dominance(impl, state); if (impl->valid_metadata & nir_metadata_live_defs) validate_live_defs(impl, state); diff --git a/src/intel/compiler/brw_kernel.c b/src/intel/compiler/brw_kernel.c index 755c7fae60d..d06114316e8 100644 --- a/src/intel/compiler/brw_kernel.c +++ b/src/intel/compiler/brw_kernel.c @@ -307,7 +307,6 @@ brw_kernel_from_spirv(struct brw_compiler *compiler, spirv_to_nir(spirv, spirv_size / 4, NULL, 0, MESA_SHADER_KERNEL, entrypoint_name, &spirv_options, nir_options); nir_validate_shader(nir, "after spirv_to_nir"); - nir_validate_ssa_dominance(nir, "after spirv_to_nir"); ralloc_steal(mem_ctx, nir); nir->info.name = ralloc_strdup(nir, entrypoint_name); @@ -623,7 +622,6 @@ brw_nir_from_spirv(void *mem_ctx, unsigned gfx_version, const uint32_t *spirv, spirv_to_nir(spirv, spirv_size / 4, NULL, 0, MESA_SHADER_KERNEL, "library", &spirv_options, nir_options); nir_validate_shader(nir, "after spirv_to_nir"); - nir_validate_ssa_dominance(nir, "after spirv_to_nir"); ralloc_steal(mem_ctx, nir); nir->info.name = ralloc_strdup(nir, "library"); diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 543758836cd..2e02be36601 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -756,7 +756,6 @@ anv_load_fp64_shader(struct anv_device *device) assert(nir != NULL); nir_validate_shader(nir, "after spirv_to_nir"); - nir_validate_ssa_dominance(nir, "after spirv_to_nir"); NIR_PASS_V(nir, nir_lower_variable_initializers, nir_var_function_temp); NIR_PASS_V(nir, nir_lower_returns); diff --git a/src/vulkan/runtime/vk_nir.c b/src/vulkan/runtime/vk_nir.c index 00af22d7613..d8b17daaaf3 100644 --- a/src/vulkan/runtime/vk_nir.c +++ b/src/vulkan/runtime/vk_nir.c @@ -152,7 +152,6 @@ vk_spirv_to_nir(struct vk_device *device, assert(nir->info.stage == stage); nir_validate_shader(nir, "after spirv_to_nir"); - nir_validate_ssa_dominance(nir, "after spirv_to_nir"); if (mem_ctx != NULL) ralloc_steal(mem_ctx, nir);