This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: attribute((leafify)) for 3.4
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 5 Nov 2003 17:25:40 +0100 (CET)
- Subject: Re: attribute((leafify)) for 3.4
Hi!
I finally found what is throwing away function bodies wrongly for me.
It's tree_rest_of_compilation()! I suppose, when under cgraph control,
its not neccessary to
/* If possible, obliterate the body of the function so that it can
be garbage collected. */
if (dump_enabled_p (TDI_all))
/* Keep the body; we're going to dump it. */
;
else if (DECL_INLINE (fndecl) && flag_inline_trees)
/* We might need the body of this function so that we can expand
it inline somewhere else. */
;
else
/* We don't need the body; blow it away. */
DECL_SAVED_TREE (fndecl) = NULL;
so I guarded the inline check with flag_unit_at_a_time as follows:
...
else if (flag_unit_at_a_time || (DECL_INLINE (fndecl) && flag_inline_trees))
/* We might need the body of this function so that we can expand
it inline somewhere else. */
;
...
but maybe even the whole throwing away the decl can be disabled for
unit-at-a-time.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/