[patch] Cleanups needed for tree SSA work (part 2)

Diego Novillo dnovillo@redhat.com
Mon Jul 9 20:02:00 GMT 2001


On Mon, 09 Jul 2001, Jeff Law wrote:

>   > 2001-07-06  Diego Novillo  <dnovillo@redhat.com>
>   > 
>   > 	* basic-block.h (tree_node): Forward declare if needed.
>   > 	(struct basic_block_def): Add fields 'head_tree' and 'end_tree'.
>   > 	(BLOCK_HEAD_TREE): Define.
>   > 	(BLOCK_END_TREE): Define.
>   > 	(struct loops): Rename field 'tree' to 'tree_root'.
>   > 	* flow.c (entry_exit_blocks): Add initializers for 'head_tree' and 
>   > 	'end_tree'.
>   > 	(flow_loops_tree_build): Rename reference to field 'tree' to
>   > 	'tree_root'.
>   > 	(flow_loops_level_compute): Ditto.
>   > 	* predict.c (estimate_bb_frequencies): Ditto.
>   > 	* tree.h (struct tree_common): Add field 'aux'.
> Seems fine to me.
> 
Thanks.  I'll be checking it in shortly.

> The only potential issues I see are zapping the tree head/end pointers after
> we no longer need them so that the nodes they reference can be garbage
> collected.
> 
Yes.  Every CFG node is cleared after the tree SSA pass is done.

> That of course leads to something that that needs to be documented -- how long
> are those pointers considered valid?
> 
Those pointers are valid as long as the current function tree is
being processed.  The whole process is activated just before the
tree is expanded into RTL in c_expand_body.

Once we come back from the tree optimizer, the CFG has been
deleted and all the tree references made in the optimizer have
been cleared up.  The optimizer does not extend the lifetime of
the trees because everything is done before the trees are expanded
into RTL.


Diego.



More information about the Gcc-patches mailing list