This is the mail archive of the
mailing list for the GCC project.
Re: [tuples] meaning of DECL_SAVED_TREE while analyzing cgraph
- From: Jan Hubicka <jh at suse dot cz>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: jh at suse dot cz, dnovillo at google dot com, gcc at gcc dot gnu dot org
- Date: Fri, 27 Jul 2007 04:51:18 +0200
- Subject: Re: [tuples] meaning of DECL_SAVED_TREE while analyzing cgraph
- References: <20070726211122.GA17715@redhat.com>
> Hi Jan.
> What do you expect DECL_SAVED_TREE to have in cgraph_analyze_functions:
> /* ??? It is possible to create extern inline function and later using
> weak alias attribute to kill its body. See
> gcc.c-torture/compile/20011119-1.c */
> if (!DECL_SAVED_TREE (decl))
> cgraph_reset_node (node);
> gcc_assert (!node->analyzed && node->reachable);
> gcc_assert (DECL_SAVED_TREE (decl));
> It was my understanding that DECL_SAVED_TREE was to be cleared after the
> tree optimizers executed, and Diego is explicitly killing it now right
> after gimplification-- at the end of gimplify_function_tree:
> /* The tree body of the function is no longer needed, replace it
> with the new GIMPLE body. */
> set_gimple_body (fndecl, seq);
> DECL_SAVED_TREE (fndecl) = NULL_TREE;
> I also thought that after the CFG was built, DECL_SAVED_TREE had nothing
> of value left.
> So, what do you expect it to have? Can we use something in the tuple
Well, take a look at the testcase mentioned in comment - it is a bit
weird side case where frotend produces function with body, passes it to
cgraph and then take the body back before end of compilation unit.
The test there is sort of hack, I would just remove it at this stage and
we can work out better fix for that testcase later. I hope that with my
plans for declaration merging pass we can get round such weird side
effects of in place declaration replacement.
> body now, or do you are you overloading DECL_SAVED_TREE for somthing
> else? Also, the assertion of DECL_SAVED_TREE above is unecessary, since
> you've already checked for a lack of it, and looped.
> Please let me know.