This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: set_current_function hook, version N+1
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Nigel Stephens <nigel at mips dot com>, David Ung <davidu at mips dot com>, Richard Sandiford <richard at codesourcery dot com>
- Date: Tue, 04 Sep 2007 10:54:25 -0700
- Subject: Re: PATCH: set_current_function hook, version N+1
- References: <46D8CD52.90909@codesourcery.com>
Sandra Loosemore wrote:
> Here's a new version of the patch I posted earlier this week (see
> http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01875.html ) to add a
> target hook invoked when cfun is set.
I think this looks very good. I like that we're using {push,pop}_cfun
in more places now. Since nobody has objected, this patch is OK.
(Hopefully, in the future, more of the remainder can be converted to
stack discipline too. Or, to gcc_assert (cfun == NULL). For example,
it seems reasonable for the IPA passes to just assert that cfun is NULL
on entry, rather than setting it to NULL; if it's non-NULL on entry,
someone has forgotten to pop it.)
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713