From 4edf1cdd3d6d2519794b053deaf67b7ff84df0d5 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 7 Feb 2023 13:11:51 -0800 Subject: [PATCH] nir/loop_analyze: Eliminate nir_basic_induction_var No longer used. All of the information that was previously track here is tracked directly in nir_loop_variable... and, technically speaking, has been tracked there ever since 0b9639c35d0a. Reviewed-by: Caio Oliveira Part-of: --- src/compiler/nir/nir_loop_analyze.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c index 9064030f19f..f2cd13c478c 100644 --- a/src/compiler/nir/nir_loop_analyze.c +++ b/src/compiler/nir/nir_loop_analyze.c @@ -33,11 +33,6 @@ typedef enum { basic_induction } nir_loop_variable_type; -typedef struct nir_basic_induction_var { - nir_alu_instr *alu; /* The def of the alu-operation */ - nir_ssa_def *def_outside_loop; /* The phi-src outside the loop */ -} nir_basic_induction_var; - typedef struct { /* A link for the work list */ struct list_head process_link; @@ -50,9 +45,6 @@ typedef struct { /* The type of this ssa_def */ nir_loop_variable_type type; - /* If this is of type basic_induction */ - struct nir_basic_induction_var *ind; - /* True if variable is in an if branch */ bool in_if_branch; @@ -421,7 +413,6 @@ compute_induction_information(loop_info_state *state) continue; nir_phi_instr *phi = nir_instr_as_phi(var->def->parent_instr); - nir_basic_induction_var *biv = rzalloc(state, nir_basic_induction_var); nir_loop_variable *alu_src_var = NULL; nir_foreach_phi_src(src, phi) { @@ -485,9 +476,7 @@ compute_induction_information(loop_info_state *state) alu_src_var->init_src = var->init_src; alu_src_var->update_src = var->update_src; alu_src_var->type = basic_induction; - alu_src_var->ind = biv; var->type = basic_induction; - var->ind = biv; found_induction_var = true; num_induction_vars += 2; @@ -497,16 +486,13 @@ compute_induction_information(loop_info_state *state) alu_src_var->update_src = var->update_src; num_induction_vars += 2; - ralloc_free(biv); } else { var->init_src = NULL; var->update_src = NULL; - ralloc_free(biv); } } else { var->init_src = NULL; var->update_src = NULL; - ralloc_free(biv); } }