This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: struct-reorg optimization
- From: Olga Golovanevsky <OLGA at il dot ibm dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Peter Bergner <bergner at vnet dot ibm dot com>, Daniel Berlin <dberlin at dberlin dot org>, Diego Novillo <dnovillo at google dot com>, gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, Kenneth Zadeck <zadeck at naturalbridge dot com>
- Date: Wed, 5 Sep 2007 14:47:29 +0300
- Subject: Re: struct-reorg optimization
Jan Hubicka <hubicka@ucw.cz> wrote on 18/08/2007 01:24:44:
>
>
> /* Do transformation for a function represented by NODE. */
> static void
> do_reorg_for_func (struct cgraph_node *node)
> {
> create_new_local_vars ();
>
> create_new_mallocs_for_func (node);
> create_new_accesses_for_func ();
> update_ssa (TODO_update_ssa);
> cleanup_tree_cfg ();
>
> You should probably use function local cfun->todo lists. You care above
> to update cgraph edges, however ding update_ssa/cleanup_tree_cfg is
> going to disturb cgraph anyway, so you probably just want to add TODO
> flag for rebuilding cgraph edges as well.
I have checked whether the call to cleanup_tree_cfg is obligatory or not
for the changes the struct reorg makes. It looks like it's not.
The cleanup_tree_cfg does not cause the original malloc call to be removed,
thus making call to rebuild_cgraph_edges unnecessary in this case.
Olga
>
> Nice work and sorry for delays with the review!
> Honza