This is the mail archive of the gcc-patches@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: 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


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