This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] function.[ch]: Removecurrent_function_contains_functions.
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 08 Apr 2005 11:04:04 -0600
- Subject: Re: [patch] function.[ch]: Removecurrent_function_contains_functions.
- Organization: Red Hat, Inc
- References: <20050408.111053.52886771.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Fri, 2005-04-08 at 11:10 -0400, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to remove current_function_contains_functions as
> it is unused.
>
> It was introduced in Mar 1995.
>
> The last use was removed when tree-ssa was merged into mainline.
>
> Removing the macro triggers a chain of clean-up opportunities. With
> the macro removed, nobody reads contains_functions of struct function,
> so the patch removes all writes to the member, which are all in
> push_function_context_to.
>
> Once we remove all references to contains_functions, we can remove the
> member from struct function.
>
> Once we remove all those writes to contains_functions,
> push_function_context_to does not need to take any argument, but for
> now, I am using ATTRIBUTE_UNUSED to be symmetric with
> pop_function_context_from.
>
> Kazu Hirata
>
> 2005-04-08 Kazu Hirata <kazu@cs.umass.edu>
>
> * function.c (push_function_context_to): Don't set
> contains_functions.
> * function.h (function): Remove contains_functions.
> (current_function_contains_functions): Remove.
OK.
Jeff