This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] lower nested functions
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Mon, 16 Feb 2004 06:51:12 -0800
- Subject: Re: [tree-ssa] lower nested functions
- References: <20040216125256.GA5796@redhat.com>
On Feb 16, 2004, at 04:52, Richard Henderson wrote:
The following implements a scheme I posted some months ago:
http://gcc.gnu.org/ml/gcc/2003-09/msg01164.html
Tested on i686, alphaev67 and x86-64-linux. More interesting would
have been ia64, but none of our ia64 machines seem to be able to make
it through a bootstrap (before or after) without panicing. Oh well.
You forgot to test one target which is known to dumb some times, rs6000
and guess what there was still a reference to
current_function_needs_context.
Well this patch fixes that.
Applied to the tree-ssa as obvious.
Thanks,
Andrew Pinski
ChangeLog:
* config/rs6000/rs6000.c (output_function_profiler): Check
cfun->static_chain_decl instead of current_function_needs_context.
Patch:
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.332.2.39
diff -u -p -r1.332.2.39 rs6000.c
--- config/rs6000/rs6000.c 13 Feb 2004 13:13:06 -0000 1.332.2.39
+++ config/rs6000/rs6000.c 16 Feb 2004 14:47:21 -0000
@@ -13581,7 +13581,7 @@ output_function_profiler (FILE *file, in
asm_fprintf (file, "\tmflr %s\n", reg_names[0]);
asm_fprintf (file, "\tstd %s,16(%s)\n", reg_names[0], reg_names[1]);
- if (current_function_needs_context)
+ if (cfun->static_chain_decl != NULL)
{
asm_fprintf (file, "\tstd %s,24(%s)\n",
reg_names[STATIC_CHAIN_REGNUM], reg_names[1]);