This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] lower nested functions



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]);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]