Tree dumps and (garbage?) local variables

Diego Novillo dnovillo@redhat.com
Fri Aug 27 14:18:00 GMT 2004


On Fri, 2004-08-27 at 08:30, Richard Guenther wrote:

> Thanks for any hints!
> 
It's not until we take the program out of SSA form that we determine if
a _DECL is needed or not.  You could do a similar trick done in the SSA
verifier.  One idea would be to

for (i = 0; i < num_referenced_vars; i++)
  TREE_VISITED (referenced_var (i)) = 0;

FOR_EACH_BB (bb)
  for (si = bsi_start (bb); !bsi_end (si); bsi_next (&si))
    FOR_EACH_SSA_TREE_OPERAND (name, stmt, iter, SSA_OP_ALL_OPERANDS)
      TREE_VISITED (SSA_NAME_VAR (name)) = 1;

And then only dump the symbols that have TREE_VISITED set.


Diego.



More information about the Gcc mailing list