[tree-ssa] GGC friendly function save/restore
Richard Henderson
rth@redhat.com
Fri Nov 28 22:53:00 GMT 2003
On Fri, Nov 28, 2003 at 11:18:16PM +0100, Jan Hubicka wrote:
> /* Nonzero if the rtl inliner has saved the function for inlining. */
> unsigned int saved_for_inline : 1;
> +
> + /* Saved tree and arguments during tree optimization. Used later for
> + inlining */
> + tree GTY(()) saved_tree;
> + tree GTY(()) saved_args;
Not ok.
(1) No need for GTY markings on individual fields.
(2) You didn't put these at the correct place. Read the comments.
> + if (cfun->saved_tree)
> + {
> + /* We might need the body of this function so that we can expand
> + it inline somewhere else. */
> + DECL_SAVED_TREE (fndecl) = cfun->saved_tree;
> + DECL_ARGUMENTS (fndecl) = cfun->saved_args;
> + }
> + cfun = 0;
(3) What do you think this is doing?
cfun == DECL_SAVED_INSNS (current_function_decl), so this is still
reachable. You definitely beed to zap saved_tree/saved_args here.
Which also means that the zapping of saved_tree earlier should have
been useless.
(4) I also don't see that you've replaced the ggc_collect call that
you removed. The intent is to get rid of all the rtl that is now
most definitely garbage.
r~
More information about the Gcc-patches
mailing list