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: hot/cold vs glibc


On Mon, Apr 18, 2005 at 09:47:55AM -0700, Caroline Tice wrote:
> That was because, up until very recently, the call to
> function_section there used in_section to partially determine which
> section to switch to.  In the code just above the bit in your email,
> there were switches to the hot/cold sections to properly set
> alignments for the function and to insert the hot/cold start labels. 
> Those calls to switch sections also set the value for in_section.  I
> needed to blank it out again so that function_section would go to the
> correct section.
> 
> I believe the current implementation of function_section no longer
> depends on the value of in_section, so you could probably remove that
> line without any adverse affects.

Yes, having reviewed the remaining uses of in_section, it looks like
you're right.  This patch removes it.

OK to commit, anyone?  I tried to bootstrap on i686-pc-linux-gnu, but
could not, because the Ada compiler was miscompiled.  That predates
this patch.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

2005-04-18  Daniel Jacobowitz  <dan@codesourcery.com>

	* varasm.c (assemble_start_function): Remove reset of in_section.

Index: gcc/gcc/varasm.c
===================================================================
--- gcc.orig/gcc/varasm.c	2005-04-14 08:25:42.000000000 -0400
+++ gcc/gcc/varasm.c	2005-04-18 13:10:43.233654789 -0400
@@ -1297,7 +1297,6 @@ assemble_start_function (tree decl, cons
     }
 
   last_text_section = no_section;
-  in_section = no_section;
   resolve_unique_section (decl, 0, flag_function_sections);
 
   /* Switch to the correct text section for the start of the function.  */


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