Patch: Prune unused DECL_STMTs from saved tree structure
Zack Weinberg
zack@wolery.cumb.org
Tue Aug 29 23:38:00 GMT 2000
On Tue, Aug 29, 2000 at 07:10:18PM -0700, Mark Mitchell wrote:
> >>>>> "Zack" == Zack Weinberg <zack@wolery.cumb.org> writes:
>
> Zack> Upon casual inspection of walk_tree I believe I can make it
> Zack> work. I notice that it does not descend BLOCK_VARS - why
> Zack> not?
>
> I think because they should always be reachable via DECL_STMT.
Which is fine for what it used to be used for - but the pruning routine
has to eliminate all references to a given VAR_DECL in order for it to
be collected, so it has to examine the BLOCK_VARS chain.
There's no particular need to change it, I'm fine with walking down
BLOCK_VARS in the callback.
> The truth is that I would like walk_tree to be a little tidier. If we
> defined tree structure a little more rigorously, we could organize in
> it a DAG -- rather than the current cyclic structure.
No argument from me.
zw
More information about the Gcc-patches
mailing list