From 42853b8115d6ff3909b07542ff588091542ee342 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 18 Mar 2024 11:10:26 -0500 Subject: [PATCH] nir/lower_reg: Support unstructured control-flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alyssa Rosenzweig Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c | 2 +- src/compiler/nir/nir_phi_builder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c b/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c index fd1305ff464..8edddbf01f3 100644 --- a/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c +++ b/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c @@ -146,7 +146,7 @@ nir_lower_reg_intrinsics_to_ssa_impl(nir_function_impl *impl) state.values = rzalloc_array(dead_ctx, struct nir_phi_builder_value *, impl->ssa_alloc); - nir_foreach_block(block, impl) { + nir_foreach_block_unstructured(block, impl) { nir_foreach_instr_safe(instr, block) { if (instr->type != nir_instr_type_intrinsic) continue; diff --git a/src/compiler/nir/nir_phi_builder.c b/src/compiler/nir/nir_phi_builder.c index 810451233e8..8089b474009 100644 --- a/src/compiler/nir/nir_phi_builder.c +++ b/src/compiler/nir/nir_phi_builder.c @@ -100,7 +100,7 @@ nir_phi_builder_create(nir_function_impl *impl) pb->num_blocks = impl->num_blocks; pb->blocks = ralloc_array(pb, nir_block *, pb->num_blocks); - nir_foreach_block(block, impl) { + nir_foreach_block_unstructured(block, impl) { pb->blocks[block->index] = block; }