This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: hot/cold vs glibc
- From: Daniel Jacobowitz <drow at false dot org>
- To: Caroline Tice <ctice at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Apr 2005 22:42:34 -0400
- Subject: Re: hot/cold vs glibc
- References: <20050418153534.GA9995@nevyn.them.org> <0b58e3cd90533a74f166072a5401fb35@apple.com>
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. */