Attach a pointer to variable names in LIR dumping.
authorEric Anholt <eric@anholt.net>
Thu, 24 Jun 2010 16:07:38 +0000 (09:07 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 24 Jun 2010 20:32:35 +0000 (13:32 -0700)
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

index f15ffb6..be5a843 100644 (file)
@@ -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);
 }