This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] GGC friendly function save/restore
- From: Richard Henderson <rth at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, law at redhat dot com
- Date: Fri, 28 Nov 2003 14:39:41 -0800
- Subject: Re: [tree-ssa] GGC friendly function save/restore
- References: <20031128221816.GN21964@kam.mff.cuni.cz>
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~