From b069151e627b57928ce79fc64d5f765fe63d2907 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 18 Mar 2024 19:10:07 -0500 Subject: [PATCH] nir/print: Inline print_ssa_use() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It has one caller. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Daniel Schürmann Part-of: --- src/compiler/nir/nir_print.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 35c2eb7effd..632ba4d40fa 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -386,11 +386,11 @@ print_load_const_instr(nir_load_const_instr *instr, print_state *state) } static void -print_ssa_use(nir_def *def, print_state *state, nir_alu_type src_type) +print_src(const nir_src *src, print_state *state, nir_alu_type src_type) { FILE *fp = state->fp; - fprintf(fp, "%%%u", def->index); - nir_instr *instr = def->parent_instr; + fprintf(fp, "%%%u", src->ssa->index); + nir_instr *instr = src->ssa->parent_instr; if (instr->type == nir_instr_type_load_const && !NIR_DEBUG(PRINT_NO_INLINE_CONSTS)) { nir_load_const_instr *load_const = nir_instr_as_load_const(instr); @@ -416,14 +416,6 @@ print_ssa_use(nir_def *def, print_state *state, nir_alu_type src_type) } } -static void print_src(const nir_src *src, print_state *state, nir_alu_type src_type); - -static void -print_src(const nir_src *src, print_state *state, nir_alu_type src_type) -{ - print_ssa_use(src->ssa, state, src_type); -} - static const char * comp_mask_string(unsigned num_components) {