From ebefeb2bdd9b440f4b515986667e2bfb3147fe35 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 24 Jun 2010 09:07:38 -0700 Subject: [PATCH] Attach a pointer to variable names in LIR dumping. Since variable names are not unique, and we like to make lots of __retvals and assignment_tmps and a,b,c,d this helps in debugging. --- ir_print_visitor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp index f15ffb66141..be5a843f67d 100644 --- a/ir_print_visitor.cpp +++ b/ir_print_visitor.cpp @@ -92,7 +92,7 @@ void ir_print_visitor::visit(ir_variable *ir) cent, inv, mode[ir->mode], interp[ir->interpolation]); print_type(ir->type); - printf(" %s)", ir->name); + printf(" %s@%p)", ir->name, ir); } @@ -220,7 +220,8 @@ void ir_print_visitor::visit(ir_swizzle *ir) void ir_print_visitor::visit(ir_dereference_variable *ir) { - printf("(var_ref %s) ", ir->variable_referenced()->name); + ir_variable *var = ir->variable_referenced(); + printf("(var_ref %s@%p) ", var->name, var); } -- 2.30.2