This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: New optimization, partitioning hot/cold basic blocks
- From: Mike Stump <mrs at apple dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Caroline Tice <ctice at apple dot com>, keating Geoffrey <geoffk at apple dot com>, Andreas Tobler <toa at pop dot agri dot ch>, David Edelsohn <dje at watson dot ibm dot com>, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, roger Sayle <roger at eyesopen dot com>, "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 10 Apr 2004 15:12:10 -0700
- Subject: Re: PATCH: New optimization, partitioning hot/cold basic blocks
On Saturday, April 10, 2004, at 02:00 PM, Andrew Pinski wrote:
This patch implements my suggestions and I tested on i686-openbsd3.1
which does not support .section.
@@ -221,15 +222,15 @@ unlikely_text_section (void)
&& (in_section != in_named
|| strcmp (in_named_name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) !=
0))
{
-#ifdef TARGET_ASM_NAMED_SECTION
-
+ if (targetm.have_named_sections)
named_section (NULL_TREE, UNLIKELY_EXECUTED_TEXT_SECTION_NAME,
0);
-
-#else
+ else
+ {
in_section = in_unlikely_executed_text;
- fprintf (asm_out_file, SECTION_FORMAT_STRING,
- UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
-#endif /* ifdef TARGET_ASM_NAMED_SECTION */
+ ASM_OUTPUT_ALIGN (asm_out_file, 2);
+ fprintf (asm_out_file, "%s\n", TEXT_SECTION_ASM_OP);
+ }
+
I don't favor tracking this case in in_section. See
readonly_data_section for an example of status quo. It it were to be
tracked, it should be tracked when UNLIKELY_SECTION_ASM_OP is defined
on the platform, and only then, just like all the other ones, see
in_section for what I mean.