This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Tree dumps and (garbage?) local variables


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]