Module: Mesa Branch: main Commit: ea44879d2d9353685fd94d9b97c73ec294f4f185 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea44879d2d9353685fd94d9b97c73ec294f4f185
Author: Caio Oliveira <caio.olive...@intel.com> Date: Fri Jun 9 11:45:12 2023 -0700 nir/print: Use symbols % for SSA and @ for intrinsic The variable uniquifying now uses # instead of @. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-pra...@amd.com> Reviewed-by: Alyssa Rosenzweig <aly...@rosenzweig.io> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Acked-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Faith Ekstrand <faith.ekstr...@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23564> --- src/compiler/nir/nir_print.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index d21c99f3227..0784f10675b 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -125,7 +125,7 @@ print_ssa_def(nir_ssa_def *def, print_state *state) { FILE *fp = state->fp; - fprintf(fp, "%s %2u %sssa_%u", sizes[def->num_components], def->bit_size, + fprintf(fp, "%s %2u %s%%%u", sizes[def->num_components], def->bit_size, divergence_status(state, def->divergent), def->index); } @@ -329,7 +329,7 @@ static void print_ssa_use(nir_ssa_def *def, print_state *state, nir_alu_type src_type) { FILE *fp = state->fp; - fprintf(fp, "ssa_%u", def->index); + fprintf(fp, "%%%u", def->index); nir_instr *instr = def->parent_instr; if (instr->type == nir_instr_type_load_const && !NIR_DEBUG(PRINT_NO_INLINE_CONSTS)) { @@ -515,13 +515,13 @@ get_var_name(nir_variable *var, print_state *state) char *name; if (var->name == NULL) { - name = ralloc_asprintf(state->syms, "@%u", state->index++); + name = ralloc_asprintf(state->syms, "#%u", state->index++); } else { struct set_entry *set_entry = _mesa_set_search(state->syms, var->name); if (set_entry != NULL) { - /* we have a collision with another name, append an @ + a unique + /* we have a collision with another name, append an # + a unique * index */ - name = ralloc_asprintf(state->syms, "%s@%u", var->name, + name = ralloc_asprintf(state->syms, "%s#%u", var->name, state->index++); } else { /* Mark this one as seen */ @@ -1069,7 +1069,7 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state) fprintf(fp, " = "); } - fprintf(fp, "intrinsic %s (", info->name); + fprintf(fp, "@%s (", info->name); for (unsigned i = 0; i < num_srcs; i++) { if (i != 0)