intel/nir: Call validate_ssa_dominance at both ends of the NIR compile

This invokes it before we go into the optimization/lowering pass and
then right before we go out of SSA.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5288>
This commit is contained in:
Jason Ekstrand
2020-06-01 15:43:53 -05:00
committed by Marge Bot
parent 7cedc4128a
commit 3bd7c3c9db
2 changed files with 5 additions and 0 deletions

View File

@@ -685,6 +685,8 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir,
const bool is_scalar = compiler->scalar_stage[nir->info.stage]; const bool is_scalar = compiler->scalar_stage[nir->info.stage];
nir_validate_ssa_dominance(nir, "before brw_preprocess_nir");
if (is_scalar) { if (is_scalar) {
OPT(nir_lower_alu_to_scalar, NULL, NULL); OPT(nir_lower_alu_to_scalar, NULL, NULL);
} }
@@ -1053,6 +1055,8 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler,
nir_print_shader(nir, stderr); nir_print_shader(nir, stderr);
} }
nir_validate_ssa_dominance(nir, "before nir_convert_from_ssa");
OPT(nir_convert_from_ssa, true); OPT(nir_convert_from_ssa, true);
if (!is_scalar) { if (!is_scalar) {

View File

@@ -242,6 +242,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
stage, entrypoint_name, &spirv_options, nir_options); stage, entrypoint_name, &spirv_options, nir_options);
assert(nir->info.stage == stage); assert(nir->info.stage == stage);
nir_validate_shader(nir, "after spirv_to_nir"); nir_validate_shader(nir, "after spirv_to_nir");
nir_validate_ssa_dominance(nir, "after spirv_to_nir");
ralloc_steal(mem_ctx, nir); ralloc_steal(mem_ctx, nir);
free(spec_entries); free(spec_entries);