This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tree dumps and (garbage?) local variables
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 27 Aug 2004 09:26:54 -0400
- Subject: Re: Tree dumps and (garbage?) local variables
- Organization: Red Hat Canada
- References: <Pine.LNX.4.44.0408271426080.9036-100000@alwazn.tat.physik.uni-tuebingen.de>
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.